@@ -7,42 +7,46 | |||
|
7 | 7 | |
|
8 | 8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
9 | 9 | |
|
10 | ||
|
10 | 11 | /*! |
|
11 |
\ |
|
|
12 | \class QPieSeries::ChangeSet | |
|
13 | \brief Defines the changes in the series. | |
|
12 | 14 | |
|
13 | This enum describes pie position within its bounding rectangle | |
|
15 | Contains the changes that have occurred in the series. Lists of added, changed and removed slices. | |
|
14 | 16 | |
|
15 | \value PiePositionMaximized | |
|
16 | \value PiePositionTopLeft | |
|
17 | \value PiePositionTopRight | |
|
18 | \value PiePositionBottomLeft | |
|
19 | \value PiePositionBottomRight | |
|
17 | \sa QPieSeries::changed() | |
|
20 | 18 | */ |
|
21 | 19 | |
|
22 | 20 | /*! |
|
23 | \class QPieSeries | |
|
24 | \brief QtCommercial charts pie series API. | |
|
25 | ||
|
21 | \internal | |
|
26 | 22 | */ |
|
27 | ||
|
28 | 23 | void QPieSeries::ChangeSet::appendAdded(QPieSlice* slice) |
|
29 | 24 | { |
|
30 | 25 | if (!m_added.contains(slice)) |
|
31 | 26 | m_added << slice; |
|
32 | 27 | } |
|
33 | 28 | |
|
29 | /*! | |
|
30 | \internal | |
|
31 | */ | |
|
34 | 32 | void QPieSeries::ChangeSet::appendAdded(QList<QPieSlice*> slices) |
|
35 | 33 | { |
|
36 | 34 | foreach (QPieSlice* s, slices) |
|
37 | 35 | appendAdded(s); |
|
38 | 36 | } |
|
39 | 37 | |
|
38 | /*! | |
|
39 | \internal | |
|
40 | */ | |
|
40 | 41 | void QPieSeries::ChangeSet::appendChanged(QPieSlice* slice) |
|
41 | 42 | { |
|
42 | 43 | if (!m_changed.contains(slice)) |
|
43 | 44 | m_changed << slice; |
|
44 | 45 | } |
|
45 | 46 | |
|
47 | /*! | |
|
48 | \internal | |
|
49 | */ | |
|
46 | 50 | void QPieSeries::ChangeSet::appendRemoved(QPieSlice* slice) |
|
47 | 51 | { |
|
48 | 52 | if (!m_removed.contains(slice)) |
@@ -88,6 +92,30 bool QPieSeries::ChangeSet::isEmpty() const | |||
|
88 | 92 | } |
|
89 | 93 | |
|
90 | 94 | /*! |
|
95 | \enum QPieSeries::PiePosition | |
|
96 | ||
|
97 | This enum describes pie position within its bounding rectangle | |
|
98 | ||
|
99 | \value PiePositionMaximized | |
|
100 | \value PiePositionTopLeft | |
|
101 | \value PiePositionTopRight | |
|
102 | \value PiePositionBottomLeft | |
|
103 | \value PiePositionBottomRight | |
|
104 | */ | |
|
105 | ||
|
106 | /*! | |
|
107 | \class QPieSeries | |
|
108 | \brief Pie series API for QtCommercial Charts | |
|
109 | ||
|
110 | The pie series defines a pie chart which consists of pie slices which are QPieSlice objects. | |
|
111 | The slices can have any values as the QPieSeries will calculate its relative value to the sum of all slices. | |
|
112 | The actual slice size (span) is determined by that relative value. | |
|
113 | ||
|
114 | By default the pie is defined as full but it can be a partial pie. | |
|
115 | This can be done by setting a starting angle and angle span to the series. | |
|
116 | */ | |
|
117 | ||
|
118 | /*! | |
|
91 | 119 | Constructs a series object which is a child of \a parent. |
|
92 | 120 | */ |
|
93 | 121 | QPieSeries::QPieSeries(QObject *parent) : |
@@ -109,7 +137,7 QPieSeries::~QPieSeries() | |||
|
109 | 137 | } |
|
110 | 138 | |
|
111 | 139 | /*! |
|
112 |
Returns |
|
|
140 | Returns QChartSeries::SeriesTypePie. | |
|
113 | 141 | */ |
|
114 | 142 | QChartSeries::QChartSeriesType QPieSeries::type() const |
|
115 | 143 | { |
@@ -188,6 +216,7 QPieSlice* QPieSeries::add(qreal value, QString name) | |||
|
188 | 216 | |
|
189 | 217 | /*! |
|
190 | 218 | Removes a single \a slice from the series and deletes the slice. |
|
219 | ||
|
191 | 220 | Do not reference this pointer after this call. |
|
192 | 221 | */ |
|
193 | 222 | void QPieSeries::remove(QPieSlice* slice) |
@@ -292,7 +321,7 QPieSeries::PiePosition QPieSeries::position() const | |||
|
292 | 321 | /*! |
|
293 | 322 | Sets the \a startAngle and \a angleSpan of this series. |
|
294 | 323 | |
|
295 | \sa | |
|
324 | Full pie is 360 degrees where 0 degrees is at 12 a'clock. | |
|
296 | 325 | */ |
|
297 | 326 | void QPieSeries::setSpan(qreal startAngle, qreal angleSpan) |
|
298 | 327 | { |
@@ -9,8 +9,13 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
9 | 9 | |
|
10 | 10 | /*! |
|
11 | 11 | \class QPieSlice |
|
12 |
\brief |
|
|
12 | \brief Defines a slice a pie series. | |
|
13 | 13 | |
|
14 | Holds all the data of a single slice in a QPieSeries and provides the means | |
|
15 | to modify slice data and customize the visual appearance of the slice. | |
|
16 | ||
|
17 | It also provides the means to customize user interaction with the slice by | |
|
18 | providing signals for clicking and hover events. | |
|
14 | 19 | */ |
|
15 | 20 | |
|
16 | 21 | /*! |
@@ -27,7 +32,9 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
27 | 32 | |
|
28 | 33 | /*! |
|
29 | 34 | Constructs an empty slice with a \a parent. |
|
35 | ||
|
30 | 36 | Note that QPieSeries takes ownership of the slice when it is set/added. |
|
37 | ||
|
31 | 38 | \sa QPieSeries::set(), QPieSeries::add() |
|
32 | 39 | */ |
|
33 | 40 | QPieSlice::QPieSlice(QObject *parent) |
@@ -128,6 +135,7 qreal QPieSlice::explodeDistance() const | |||
|
128 | 135 | |
|
129 | 136 | /*! |
|
130 | 137 | Returns the percentage of this slice compared to all slices in the same series. |
|
138 | ||
|
131 | 139 | Updated internally after the slice is added to the series. |
|
132 | 140 | */ |
|
133 | 141 | qreal QPieSlice::percentage() const |
@@ -137,6 +145,9 qreal QPieSlice::percentage() const | |||
|
137 | 145 | |
|
138 | 146 | /*! |
|
139 | 147 | Returns the starting angle of this slice in the series it belongs to. |
|
148 | ||
|
149 | Full pie is 360 degrees where 0 degrees is at 12 a'clock. | |
|
150 | ||
|
140 | 151 | Updated internally after the slice is added to the series. |
|
141 | 152 | */ |
|
142 | 153 | qreal QPieSlice::angle() const |
@@ -146,6 +157,9 qreal QPieSlice::angle() const | |||
|
146 | 157 | |
|
147 | 158 | /*! |
|
148 | 159 | Returns the angle span of this slice in the series it belongs to. |
|
160 | ||
|
161 | Full pie is 360 degrees where 0 degrees is at 12 a'clock. | |
|
162 | ||
|
149 | 163 | Updated internally after the slice is added to the series. |
|
150 | 164 | */ |
|
151 | 165 | qreal QPieSlice::angleSpan() const |
General Comments 0
You need to be logged in to leave comments.
Login now