@@ -69,12 +69,12 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
69 | 69 | /*! |
|
70 | 70 | \property QAreaSeries::lowerSeries |
|
71 | 71 | The lower one of the two line series used to define are series boundaries. Note if |
|
72 |
QAreaSeries was co |
|
|
72 | QAreaSeries was constructed without a\ lowerSeries this is null. | |
|
73 | 73 | */ |
|
74 | 74 | /*! |
|
75 | 75 | \qmlproperty LineSeries AreaSeries::lowerSeries |
|
76 | 76 | The lower one of the two line series used to define are series boundaries. Note if |
|
77 |
AreaSeries was co |
|
|
77 | AreaSeries was constructed without a\ lowerSeries this is null. | |
|
78 | 78 | */ |
|
79 | 79 | |
|
80 | 80 | /*! |
@@ -290,7 +290,7 void QBarCategoryAxis::insert(int index, const QString &category) | |||
|
290 | 290 | } |
|
291 | 291 | |
|
292 | 292 | /*! |
|
293 |
Replaces \a oldCategory with \a newCategory. If \a oldCategory does not exi |
|
|
293 | Replaces \a oldCategory with \a newCategory. If \a oldCategory does not exist on the axis nothing is done. | |
|
294 | 294 | A \a newCategory has to be valid QStrings and can not be duplicated. In case of replacing minimum or maximum category, |
|
295 | 295 | minimum and maximum of axis is updated accordingly. |
|
296 | 296 | */ |
@@ -36,15 +36,15 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
36 | 36 | \mainclass |
|
37 | 37 | |
|
38 | 38 | The labels can be configured by setting an appropriate DateTime format. |
|
39 | QDateTimeAxis works correctly with dates from 4714 BCE to 287396 CE | |
|
40 |
There are also other limitiation related to QDateTime |
|
|
39 | QDateTimeAxis works correctly with dates from 4714 BCE to 287396 CE. | |
|
40 | There are also other limitiation related to QDateTime. Please refer to QDateTime documentation. | |
|
41 | 41 | QDateTimeAxis can be setup to show axis line with tick marks, grid lines and shades. |
|
42 | 42 | |
|
43 | 43 | Note: QDateTimeAxis is disabled on ARM architecture. |
|
44 | 44 | |
|
45 | 45 | \image api_datatime_axis.png |
|
46 | 46 | |
|
47 |
QDateTimeAxis can be used with |
|
|
47 | QDateTimeAxis can be used with any QXYSeries. | |
|
48 | 48 | To add a data point to the series QDateTime::toMSecsSinceEpoch() is used. |
|
49 | 49 | \code |
|
50 | 50 | QLineSeries *series = new QLineSeries; |
@@ -41,7 +41,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
41 | 41 | */ |
|
42 | 42 | |
|
43 | 43 | /*! |
|
44 |
\qmlclass LogValue |
|
|
44 | \qmlclass LogValueAxis QLogValueAxis | |
|
45 | 45 | \brief The LogValueAxis element is used for manipulating chart's axes |
|
46 | 46 | \inherits AbstractAxis |
|
47 | 47 | |
@@ -58,7 +58,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
58 | 58 | Value has to be greater than 0. |
|
59 | 59 | */ |
|
60 | 60 | /*! |
|
61 |
\qmlproperty real LogValue |
|
|
61 | \qmlproperty real LogValueAxis::min | |
|
62 | 62 | Defines the minimum value on the axis. |
|
63 | 63 | When setting this property the max is adjusted if necessary, to ensure that the range remains valid. |
|
64 | 64 | Value has to be greater than 0. |
@@ -71,7 +71,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
71 | 71 | Value has to be greater than 0. |
|
72 | 72 | */ |
|
73 | 73 | /*! |
|
74 |
\qmlproperty real LogValue |
|
|
74 | \qmlproperty real LogValueAxis::max | |
|
75 | 75 | Defines the maximum value on the axis. |
|
76 | 76 | When setting this property the min is adjusted if necessary, to ensure that the range remains valid. |
|
77 | 77 | Value has to be greater than 0. |
@@ -83,7 +83,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
83 | 83 | Value has to be greater than 0 and not equal 1 |
|
84 | 84 | */ |
|
85 | 85 | /*! |
|
86 |
\qmlproperty real LogValue |
|
|
86 | \qmlproperty real LogValueAxis::base | |
|
87 | 87 | Defines the maximum value on the axis. |
|
88 | 88 | Defines the base of the logarithm. |
|
89 | 89 | Value has to be greater than 0 and not equal 1 |
@@ -96,7 +96,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
96 | 96 | See QString::sprintf() for additional details. |
|
97 | 97 | */ |
|
98 | 98 | /*! |
|
99 |
\qmlproperty real LogValue |
|
|
99 | \qmlproperty real LogValueAxis::labelFormat | |
|
100 | 100 | Defines the label format of the axis. |
|
101 | 101 | Supported specifiers are: d, i, o, x, X, f, F, e, E, g, G, c |
|
102 | 102 | See QString::sprintf() for additional details. |
@@ -107,7 +107,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
107 | 107 | Axis emits signal when \a min of axis has changed. |
|
108 | 108 | */ |
|
109 | 109 | /*! |
|
110 |
\qmlsignal LogValue |
|
|
110 | \qmlsignal LogValueAxis::onMinChanged(qreal min) | |
|
111 | 111 | Axis emits signal when \a min of axis has changed. |
|
112 | 112 | */ |
|
113 | 113 | |
@@ -116,7 +116,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
116 | 116 | Axis emits signal when \a max of axis has changed. |
|
117 | 117 | */ |
|
118 | 118 | /*! |
|
119 |
\qmlsignal LogValue |
|
|
119 | \qmlsignal LogValueAxis::onMaxChanged(qreal max) | |
|
120 | 120 | Axis emits signal when \a max of axis has changed. |
|
121 | 121 | */ |
|
122 | 122 | |
@@ -139,7 +139,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
139 | 139 | Axis emits signal when \a base of logarithm of the axis has changed. |
|
140 | 140 | */ |
|
141 | 141 | /*! |
|
142 |
\qmlsignal LogValue |
|
|
142 | \qmlsignal LogValueAxis::baseChanged(qreal base) | |
|
143 | 143 | Axis emits signal when \a base of logarithm of the axis has changed. |
|
144 | 144 | */ |
|
145 | 145 |
@@ -30,30 +30,22 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
30 | 30 | \brief The QAbstractAxis class is used for manipulating chart's axis. |
|
31 | 31 | \mainclass |
|
32 | 32 | |
|
33 | There is only one x Axis visible at the time, however there can be multiple y axes. | |
|
34 | Each chart series can be bound to exactly one Y axis and the shared common X axis. | |
|
35 | Axis can be setup to show axis line with tick marks, grid lines and shades. | |
|
33 | Each series can be bound to one or more horizontal and vertical axes, but mixing axis types | |
|
34 | that would result in different domains is not supported, such as specifying | |
|
35 | QValueAxis and QLogValueAxis on the same orientation. | |
|
36 | ||
|
37 | Properties and visibility of various axis elements such as axis line, title, labels, grid lines, | |
|
38 | and shades can be individually controlled. | |
|
36 | 39 | */ |
|
37 | 40 | |
|
38 | 41 | /*! |
|
39 | 42 | \qmlclass AbstractAxis QAbstractAxis |
|
40 | \brief The Axis element is used for manipulating chart's axes | |
|
41 | ||
|
42 | There is only one x Axis visible at the time, however there can be multiple y axes on a ChartView. | |
|
43 | Each chart series can be bound to exactly one Y axis and the shared common X axis. | |
|
44 | Axis can be setup to show axis line with tick marks, grid lines and shades. | |
|
45 | ||
|
46 | To access Axes you can use ChartView API. For example: | |
|
47 | \code | |
|
48 | ChartView { | |
|
49 | axisX.min: 0 | |
|
50 | axisX.max: 3 | |
|
51 | axisX.ticksCount: 4 | |
|
52 | axisY.min: 0 | |
|
53 | axisY.max: 4 | |
|
54 | // Add a few series... | |
|
55 | } | |
|
56 | \endcode | |
|
43 | \brief The AbstractAxis is a base element used for specialized axis elements | |
|
44 | ||
|
45 | Each series can be bound to only one horizontal and vertical axis. | |
|
46 | ||
|
47 | Properties and visibility of various axis elements such as axis line, title, labels, grid lines, | |
|
48 | and shades can be individually controlled. | |
|
57 | 49 | */ |
|
58 | 50 | |
|
59 | 51 | /*! |
@@ -249,7 +241,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
249 | 241 | */ |
|
250 | 242 | /*! |
|
251 | 243 | \qmlproperty Qt.Orientation AbstractAxis::orientation |
|
252 |
The orientation of the axis. Fixed to either Qt.Horizontal or Qt.Vertical when the axis is set to a |
|
|
244 | The orientation of the axis. Fixed to either Qt.Horizontal or Qt.Vertical when the axis is set to a series. | |
|
253 | 245 | */ |
|
254 | 246 | |
|
255 | 247 | /*! |
@@ -62,7 +62,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
62 | 62 | ValueAxis can be setup to show axis line with tick marks, grid lines and shades. |
|
63 | 63 | Values of axis are drawn to position of ticks |
|
64 | 64 | |
|
65 | To access Axes you can use ChartView API. For example: | |
|
65 | Example about using ValueAxis: | |
|
66 | 66 | \code |
|
67 | 67 | ChartView { |
|
68 | 68 | ValueAxis { |
@@ -105,7 +105,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
105 | 105 | /*! |
|
106 | 106 | \qmlproperty real ValueAxis::tickCount |
|
107 | 107 | Defines the number of ticks on the axis. This indicates how many grid lines are draw on the chart. |
|
108 | The default value is 5, and it can not be below 2. | |
|
108 | The default value is 5, and it can not be below 2. | |
|
109 | 109 | */ |
|
110 | 110 | |
|
111 | 111 | /*! |
@@ -141,11 +141,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
141 | 141 | |
|
142 | 142 | /*! |
|
143 | 143 | \fn void QValueAxis::tickCountChanged(int tickCount) |
|
144 |
Axis emits signal when \a tickCount |
|
|
144 | Axis emits signal when \a tickCount of axis has changed. | |
|
145 | 145 | */ |
|
146 | 146 | /*! |
|
147 | 147 | \qmlsignal ValueAxis::tickCountChanged(int tickCount) |
|
148 |
Axis emits signal when \a tickCount |
|
|
148 | Axis emits signal when \a tickCount of axis has changed. | |
|
149 | 149 | */ |
|
150 | 150 | |
|
151 | 151 | /*! |
@@ -159,7 +159,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
159 | 159 | */ |
|
160 | 160 | /*! |
|
161 | 161 | \qmlsignal ValueAxis::labelFormatChanged(const QString &format) |
|
162 |
|
|
|
162 | Axis emits signal when \a format of axis labels has changed. | |
|
163 | 163 | */ |
|
164 | 164 | |
|
165 | 165 | /*! |
@@ -65,7 +65,7 QHorizontalBarSeries::QHorizontalBarSeries(QObject *parent) | |||
|
65 | 65 | } |
|
66 | 66 | |
|
67 | 67 | /*! |
|
68 | Destructor | |
|
68 | Destructor. | |
|
69 | 69 | Removes series from chart. |
|
70 | 70 | */ |
|
71 | 71 | QHorizontalBarSeries::~QHorizontalBarSeries() |
@@ -70,7 +70,7 QAbstractSeries::SeriesType QHorizontalPercentBarSeries::type() const | |||
|
70 | 70 | } |
|
71 | 71 | |
|
72 | 72 | /*! |
|
73 | Destructor | |
|
73 | Destructor. | |
|
74 | 74 | Removes series from chart. |
|
75 | 75 | */ |
|
76 | 76 | QHorizontalPercentBarSeries::~QHorizontalPercentBarSeries() |
@@ -61,7 +61,7 QHorizontalStackedBarSeries::QHorizontalStackedBarSeries(QObject *parent) | |||
|
61 | 61 | } |
|
62 | 62 | |
|
63 | 63 | /*! |
|
64 | Destructor | |
|
64 | Destructor. | |
|
65 | 65 | Removes series from chart. |
|
66 | 66 | */ |
|
67 | 67 | QHorizontalStackedBarSeries::~QHorizontalStackedBarSeries() |
@@ -195,14 +195,14 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
195 | 195 | \fn void QBarSet::valuesAdded(int index, int count) |
|
196 | 196 | This signal is emitted when new values have been added to the set. |
|
197 | 197 | Parameter \a index indicates the position of the first inserted value. |
|
198 | Parameter \a count is the number of iserted values. | |
|
198 | Parameter \a count is the number of inserted values. | |
|
199 | 199 | \sa append(), insert() |
|
200 | 200 | */ |
|
201 | 201 | /*! |
|
202 | 202 | \qmlsignal BarSet::onValuesAdded(int index, int count) |
|
203 | 203 | This signal is emitted when new values have been added to the set. |
|
204 | 204 | Parameter \a index indicates the position of the first inserted value. |
|
205 | Parameter \a count is the number of iserted values. | |
|
205 | Parameter \a count is the number of inserted values. | |
|
206 | 206 | */ |
|
207 | 207 | |
|
208 | 208 | /*! |
@@ -248,7 +248,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
248 | 248 | */ |
|
249 | 249 | |
|
250 | 250 | /*! |
|
251 | Constructs QBarSet with a label of \a label and with parent of \a parent | |
|
251 | Constructs QBarSet with a label of \a label and with parent of \a parent. | |
|
252 | 252 | */ |
|
253 | 253 | QBarSet::QBarSet(const QString label, QObject *parent) |
|
254 | 254 | : QObject(parent), |
@@ -257,7 +257,7 QBarSet::QBarSet(const QString label, QObject *parent) | |||
|
257 | 257 | } |
|
258 | 258 | |
|
259 | 259 | /*! |
|
260 | Destroys the barset | |
|
260 | Destroys the barset. | |
|
261 | 261 | */ |
|
262 | 262 | QBarSet::~QBarSet() |
|
263 | 263 | { |
@@ -316,7 +316,7 QBarSet &QBarSet::operator << (const qreal &value) | |||
|
316 | 316 | |
|
317 | 317 | /*! |
|
318 | 318 | Inserts new \a value on the \a index position. |
|
319 | The value that is currently at this postion is moved to postion index + 1 | |
|
319 | The value that is currently at this postion is moved to position index + 1 | |
|
320 | 320 | \sa remove() |
|
321 | 321 | */ |
|
322 | 322 | void QBarSet::insert(const int index, const qreal value) |
@@ -338,7 +338,7 void QBarSet::remove(const int index, const int count) | |||
|
338 | 338 | } |
|
339 | 339 | |
|
340 | 340 | /*! |
|
341 | Sets a new value \a value to set, indexed by \a index | |
|
341 | Sets a new value \a value to set, indexed by \a index. | |
|
342 | 342 | */ |
|
343 | 343 | void QBarSet::replace(const int index, const qreal value) |
|
344 | 344 | { |
@@ -31,7 +31,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
31 | 31 | Horizontal model mapper is used to create a connection between QAbstractBarSeries and QAbstractItemModel derived model object. |
|
32 | 32 | Model mapper maintains equal size of all the BarSets. |
|
33 | 33 | Adding/removing value from the BarSet causes the the same change in the rest of the BarSets added to the same series. |
|
34 |
|
|
|
34 | \note Used model has to support adding/removing rows/columns and modifying the data of the cells. | |
|
35 | 35 | */ |
|
36 | 36 | /*! |
|
37 | 37 | \qmlclass HBarModelMapper QHBarModelMapper |
@@ -31,7 +31,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
31 | 31 | Vertical model mapper is used to create a connection between QAbstractBarSeries and QAbstractItemModel derived model object. |
|
32 | 32 | Model mapper maintains equal size of all the BarSets. |
|
33 | 33 | Adding/removing value from the BarSet causes the the same change in the rest of the BarSets added to the same series. |
|
34 |
|
|
|
34 | \note Used model has to support adding/removing rows/columns and modifying the data of the cells. | |
|
35 | 35 | */ |
|
36 | 36 | /*! |
|
37 | 37 | \qmlclass VBarModelMapper |
@@ -41,7 +41,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
41 | 41 | \brief Legend object |
|
42 | 42 | \mainclass |
|
43 | 43 | |
|
44 |
QLegend is a graphical object |
|
|
44 | QLegend is a graphical object for displaying the legend of the chart. Legend state is updated by QChart, when | |
|
45 | 45 | series have been changed. By default, legend is drawn by QChart, but user can set a new parent to legend and |
|
46 | 46 | handle the drawing manually. |
|
47 | 47 | User isn't supposed to create or delete legend objects, but can reference it via QChart class. |
@@ -29,7 +29,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
29 | 29 | Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series. |
|
30 | 30 | Horizontal model mapper is used to create a connection between QPieSeries and QAbstractItemModel derived model object that keeps the consecutive pie slices data in rows. |
|
31 | 31 | It is possible to use both QAbstractItemModel and QPieSeries model API. QHPieModelMapper makes sure that Pie and the model are kept in sync. |
|
32 |
|
|
|
32 | \note Used model has to support adding/removing rows/columns and modifying the data of the cells. | |
|
33 | 33 | */ |
|
34 | 34 | /*! |
|
35 | 35 | \qmlclass HPieModelMapper QHPieModelMapper |
@@ -41,7 +41,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
41 | 41 | The slices can have any values as the QPieSeries will calculate its relative value to the sum of all slices. |
|
42 | 42 | The actual slice size is determined by that relative value. |
|
43 | 43 | |
|
44 | Pie size and position on the chart is controlled by using relative values which range from 0.0 to 1.0 | |
|
44 | Pie size and position on the chart is controlled by using relative values which range from 0.0 to 1.0. | |
|
45 | 45 | These relate to the actual chart rectangle. |
|
46 | 46 | |
|
47 | 47 | By default the pie is defined as a full pie but it can also be a partial pie. |
@@ -519,7 +519,7 bool QPieSeries::remove(QPieSlice *slice) | |||
|
519 | 519 | /*! |
|
520 | 520 | Takes a single \a slice from the series. Does not destroy the slice object. |
|
521 | 521 | |
|
522 |
|
|
|
522 | \note The series remains as the slice's parent object. You must set the | |
|
523 | 523 | parent object to take full ownership. |
|
524 | 524 | |
|
525 | 525 | Returns true if take was successful. |
@@ -29,7 +29,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
29 | 29 | Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series. |
|
30 | 30 | Vertical model mapper is used to create a connection between QPieSeries and QAbstractItemModel derived model object that keeps the consecutive pie slices data in columns. |
|
31 | 31 | It is possible to use both QAbstractItemModel and QPieSeries model API. QVPieModelMapper makes sure that Pie and the model are kept in sync. |
|
32 |
|
|
|
32 | \note Used model has to support adding/removing rows/columns and modifying the data of the cells. | |
|
33 | 33 | */ |
|
34 | 34 | /*! |
|
35 | 35 | \qmlclass VPieModelMapper QVPieModelMapper |
@@ -131,7 +131,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
131 | 131 | |
|
132 | 132 | /*! |
|
133 | 133 | \internal |
|
134 |
\brief Constructs |
|
|
134 | \brief Constructs QAbstractSeries object with \a parent. | |
|
135 | 135 | */ |
|
136 | 136 | QAbstractSeries::QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent) : |
|
137 | 137 | QObject(parent), |
@@ -145,7 +145,7 QAbstractSeries::QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent) : | |||
|
145 | 145 | QAbstractSeries::~QAbstractSeries() |
|
146 | 146 | { |
|
147 | 147 | if (d_ptr->m_chart) |
|
148 |
qFatal("Still b |
|
|
148 | qFatal("Series still bound to a chart when destroyed!"); | |
|
149 | 149 | } |
|
150 | 150 | |
|
151 | 151 | void QAbstractSeries::setName(const QString &name) |
@@ -161,9 +161,6 QString QAbstractSeries::name() const | |||
|
161 | 161 | return d_ptr->m_name; |
|
162 | 162 | } |
|
163 | 163 | |
|
164 | /*! | |
|
165 | Sets the visibility of series to \a visible | |
|
166 | */ | |
|
167 | 164 | void QAbstractSeries::setVisible(bool visible) |
|
168 | 165 | { |
|
169 | 166 | if (visible != d_ptr->m_visible) { |
@@ -172,9 +169,6 void QAbstractSeries::setVisible(bool visible) | |||
|
172 | 169 | } |
|
173 | 170 | } |
|
174 | 171 | |
|
175 | /*! | |
|
176 | Returns the visibility of series | |
|
177 | */ | |
|
178 | 172 | bool QAbstractSeries::isVisible() const |
|
179 | 173 | { |
|
180 | 174 | return d_ptr->m_visible; |
@@ -73,10 +73,10 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
73 | 73 | \brief QtCommercial chart API. |
|
74 | 74 | |
|
75 | 75 | QChart is a QGraphicsWidget that you can show in a QGraphicsScene. It manages the graphical |
|
76 | representation of different types of series and other chart related objects like | |
|
77 |
|
|
|
76 | representation of different types of series and other chart related objects like legend and | |
|
77 | axes. If you simply want to show a chart in a layout, you can use the | |
|
78 | 78 | convenience class QChartView instead of QChart. |
|
79 | \sa QChartView | |
|
79 | \sa QChartView, QPolarChart | |
|
80 | 80 | */ |
|
81 | 81 | |
|
82 | 82 | /*! |
@@ -86,7 +86,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
86 | 86 | |
|
87 | 87 | /*! |
|
88 | 88 | \property QChart::backgroundVisible |
|
89 |
|
|
|
89 | Specifies whether the chart background is visible or not. | |
|
90 | 90 | \sa setBackgroundBrush(), setBackgroundPen() |
|
91 | 91 | */ |
|
92 | 92 | |
@@ -99,19 +99,22 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
99 | 99 | /*! |
|
100 | 100 | \property QChart::minimumMargins |
|
101 | 101 | Minimum margins between the plot area (axes) and the edge of the chart widget. |
|
102 | This property is deprecated; use margins property instead. | |
|
103 | ||
|
104 | \sa margins | |
|
102 | 105 | */ |
|
103 | 106 | |
|
104 | 107 | /*! |
|
105 | 108 | \property QChart::margins |
|
106 |
M |
|
|
109 | Margins between the plot area (axes) and the edge of the chart widget. | |
|
107 | 110 | */ |
|
108 | 111 | |
|
109 | 112 | /*! |
|
110 | 113 | \property QChart::theme |
|
111 | 114 | Theme is a built-in collection of UI style related settings applied for all visual elements of a chart, like colors, |
|
112 | pens, brushes and fonts of series, axes, title and legend. \l {Chart themes demo} shows an example with a few | |
|
115 | pens, brushes, and fonts of series, axes, title, and legend. \l {Chart themes demo} shows an example with a few | |
|
113 | 116 | different themes. |
|
114 |
|
|
|
117 | \note Changing the theme will overwrite all customizations previously applied to the series. | |
|
115 | 118 | */ |
|
116 | 119 | |
|
117 | 120 | /*! |
@@ -122,7 +125,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
122 | 125 | /*! |
|
123 | 126 | \property QChart::chartType |
|
124 | 127 | Chart type indicates if the chart is a cartesian chart or a polar chart. |
|
125 | This property is set internally and is read only. | |
|
128 | This property is set internally and it is read only. | |
|
126 | 129 | \sa QPolarChart |
|
127 | 130 | */ |
|
128 | 131 | |
@@ -151,7 +154,7 QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) | |||
|
151 | 154 | } |
|
152 | 155 | |
|
153 | 156 | /*! |
|
154 |
Destroys the object and it |
|
|
157 | Destroys the chart object and its children, like series and axis objects added to it. | |
|
155 | 158 | */ |
|
156 | 159 | QChart::~QChart() |
|
157 | 160 | { |
@@ -161,11 +164,16 QChart::~QChart() | |||
|
161 | 164 | } |
|
162 | 165 | |
|
163 | 166 | /*! |
|
164 |
Adds the \a series onto the chart and takes the ownership of |
|
|
165 | If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and | |
|
166 | the y axis). | |
|
167 | Adds the \a series onto the chart and takes the ownership of it. | |
|
168 | ||
|
169 | \note A newly added series is attached to no axes by default, including any axes that were created for the chart | |
|
170 | using createDefaultAxes() before the series was added to the chart. If no axes are attached to | |
|
171 | the newly added series before the chart is shown, the series will get drawn as if it had axes with ranges | |
|
172 | that exactly fit the series to the plot area of the chart. This can be confusing if the same chart also displays other | |
|
173 | series that have properly attached axes, so always make sure you either call createDefaultAxes() after | |
|
174 | a series has been added or explicitly attach axes for the series. | |
|
167 | 175 | |
|
168 | \sa removeSeries(), removeAllSeries() | |
|
176 | \sa removeSeries(), removeAllSeries(), createDefaultAxes(), QAbstractSeries::attachAxis() | |
|
169 | 177 | */ |
|
170 | 178 | void QChart::addSeries(QAbstractSeries *series) |
|
171 | 179 | { |
@@ -174,9 +182,9 void QChart::addSeries(QAbstractSeries *series) | |||
|
174 | 182 | } |
|
175 | 183 | |
|
176 | 184 | /*! |
|
177 |
Removes the \a series |
|
|
178 |
|
|
|
179 | It does not delete the pointed QChartSeries data object | |
|
185 | Removes the \a series from the chart. | |
|
186 | The chart releases its ownership of the specified \a series object. | |
|
187 | ||
|
180 | 188 | \sa addSeries(), removeAllSeries() |
|
181 | 189 | */ |
|
182 | 190 | void QChart::removeSeries(QAbstractSeries *series) |
@@ -186,8 +194,8 void QChart::removeSeries(QAbstractSeries *series) | |||
|
186 | 194 | } |
|
187 | 195 | |
|
188 | 196 | /*! |
|
189 |
Removes a |
|
|
190 | It also deletes the pointed QChartSeries data objects | |
|
197 | Removes and deletes all series objects that have been added to the chart. | |
|
198 | ||
|
191 | 199 | \sa addSeries(), removeSeries() |
|
192 | 200 | */ |
|
193 | 201 | void QChart::removeAllSeries() |
@@ -207,7 +215,7 void QChart::setBackgroundBrush(const QBrush &brush) | |||
|
207 | 215 | } |
|
208 | 216 | |
|
209 | 217 | /*! |
|
210 |
|
|
|
218 | Gets the brush that is used for painting the background of the chart area. | |
|
211 | 219 | */ |
|
212 | 220 | QBrush QChart::backgroundBrush() const |
|
213 | 221 | { |
@@ -223,31 +231,25 void QChart::setBackgroundPen(const QPen &pen) | |||
|
223 | 231 | } |
|
224 | 232 | |
|
225 | 233 | /*! |
|
226 |
|
|
|
234 | Gets the pen that is used for painting the background of the chart area. | |
|
227 | 235 | */ |
|
228 | 236 | QPen QChart::backgroundPen() const |
|
229 | 237 | { |
|
230 | 238 | return d_ptr->m_presenter->backgroundPen(); |
|
231 | 239 | } |
|
232 | 240 | |
|
233 | /*! | |
|
234 | Sets the chart \a title. The description text that is drawn above the chart. | |
|
235 | */ | |
|
236 | 241 | void QChart::setTitle(const QString &title) |
|
237 | 242 | { |
|
238 | 243 | d_ptr->m_presenter->setTitle(title); |
|
239 | 244 | } |
|
240 | 245 | |
|
241 | /*! | |
|
242 | Returns the chart title. The description text that is drawn above the chart. | |
|
243 | */ | |
|
244 | 246 | QString QChart::title() const |
|
245 | 247 | { |
|
246 | 248 | return d_ptr->m_presenter->title(); |
|
247 | 249 | } |
|
248 | 250 | |
|
249 | 251 | /*! |
|
250 |
Sets the \a font that is used for drawing the chart |
|
|
252 | Sets the \a font that is used for drawing the chart title. | |
|
251 | 253 | */ |
|
252 | 254 | void QChart::setTitleFont(const QFont &font) |
|
253 | 255 | { |
@@ -255,7 +257,7 void QChart::setTitleFont(const QFont &font) | |||
|
255 | 257 | } |
|
256 | 258 | |
|
257 | 259 | /*! |
|
258 |
|
|
|
260 | Gets the font that is used for drawing the chart title. | |
|
259 | 261 | */ |
|
260 | 262 | QFont QChart::titleFont() const |
|
261 | 263 | { |
@@ -263,7 +265,7 QFont QChart::titleFont() const | |||
|
263 | 265 | } |
|
264 | 266 | |
|
265 | 267 | /*! |
|
266 |
Sets the \a brush used for |
|
|
268 | Sets the \a brush used for drawing the title text. | |
|
267 | 269 | */ |
|
268 | 270 | void QChart::setTitleBrush(const QBrush &brush) |
|
269 | 271 | { |
@@ -271,7 +273,7 void QChart::setTitleBrush(const QBrush &brush) | |||
|
271 | 273 | } |
|
272 | 274 | |
|
273 | 275 | /*! |
|
274 |
Returns the brush used for |
|
|
276 | Returns the brush used for drawing the title text. | |
|
275 | 277 | */ |
|
276 | 278 | QBrush QChart::titleBrush() const |
|
277 | 279 | { |
@@ -289,7 +291,7 QChart::ChartTheme QChart::theme() const | |||
|
289 | 291 | } |
|
290 | 292 | |
|
291 | 293 | /*! |
|
292 |
Zooms in the view by a factor of |
|
|
294 | Zooms in the view by a factor of two. | |
|
293 | 295 | */ |
|
294 | 296 | void QChart::zoomIn() |
|
295 | 297 | { |
@@ -308,7 +310,7 void QChart::zoomIn(const QRectF &rect) | |||
|
308 | 310 | } |
|
309 | 311 | |
|
310 | 312 | /*! |
|
311 | Restores the view zoom level to the previous one. | |
|
313 | Zooms out the view by a factor of two. | |
|
312 | 314 | */ |
|
313 | 315 | void QChart::zoomOut() |
|
314 | 316 | { |
@@ -316,7 +318,7 void QChart::zoomOut() | |||
|
316 | 318 | } |
|
317 | 319 | |
|
318 | 320 | /*! |
|
319 | Zooms in the view by a \a factor. | |
|
321 | Zooms in the view by a custom \a factor. | |
|
320 | 322 | |
|
321 | 323 | A factor over 1.0 zooms the view in and factor between 0.0 and 1.0 zooms out. |
|
322 | 324 | */ |
@@ -338,8 +340,10 void QChart::zoom(qreal factor) | |||
|
338 | 340 | } |
|
339 | 341 | |
|
340 | 342 | /*! |
|
341 |
Returns |
|
|
342 | If no series is provided then pointer to currently visible axis is provided. | |
|
343 | Returns a pointer to the horizontal axis attached to the specified \a series. | |
|
344 | If no \a series is specified, the first horizontal axis added to the chart is returned. | |
|
345 | ||
|
346 | \sa addAxis(), QAbstractSeries::attachAxis() | |
|
343 | 347 | */ |
|
344 | 348 | QAbstractAxis *QChart::axisX(QAbstractSeries *series) const |
|
345 | 349 | { |
@@ -350,8 +354,10 QAbstractAxis *QChart::axisX(QAbstractSeries *series) const | |||
|
350 | 354 | } |
|
351 | 355 | |
|
352 | 356 | /*! |
|
353 |
Returns |
|
|
354 | If no series is provided then pointer to currently visible axis is provided. | |
|
357 | Returns a pointer to the vertical axis attached to the specified \a series. | |
|
358 | If no \a series is specified, the first vertical axis added to the chart is returned. | |
|
359 | ||
|
360 | \sa addAxis(), QAbstractSeries::attachAxis() | |
|
355 | 361 | */ |
|
356 | 362 | QAbstractAxis *QChart::axisY(QAbstractSeries *series) const |
|
357 | 363 | { |
@@ -362,8 +368,8 QAbstractAxis *QChart::axisY(QAbstractSeries *series) const | |||
|
362 | 368 | } |
|
363 | 369 | |
|
364 | 370 | /*! |
|
365 |
Returns the axes a |
|
|
366 | specified orientation are returned. | |
|
371 | Returns the axes attached to the \a series with \a orientation. If no \a series is provided, | |
|
372 | then all axes added to the chart with the specified orientation are returned. | |
|
367 | 373 | \sa addAxis(), createDefaultAxes() |
|
368 | 374 | */ |
|
369 | 375 | QList<QAbstractAxis *> QChart::axes(Qt::Orientations orientation, QAbstractSeries *series) const |
@@ -386,11 +392,15 QList<QAbstractAxis *> QChart::axes(Qt::Orientations orientation, QAbstractSerie | |||
|
386 | 392 | } |
|
387 | 393 | |
|
388 | 394 | /*! |
|
389 | NOTICE: This function has to be called after series has been added to the chart if no customized axes are set to the chart. Otherwise axisX(), axisY() calls return NULL. | |
|
395 | Creates axes for the chart based on the series that have already been added to the chart. Any axes previously added to | |
|
396 | the chart will be deleted. | |
|
390 | 397 | |
|
391 | Creates the axes for the chart based on the series that has already been added to the chart. | |
|
398 | \note This function has to be called after all series have been added to the chart. The axes created by this function | |
|
399 | will NOT get automatically attached to any series added to the chart after this function has been called. | |
|
400 | A series with no axes attached will by default scale to utilize the entire plot area of the chart, which can be confusing | |
|
401 | if there are other series with properly attached axes also present. | |
|
392 | 402 | |
|
393 | \table | |
|
403 | \table | |
|
394 | 404 | \header |
|
395 | 405 | \o Series type |
|
396 | 406 | \o X-axis |
@@ -407,17 +417,15 QList<QAbstractAxis *> QChart::axes(Qt::Orientations orientation, QAbstractSerie | |||
|
407 | 417 | \o QPieSeries |
|
408 | 418 | \o None |
|
409 | 419 | \o None |
|
410 |
|
|
|
420 | \endtable | |
|
411 | 421 | |
|
412 |
If there are several QXYSeries derived series added to the chart and no |
|
|
413 |
If there are sev |
|
|
422 | If there are several QXYSeries derived series added to the chart and no series of other types have been added, then only one pair of axes is created. | |
|
423 | If there are several series of different types added to the chart, then each series gets its own axes pair. | |
|
414 | 424 | |
|
415 | NOTICE: if there is more than one x and y axes created then no axis is drawn by default and one needs to choose explicitly which axis should be shown. | |
|
416 | ||
|
417 | Axis specifix to the series can be later obtained from the chart by providing the series as the parameter of axisX(), axisY() function calls. | |
|
425 | The axes specific to the series can be later obtained from the chart by providing the series as the parameter for axes() function call. | |
|
418 | 426 | QPieSeries does not create any axes. |
|
419 | 427 | |
|
420 | \sa axisX(), axisY(), setAxisX(), setAxisY() | |
|
428 | \sa axisX(), axisY(), axes(), setAxisX(), setAxisY(), QAbstractSeries::attachAxis() | |
|
421 | 429 | */ |
|
422 | 430 | void QChart::createDefaultAxes() |
|
423 | 431 | { |
@@ -425,46 +433,30 void QChart::createDefaultAxes() | |||
|
425 | 433 | } |
|
426 | 434 | |
|
427 | 435 | /*! |
|
428 |
Returns the legend object of the chart. Ownership stays |
|
|
436 | Returns the legend object of the chart. Ownership stays with the chart. | |
|
429 | 437 | */ |
|
430 | 438 | QLegend *QChart::legend() const |
|
431 | 439 | { |
|
432 | 440 | return d_ptr->m_legend; |
|
433 | 441 | } |
|
434 | 442 | |
|
435 | /*! | |
|
436 | Sets the minimum \a margins between the plot area (axes) and the edge of the chart widget. | |
|
437 | Deprecated. Use setMargins(). | |
|
438 | */ | |
|
439 | 443 | void QChart::setMinimumMargins(const QMargins &margins) |
|
440 | 444 | { |
|
441 | 445 | qWarning() << "QChart::setMinimumMargins is deprecated. Use QChart::setMargins instead."; |
|
442 | 446 | d_ptr->m_presenter->layout()->setMargins(margins); |
|
443 | 447 | } |
|
444 | 448 | |
|
445 | /*! | |
|
446 | Returns the rect that contains information about margins (distance between chart widget edge and axes). | |
|
447 | Individual margins can be obtained by calling left, top, right, bottom on the returned rect. | |
|
448 | Deprecated. Use margins(). | |
|
449 | */ | |
|
450 | 449 | QMargins QChart::minimumMargins() const |
|
451 | 450 | { |
|
452 | 451 | qWarning() << "QChart::minimumMargins is deprecated. Use QChart::margins instead."; |
|
453 | 452 | return d_ptr->m_presenter->layout()->margins(); |
|
454 | 453 | } |
|
455 | 454 | |
|
456 | /*! | |
|
457 | Sets the minimum \a margins between the plot area (axes) and the edge of the chart widget. | |
|
458 | */ | |
|
459 | 455 | void QChart::setMargins(const QMargins &margins) |
|
460 | 456 | { |
|
461 | 457 | d_ptr->m_presenter->layout()->setMargins(margins); |
|
462 | 458 | } |
|
463 | 459 | |
|
464 | /*! | |
|
465 | Returns the rect that contains information about margins (distance between chart widget edge and axes). | |
|
466 | Individual margins can be obtained by calling left, top, right, bottom on the returned rect. | |
|
467 | */ | |
|
468 | 460 | QMargins QChart::margins() const |
|
469 | 461 | { |
|
470 | 462 | return d_ptr->m_presenter->layout()->margins(); |
@@ -476,26 +468,14 QChart::ChartType QChart::chartType() const | |||
|
476 | 468 | } |
|
477 | 469 | |
|
478 | 470 | /*! |
|
479 | Returns the the rect within which the drawing of the chart is done. | |
|
480 |
It does not include the area define |
|
|
471 | Returns the the rectangle within which the drawing of the chart is done. | |
|
472 | It does not include the area defined by margins. | |
|
481 | 473 | */ |
|
482 | 474 | QRectF QChart::plotArea() const |
|
483 | 475 | { |
|
484 | 476 | return d_ptr->m_presenter->geometry(); |
|
485 | 477 | } |
|
486 | 478 | |
|
487 | ///*! | |
|
488 | // TODO: Dummy. | |
|
489 | // Adjust the ranges of the axes so that all the data of the specified \a series is visible | |
|
490 | // */ | |
|
491 | //void QChart::adjustViewToSeries(QAbstractSeries* series) | |
|
492 | //{ | |
|
493 | // // | |
|
494 | //} | |
|
495 | ||
|
496 | /*! | |
|
497 | Sets animation \a options for the chart | |
|
498 | */ | |
|
499 | 479 | void QChart::setAnimationOptions(AnimationOptions options) |
|
500 | 480 | { |
|
501 | 481 | d_ptr->m_presenter->setAnimationOptions(options); |
@@ -537,7 +517,7 bool QChart::isDropShadowEnabled() const | |||
|
537 | 517 | } |
|
538 | 518 | |
|
539 | 519 | /*! |
|
540 |
Returns all |
|
|
520 | Returns all series that are added to the chart. | |
|
541 | 521 | |
|
542 | 522 | \sa addSeries(), removeSeries(), removeAllSeries() |
|
543 | 523 | */ |
@@ -547,45 +527,50 QList<QAbstractSeries *> QChart::series() const | |||
|
547 | 527 | } |
|
548 | 528 | |
|
549 | 529 | /*! |
|
550 | Sets \a axis to the chart, which will control the presentation of the \a series | |
|
530 | Adds the \a axis to the chart and attaches it to the \a series as a bottom-aligned horizontal axis. | |
|
531 | The chart takes ownership of both the \a axis and the \a series. | |
|
532 | Any horizontal axes previously attached to the \a series are deleted. | |
|
551 | 533 | |
|
552 |
|
|
|
534 | \sa axisX(), axisY(), setAxisY(), createDefaultAxes(), QAbstractSeries::attachAxis() | |
|
553 | 535 | */ |
|
554 |
void QChart::setAxisX(QAbstractAxis *axis , |
|
|
536 | void QChart::setAxisX(QAbstractAxis *axis ,QAbstractSeries *series) | |
|
555 | 537 | { |
|
556 | QList<QAbstractAxis*> list = axes(Qt::Horizontal,series); | |
|
538 | QList<QAbstractAxis*> list = axes(Qt::Horizontal, series); | |
|
557 | 539 | |
|
558 | foreach(QAbstractAxis* a, list){ | |
|
540 | foreach (QAbstractAxis* a, list) { | |
|
559 | 541 | d_ptr->m_dataset->removeAxis(a); |
|
560 | 542 | delete a; |
|
561 | 543 | } |
|
562 | 544 | |
|
563 | if(!d_ptr->m_dataset->axes().contains(axis)) | |
|
564 | d_ptr->m_dataset->addAxis(axis,Qt::AlignBottom); | |
|
565 | d_ptr->m_dataset->attachAxis(series,axis); | |
|
545 | if (!d_ptr->m_dataset->axes().contains(axis)) | |
|
546 | d_ptr->m_dataset->addAxis(axis, Qt::AlignBottom); | |
|
547 | d_ptr->m_dataset->attachAxis(series, axis); | |
|
566 | 548 | } |
|
567 | 549 | |
|
568 | 550 | /*! |
|
569 | Sets \a axis to the chart, which will control the presentation of the \a series | |
|
551 | Adds the \a axis to the chart and attaches it to the \a series as a left-aligned vertical axis. | |
|
552 | The chart takes ownership of both the \a axis and the \a series. | |
|
553 | Any vertical axes previously attached to the \a series are deleted. | |
|
570 | 554 | |
|
571 |
|
|
|
555 | \sa axisX(), axisY(), setAxisX(), createDefaultAxes(), QAbstractSeries::attachAxis() | |
|
572 | 556 | */ |
|
573 |
void QChart::setAxisY(QAbstractAxis *axis , |
|
|
557 | void QChart::setAxisY(QAbstractAxis *axis ,QAbstractSeries *series) | |
|
574 | 558 | { |
|
575 | QList<QAbstractAxis*> list = axes(Qt::Vertical,series); | |
|
559 | QList<QAbstractAxis*> list = axes(Qt::Vertical, series); | |
|
576 | 560 | |
|
577 | foreach(QAbstractAxis* a, list) { | |
|
561 | foreach (QAbstractAxis* a, list) { | |
|
578 | 562 | d_ptr->m_dataset->removeAxis(a); |
|
579 | 563 | delete a; |
|
580 | 564 | } |
|
581 | 565 | |
|
582 | if(!d_ptr->m_dataset->axes().contains(axis)) | |
|
583 | d_ptr->m_dataset->addAxis(axis,Qt::AlignLeft); | |
|
584 | d_ptr->m_dataset->attachAxis(series,axis); | |
|
566 | if (!d_ptr->m_dataset->axes().contains(axis)) | |
|
567 | d_ptr->m_dataset->addAxis(axis, Qt::AlignLeft); | |
|
568 | d_ptr->m_dataset->attachAxis(series, axis); | |
|
585 | 569 | } |
|
586 | 570 | |
|
587 | 571 | /*! |
|
588 | Adds \a axis to the chart with \a alignment. The chart takes the ownership of the axis. | |
|
572 | Adds the \a axis to the chart with \a alignment. The chart takes the ownership of the axis. | |
|
573 | ||
|
589 | 574 | \sa removeAxis(), createDefaultAxes(), QAbstractSeries::attachAxis() |
|
590 | 575 | */ |
|
591 | 576 | void QChart::addAxis(QAbstractAxis *axis, Qt::Alignment alignment) |
@@ -594,7 +579,9 void QChart::addAxis(QAbstractAxis *axis, Qt::Alignment alignment) | |||
|
594 | 579 | } |
|
595 | 580 | |
|
596 | 581 | /*! |
|
597 | Removes \a axis from the chart. The ownership is returned to the caller. | |
|
582 | Removes the \a axis from the chart. | |
|
583 | The chart releases its ownership of the specified \a axis object. | |
|
584 | ||
|
598 | 585 | \sa addAxis(), createDefaultAxes(), QAbstractSeries::detachAxis() |
|
599 | 586 | */ |
|
600 | 587 | void QChart::removeAxis(QAbstractAxis *axis) |
@@ -603,7 +590,7 void QChart::removeAxis(QAbstractAxis *axis) | |||
|
603 | 590 | } |
|
604 | 591 | |
|
605 | 592 | /*! |
|
606 |
Returns the value in the \a series domain that corresponds to the |
|
|
593 | Returns the value in the \a series domain that corresponds to the \a position relative to chart widget. | |
|
607 | 594 | */ |
|
608 | 595 | QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series) |
|
609 | 596 | { |
@@ -611,7 +598,7 QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series) | |||
|
611 | 598 | } |
|
612 | 599 | |
|
613 | 600 | /*! |
|
614 |
Returns the position on the chart |
|
|
601 | Returns the position on the chart widget that corresponds to the \a value in the \a series domain. | |
|
615 | 602 | */ |
|
616 | 603 | QPointF QChart::mapToPosition(const QPointF &value, QAbstractSeries *series) |
|
617 | 604 | { |
@@ -640,7 +627,6 QChartPrivate::QChartPrivate(QChart *q, QChart::ChartType type): | |||
|
640 | 627 | |
|
641 | 628 | QChartPrivate::~QChartPrivate() |
|
642 | 629 | { |
|
643 | ||
|
644 | 630 | } |
|
645 | 631 | |
|
646 | 632 | void QChartPrivate::init() |
@@ -40,11 +40,10 | |||
|
40 | 40 | \brief Standalone charting widget. |
|
41 | 41 | |
|
42 | 42 | QChartView is a standalone widget that can display charts. It does not require separate |
|
43 | QGraphicsScene to work. It manages the graphical representation of different types of | |
|
44 | series and other chart related objects like QAxis and QLegend. If you want to | |
|
45 | display a chart in your existing QGraphicsScene, you can use the QChart class instead. | |
|
43 | QGraphicsScene to work. If you want to display a chart in your existing QGraphicsScene, | |
|
44 | you need to use the QChart (or QPolarChart) class instead. | |
|
46 | 45 | |
|
47 | \sa QChart | |
|
46 | \sa QChart, QPolarChart | |
|
48 | 47 | */ |
|
49 | 48 | |
|
50 | 49 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
@@ -61,7 +60,8 QChartView::QChartView(QWidget *parent) | |||
|
61 | 60 | } |
|
62 | 61 | |
|
63 | 62 | /*! |
|
64 |
Constructs a chart |
|
|
63 | Constructs a chartview object with parent \a parent to display a \a chart. | |
|
64 | Ownership of the \a chart is passed to chartview. | |
|
65 | 65 | */ |
|
66 | 66 | |
|
67 | 67 | QChartView::QChartView(QChart *chart, QWidget *parent) |
@@ -73,14 +73,14 QChartView::QChartView(QChart *chart, QWidget *parent) | |||
|
73 | 73 | |
|
74 | 74 | |
|
75 | 75 | /*! |
|
76 | Destroys the object and it's children, like series and axis objects added to it. | |
|
76 | Destroys the chartview object and the associated chart. | |
|
77 | 77 | */ |
|
78 | 78 | QChartView::~QChartView() |
|
79 | 79 | { |
|
80 | 80 | } |
|
81 | 81 | |
|
82 | 82 | /*! |
|
83 | Returns the pointer to the associated chart | |
|
83 | Returns the pointer to the associated chart. | |
|
84 | 84 | */ |
|
85 | 85 | QChart *QChartView::chart() const |
|
86 | 86 | { |
@@ -91,7 +91,7 QChart *QChartView::chart() const | |||
|
91 | 91 | Sets the current chart to \a chart. Ownership of the new chart is passed to chartview |
|
92 | 92 | and ownership of the previous chart is released. |
|
93 | 93 | |
|
94 |
To avoid memory leaks users need |
|
|
94 | To avoid memory leaks users need to make sure the previous chart is deleted. | |
|
95 | 95 | */ |
|
96 | 96 | |
|
97 | 97 | void QChartView::setChart(QChart *chart) |
@@ -100,7 +100,10 void QChartView::setChart(QChart *chart) | |||
|
100 | 100 | } |
|
101 | 101 | |
|
102 | 102 | /*! |
|
103 | Sets the RubberBandPlicy to \a rubberBand. Selected policy determines the way zooming is performed. | |
|
103 | Sets the rubber band flags to \a rubberBand. | |
|
104 | Selected flags determine the way zooming is performed. | |
|
105 | ||
|
106 | \note Rubber band zooming is not supported for polar charts. | |
|
104 | 107 | */ |
|
105 | 108 | void QChartView::setRubberBand(const RubberBands &rubberBand) |
|
106 | 109 | { |
@@ -119,7 +122,7 void QChartView::setRubberBand(const RubberBands &rubberBand) | |||
|
119 | 122 | } |
|
120 | 123 | |
|
121 | 124 | /*! |
|
122 |
Returns the |
|
|
125 | Returns the rubber band flags that are currently being used by the widget. | |
|
123 | 126 | */ |
|
124 | 127 | QChartView::RubberBands QChartView::rubberBand() const |
|
125 | 128 | { |
@@ -127,8 +130,8 QChartView::RubberBands QChartView::rubberBand() const | |||
|
127 | 130 | } |
|
128 | 131 | |
|
129 | 132 | /*! |
|
130 |
If Left mouse button is pressed and the |
|
|
131 |
If different mouse button is pressed and/or the |
|
|
133 | If Left mouse button is pressed and the rubber band is enabled the \a event is accepted and the rubber band is displayed on the screen allowing the user to select the zoom area. | |
|
134 | If different mouse button is pressed and/or the rubber band is disabled then the \a event is passed to QGraphicsView::mousePressEvent() implementation. | |
|
132 | 135 | */ |
|
133 | 136 | void QChartView::mousePressEvent(QMouseEvent *event) |
|
134 | 137 | { |
@@ -148,8 +151,8 void QChartView::mousePressEvent(QMouseEvent *event) | |||
|
148 | 151 | } |
|
149 | 152 | |
|
150 | 153 | /*! |
|
151 |
If |
|
|
152 |
|
|
|
154 | If the rubber band rectange has been displayed in pressEvent then \a event data is used to update the rubber band geometry. | |
|
155 | Otherwise the default QGraphicsView::mouseMoveEvent implementation is called. | |
|
153 | 156 | */ |
|
154 | 157 | void QChartView::mouseMoveEvent(QMouseEvent *event) |
|
155 | 158 | { |
@@ -172,8 +175,9 void QChartView::mouseMoveEvent(QMouseEvent *event) | |||
|
172 | 175 | } |
|
173 | 176 | |
|
174 | 177 | /*! |
|
175 |
If left mouse button is release |
|
|
176 | If it is the right mouse button \a event then RubberBand is dissmissed and zoom is canceled. | |
|
178 | If left mouse button is released and the rubber band is enabled then \a event is accepted and | |
|
179 | the view is zoomed into the rect specified by the rubber band. | |
|
180 | If it is a right mouse button \a event then the rubber band is dismissed and the zoom is canceled. | |
|
177 | 181 | */ |
|
178 | 182 | void QChartView::mouseReleaseEvent(QMouseEvent *event) |
|
179 | 183 | { |
@@ -235,7 +239,6 QChartViewPrivate::QChartViewPrivate(QChartView *q, QChart *chart) | |||
|
235 | 239 | |
|
236 | 240 | QChartViewPrivate::~QChartViewPrivate() |
|
237 | 241 | { |
|
238 | ||
|
239 | 242 | } |
|
240 | 243 | |
|
241 | 244 | void QChartViewPrivate::setChart(QChart *chart) |
@@ -26,7 +26,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
26 | 26 | /*! |
|
27 | 27 | \enum QPolarChart::PolarOrientation |
|
28 | 28 | |
|
29 |
This type is used to s |
|
|
29 | This type is used to specify the polar orientation of an axis. | |
|
30 | 30 | |
|
31 | 31 | \value PolarOrientationRadial |
|
32 | 32 | \value PolarOrientationAngular |
@@ -46,7 +46,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
46 | 46 | |
|
47 | 47 | \note If the angular distance between two consecutive points in a series is more than 180 degrees, |
|
48 | 48 | any line connecting the two points becomes meaningless, so choose the axis ranges accordingly |
|
49 | when displaying line, spline, or area series. | |
|
49 | when displaying line, spline, or area series. In such case series don't draw a direct line between | |
|
50 | the two points, but instead draw a line to and from the center of the chart. | |
|
50 | 51 | |
|
51 | 52 | \note Polar charts do not support multiple axes of same orientation. |
|
52 | 53 | |
@@ -54,7 +55,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
54 | 55 | */ |
|
55 | 56 | |
|
56 | 57 | /*! |
|
57 |
Constructs a polar chart as a child of |
|
|
58 | Constructs a polar chart as a child of the \a parent. | |
|
58 | 59 | Parameter \a wFlags is passed to the QChart constructor. |
|
59 | 60 | */ |
|
60 | 61 | QPolarChart::QPolarChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) |
@@ -63,7 +64,7 QPolarChart::QPolarChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) | |||
|
63 | 64 | } |
|
64 | 65 | |
|
65 | 66 | /*! |
|
66 |
Destroys the object and it |
|
|
67 | Destroys the polar chart object and its children, like series and axis objects added to it. | |
|
67 | 68 | */ |
|
68 | 69 | QPolarChart::~QPolarChart() |
|
69 | 70 | { |
@@ -72,6 +73,7 QPolarChart::~QPolarChart() | |||
|
72 | 73 | /*! |
|
73 | 74 | Returns the axes added for the \a series with \a polarOrientation. If no series is provided, then any axis with the |
|
74 | 75 | specified polar orientation is returned. |
|
76 | ||
|
75 | 77 | \sa addAxis() |
|
76 | 78 | */ |
|
77 | 79 | QList<QAbstractAxis *> QPolarChart::axes(PolarOrientations polarOrientation, QAbstractSeries *series) const |
@@ -92,6 +94,7 QList<QAbstractAxis *> QPolarChart::axes(PolarOrientations polarOrientation, QAb | |||
|
92 | 94 | \note Axes can be added to a polar chart also with QChart::addAxis() instead of this method. |
|
93 | 95 | The specified alignment determines the polar orientation: horizontal alignments indicate angular |
|
94 | 96 | axis and vertical alignments indicate radial axis. |
|
97 | ||
|
95 | 98 | \sa QChart::removeAxis(), QChart::createDefaultAxes(), QAbstractSeries::attachAxis(), QChart::addAxis() |
|
96 | 99 | */ |
|
97 | 100 | void QPolarChart::addAxis(QAbstractAxis *axis, PolarOrientation polarOrientation) |
@@ -83,7 +83,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
83 | 83 | |
|
84 | 84 | /*! |
|
85 | 85 | Constructs empty series object which is a child of \a parent. |
|
86 |
When series object is added to |
|
|
86 | When series object is added to a QChart instance then the ownerships is transferred. | |
|
87 | 87 | */ |
|
88 | 88 | |
|
89 | 89 | QSplineSeries::QSplineSeries(QObject *parent) |
@@ -154,7 +154,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
154 | 154 | |
|
155 | 155 | /*! |
|
156 | 156 | \fn void QXYSeries::pointsReplaced() |
|
157 |
Signal is emitted when all points have been replaced with |
|
|
157 | Signal is emitted when all points have been replaced with other points. | |
|
158 | 158 | \sa replace() |
|
159 | 159 | */ |
|
160 | 160 | /*! |
@@ -226,7 +226,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
226 | 226 | \internal |
|
227 | 227 | |
|
228 | 228 | Constructs empty series object which is a child of \a parent. |
|
229 |
When series object is added to QChart |
|
|
229 | When series object is added to QChart instance ownerships is transferred. | |
|
230 | 230 | */ |
|
231 | 231 | QXYSeries::QXYSeries(QXYSeriesPrivate &d, QObject *parent) |
|
232 | 232 | : QAbstractSeries(d, parent) |
@@ -234,15 +234,15 QXYSeries::QXYSeries(QXYSeriesPrivate &d, QObject *parent) | |||
|
234 | 234 | } |
|
235 | 235 | |
|
236 | 236 | /*! |
|
237 |
Destroys the object. Series added to QChart |
|
|
238 |
and are de |
|
|
237 | Destroys the object. Series added to QChart instances are owned by those, | |
|
238 | and are destroyed when QChart instances are destroyed. | |
|
239 | 239 | */ |
|
240 | 240 | QXYSeries::~QXYSeries() |
|
241 | 241 | { |
|
242 | 242 | } |
|
243 | 243 | |
|
244 | 244 | /*! |
|
245 |
Adds data point \a x \a y to the series. |
|
|
245 | Adds data point (\a x, \a y) to the series. | |
|
246 | 246 | */ |
|
247 | 247 | void QXYSeries::append(qreal x, qreal y) |
|
248 | 248 | { |
@@ -251,7 +251,7 void QXYSeries::append(qreal x, qreal y) | |||
|
251 | 251 | |
|
252 | 252 | /*! |
|
253 | 253 | This is an overloaded function. |
|
254 |
Adds data \a point to the series. |
|
|
254 | Adds data \a point to the series. | |
|
255 | 255 | */ |
|
256 | 256 | void QXYSeries::append(const QPointF &point) |
|
257 | 257 | { |
@@ -265,7 +265,7 void QXYSeries::append(const QPointF &point) | |||
|
265 | 265 | |
|
266 | 266 | /*! |
|
267 | 267 | This is an overloaded function. |
|
268 |
Adds list of data \a points to the series. |
|
|
268 | Adds list of data \a points to the series. | |
|
269 | 269 | */ |
|
270 | 270 | void QXYSeries::append(const QList<QPointF> &points) |
|
271 | 271 | { |
@@ -274,7 +274,7 void QXYSeries::append(const QList<QPointF> &points) | |||
|
274 | 274 | } |
|
275 | 275 | |
|
276 | 276 | /*! |
|
277 | Replaces data point \a oldX \a oldY with data point \a newX \a newY. | |
|
277 | Replaces data point (\a oldX, \a oldY) with data point (\a newX, \a newY). | |
|
278 | 278 | \sa QXYSeries::pointReplaced() |
|
279 | 279 | */ |
|
280 | 280 | void QXYSeries::replace(qreal oldX, qreal oldY, qreal newX, qreal newY) |
@@ -299,7 +299,8 void QXYSeries::replace(const QPointF &oldPoint, const QPointF &newPoint) | |||
|
299 | 299 | } |
|
300 | 300 | |
|
301 | 301 | /*! |
|
302 |
Replaces the current points with \a points. |
|
|
302 | Replaces the current points with \a points. | |
|
303 | \note This is much faster than replacing data points one by one, | |
|
303 | 304 | or first clearing all data, and then appending the new data. Emits QXYSeries::pointsReplaced() |
|
304 | 305 | when the points have been replaced. |
|
305 | 306 | \sa QXYSeries::pointsReplaced() |
@@ -312,7 +313,7 void QXYSeries::replace(QList<QPointF> points) | |||
|
312 | 313 | } |
|
313 | 314 | |
|
314 | 315 | /*! |
|
315 | Removes current \a x and \a y value. | |
|
316 | Removes the point (\a x, \a y) from the series. | |
|
316 | 317 | */ |
|
317 | 318 | void QXYSeries::remove(qreal x, qreal y) |
|
318 | 319 | { |
@@ -320,9 +321,7 void QXYSeries::remove(qreal x, qreal y) | |||
|
320 | 321 | } |
|
321 | 322 | |
|
322 | 323 | /*! |
|
323 |
Removes |
|
|
324 | ||
|
325 | Note: point y value is ignored. | |
|
324 | Removes the \a point from the series. | |
|
326 | 325 | */ |
|
327 | 326 | void QXYSeries::remove(const QPointF &point) |
|
328 | 327 | { |
General Comments 0
You need to be logged in to leave comments.
Login now