@@ -14,6 +14,7 | |||
|
14 | 14 | representation of different types of QChartSeries and other chart related objects like |
|
15 | 15 | QChartAxis and QChartLegend. If you simply want to show a chart in a layout, you can use the |
|
16 | 16 | convenience class QChartView instead of QChart. |
|
17 | \sa QChartView | |
|
17 | 18 | */ |
|
18 | 19 | |
|
19 | 20 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
@@ -46,11 +47,22 void QChart::addSeries(QChartSeries* series, QChartAxis* axisY) | |||
|
46 | 47 | m_dataset->addSeries(series, axisY); |
|
47 | 48 | } |
|
48 | 49 | |
|
50 | /*! | |
|
51 | Removes the QChartSeries specified in a perameter from the QChartView. | |
|
52 | It releses its ownership of the specified QChartSeries object. | |
|
53 | It does not delete the pointed QChartSeries data object | |
|
54 | \sa removeSeries(), removeAllSeries() | |
|
55 | */ | |
|
49 | 56 | void QChart::removeSeries(QChartSeries* series) |
|
50 | 57 | { |
|
51 | 58 | m_dataset->removeSeries(series); |
|
52 | 59 | } |
|
53 | 60 | |
|
61 | /*! | |
|
62 | Removes all the QChartSeries that have been added to the QChartView | |
|
63 | It also deletes the pointed QChartSeries data objects | |
|
64 | \sa addSeries(), removeSeries() | |
|
65 | */ | |
|
54 | 66 | void QChart::removeAllSeries() |
|
55 | 67 | { |
|
56 | 68 | m_dataset->removeAllSeries(); |
@@ -70,12 +82,18 void QChart::setChartBackgroundPen(const QPen& pen) | |||
|
70 | 82 | m_backgroundItem->update(); |
|
71 | 83 | } |
|
72 | 84 | |
|
85 | /*! | |
|
86 | Sets the title description text that is rendered above the chart. | |
|
87 | */ | |
|
73 | 88 | void QChart::setChartTitle(const QString& title) |
|
74 | 89 | { |
|
75 | 90 | createChartTitleItem(); |
|
76 | 91 | m_titleItem->setPlainText(title); |
|
77 | 92 | } |
|
78 | 93 | |
|
94 | /*! | |
|
95 | Sets the font that is used for rendering the description text that is rendered above the chart. | |
|
96 | */ | |
|
79 | 97 | void QChart::setChartTitleFont(const QFont& font) |
|
80 | 98 | { |
|
81 | 99 | createChartTitleItem(); |
@@ -9,7 +9,13 | |||
|
9 | 9 | |
|
10 | 10 | /*! |
|
11 | 11 | \class QChartView |
|
12 |
\brief Chart widget |
|
|
12 | \brief Chart widget | |
|
13 | ||
|
14 | QChartView is a standalone widget that can display charts. It does not require QGraphicsScene to work. It manages the graphical | |
|
15 | representation of different types of QChartSeries and other chart related objects like | |
|
16 | QChartAxis and QChartLegend. If you want to display a chart in your existing QGraphicsScene, you can use the QChart class instead. | |
|
17 | ||
|
18 | \sa QChart | |
|
13 | 19 | */ |
|
14 | 20 | |
|
15 | 21 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
@@ -41,16 +47,33 void QChartView::resizeEvent(QResizeEvent *event) | |||
|
41 | 47 | QWidget::resizeEvent(event); |
|
42 | 48 | } |
|
43 | 49 | |
|
50 | /*! | |
|
51 | Adds the series and optional y axis onto the chart and takes the ownership of the objects. | |
|
52 | If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and | |
|
53 | the y axis). | |
|
54 | \sa removeSeries, removeAllSeries | |
|
55 | */ | |
|
44 | 56 | void QChartView::addSeries(QChartSeries* series,QChartAxis *axisY) |
|
45 | 57 | { |
|
46 | 58 | m_chart->addSeries(series,axisY); |
|
47 | 59 | } |
|
48 | 60 | |
|
61 | /*! | |
|
62 | Removes the QChartSeries specified in a perameter from the QChartView. | |
|
63 | It releses its ownership of the specified QChartSeries object. | |
|
64 | It does not delete the pointed QChartSeries data object | |
|
65 | \sa removeSeries(), removeAllSeries() | |
|
66 | */ | |
|
49 | 67 | void QChartView::removeSeries(QChartSeries* series) |
|
50 | 68 | { |
|
51 | 69 | m_chart->removeSeries(series); |
|
52 | 70 | } |
|
53 | 71 | |
|
72 | /*! | |
|
73 | Removes all the QChartSeries that have been added to the QChartView | |
|
74 | It also deletes the pointed QChartSeries data objects | |
|
75 | \sa addSeries(), removeSeries() | |
|
76 | */ | |
|
54 | 77 | void QChartView::removeAllSeries() |
|
55 | 78 | { |
|
56 | 79 | m_chart->removeAllSeries(); |
@@ -71,16 +94,25 void QChartView::zoomOut() | |||
|
71 | 94 | m_chart->zoomOut(); |
|
72 | 95 | } |
|
73 | 96 | |
|
97 | /*! | |
|
98 | Returns the chart margin, which is the distance between the widget edge and the axis lines or the chart. | |
|
99 | */ | |
|
74 | 100 | int QChartView::margin() const |
|
75 | 101 | { |
|
76 | 102 | return m_chart->margin(); |
|
77 | 103 | } |
|
78 | 104 | |
|
105 | /*! | |
|
106 | Sets the title description text that is rendered above the chart. | |
|
107 | */ | |
|
79 | 108 | void QChartView::setChartTitle(const QString& title) |
|
80 | 109 | { |
|
81 | 110 | m_chart->setChartTitle(title); |
|
82 | 111 | } |
|
83 | 112 | |
|
113 | /*! | |
|
114 | Sets the font that is used for rendering the description text that is rendered above the chart. | |
|
115 | */ | |
|
84 | 116 | void QChartView::setChartTitleFont(const QFont& font) |
|
85 | 117 | { |
|
86 | 118 | m_chart->setChartTitleFont(font); |
@@ -213,11 +245,17 QChart::ChartTheme QChartView::chartTheme() const | |||
|
213 | 245 | return m_chart->chartTheme(); |
|
214 | 246 | } |
|
215 | 247 | |
|
248 | /*! | |
|
249 | Returns the pointer to the x axis object of the chart | |
|
250 | */ | |
|
216 | 251 | QChartAxis* QChartView::axisX() const |
|
217 | 252 | { |
|
218 | 253 | return m_chart->axisX(); |
|
219 | 254 | } |
|
220 | 255 | |
|
256 | /*! | |
|
257 | Returns the pointer to the y axis object of the chart | |
|
258 | */ | |
|
221 | 259 | QChartAxis* QChartView::axisY() const |
|
222 | 260 | { |
|
223 | 261 | return m_chart->axisY(); |
General Comments 0
You need to be logged in to leave comments.
Login now