@@ -79,25 +79,25 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
79 | */ |
|
79 | */ | |
80 |
|
80 | |||
81 | /*! |
|
81 | /*! | |
82 |
\fn void QDateTimeAxis::minChanged( |
|
82 | \fn void QDateTimeAxis::minChanged(QDateTime min) | |
83 | Axis emits signal when \a min of axis has changed. |
|
83 | Axis emits signal when \a min of axis has changed. | |
84 | */ |
|
84 | */ | |
85 | /*! |
|
85 | /*! | |
86 |
\qmlsignal ValuesAxis::onMinChanged( |
|
86 | \qmlsignal ValuesAxis::onMinChanged(QDateTime min) | |
87 | Axis emits signal when \a min of axis has changed. |
|
87 | Axis emits signal when \a min of axis has changed. | |
88 | */ |
|
88 | */ | |
89 |
|
89 | |||
90 | /*! |
|
90 | /*! | |
91 |
\fn void QDateTimeAxis::maxChanged( |
|
91 | \fn void QDateTimeAxis::maxChanged(QDateTime max) | |
92 | Axis emits signal when \a max of axis has changed. |
|
92 | Axis emits signal when \a max of axis has changed. | |
93 | */ |
|
93 | */ | |
94 | /*! |
|
94 | /*! | |
95 |
\qmlsignal ValuesAxis::onMaxChanged( |
|
95 | \qmlsignal ValuesAxis::onMaxChanged(QDateTime max) | |
96 | Axis emits signal when \a max of axis has changed. |
|
96 | Axis emits signal when \a max of axis has changed. | |
97 | */ |
|
97 | */ | |
98 |
|
98 | |||
99 | /*! |
|
99 | /*! | |
100 |
\fn void QDateTimeAxis::rangeChanged( |
|
100 | \fn void QDateTimeAxis::rangeChanged(QDateTime min, QDateTime max) | |
101 | Axis emits signal when \a min or \a max of axis has changed. |
|
101 | Axis emits signal when \a min or \a max of axis has changed. | |
102 | */ |
|
102 | */ | |
103 |
|
103 | |||
@@ -112,16 +112,6 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
112 | */ |
|
112 | */ | |
113 |
|
113 | |||
114 | /*! |
|
114 | /*! | |
115 | \property QDateTimeAxis::niceNumbersEnabled |
|
|||
116 | Whether the nice numbers algorithm is enabled or not for the axis. |
|
|||
117 | */ |
|
|||
118 |
|
||||
119 | /*! |
|
|||
120 | \qmlproperty bool ValuesAxis::niceNumbersEnabled |
|
|||
121 | Whether the nice numbers algorithm is enabled or not for the axis. |
|
|||
122 | */ |
|
|||
123 |
|
||||
124 | /*! |
|
|||
125 | Constructs an axis object which is a child of \a parent. |
|
115 | Constructs an axis object which is a child of \a parent. | |
126 | */ |
|
116 | */ | |
127 | QDateTimeAxis::QDateTimeAxis(QObject *parent) : |
|
117 | QDateTimeAxis::QDateTimeAxis(QObject *parent) : | |
@@ -203,12 +193,22 void QDateTimeAxis::setRange(QDateTime min, QDateTime max) | |||||
203 | } |
|
193 | } | |
204 | } |
|
194 | } | |
205 |
|
195 | |||
|
196 | /*! | |||
|
197 | Sets \a format string that is used when creating label for the axis out of the QDateTime object. | |||
|
198 | Check QDateTime documentation for information on how the string should be defined. | |||
|
199 | \sa formatString() | |||
|
200 | */ | |||
206 | void QDateTimeAxis::setFormatString(QString format) |
|
201 | void QDateTimeAxis::setFormatString(QString format) | |
207 | { |
|
202 | { | |
208 | Q_D(QDateTimeAxis); |
|
203 | Q_D(QDateTimeAxis); | |
209 | d->m_format = format; |
|
204 | d->m_format = format; | |
210 | } |
|
205 | } | |
211 |
|
206 | |||
|
207 | /*! | |||
|
208 | Returns the format string that is used when creating label for the axis out of the QDateTime object. | |||
|
209 | Check QDateTime documentation for information on how the string should be defined. | |||
|
210 | \sa setFormatString() | |||
|
211 | */ | |||
212 | QString QDateTimeAxis::formatString() const |
|
212 | QString QDateTimeAxis::formatString() const | |
213 | { |
|
213 | { | |
214 | Q_D(const QDateTimeAxis); |
|
214 | Q_D(const QDateTimeAxis); |
@@ -71,7 +71,8 QIntervalsAxis::QIntervalsAxis(QIntervalsAxisPrivate &d,QObject *parent):QValues | |||||
71 | } |
|
71 | } | |
72 |
|
72 | |||
73 | /*! |
|
73 | /*! | |
74 | Appends \a category to axis |
|
74 | Appends new interval to the axis with an \a intervalLabel. | |
|
75 | Parameter \a interval specifies the high end limit of the interval. | |||
75 | */ |
|
76 | */ | |
76 | void QIntervalsAxis::append(const QString& intervalLabel, qreal interval) |
|
77 | void QIntervalsAxis::append(const QString& intervalLabel, qreal interval) | |
77 | { |
|
78 | { | |
@@ -91,6 +92,9 void QIntervalsAxis::append(const QString& intervalLabel, qreal interval) | |||||
91 | } |
|
92 | } | |
92 | } |
|
93 | } | |
93 |
|
94 | |||
|
95 | /*! | |||
|
96 | Sets to \a min the low end limit of the first interval on the axis. | |||
|
97 | */ | |||
94 | void QIntervalsAxis::setFisrtIntervalMinimum(qreal min) |
|
98 | void QIntervalsAxis::setFisrtIntervalMinimum(qreal min) | |
95 | { |
|
99 | { | |
96 | Q_D(QIntervalsAxis); |
|
100 | Q_D(QIntervalsAxis); | |
@@ -99,16 +103,21 void QIntervalsAxis::setFisrtIntervalMinimum(qreal min) | |||||
99 | }else{ |
|
103 | }else{ | |
100 | Range range = d->m_intervalsMap.value(d->m_intervals.first()); |
|
104 | Range range = d->m_intervalsMap.value(d->m_intervals.first()); | |
101 | d->m_intervalsMap.insert(d->m_intervals.first(), Range(min, range.second)); |
|
105 | d->m_intervalsMap.insert(d->m_intervals.first(), Range(min, range.second)); | |
102 | // setRange(min, d->m_min); |
|
|||
103 | } |
|
106 | } | |
104 | } |
|
107 | } | |
105 |
|
108 | |||
|
109 | /*! | |||
|
110 | Returns the low end limit of the interval specified by an \a intervalLabel | |||
|
111 | */ | |||
106 | qreal QIntervalsAxis::intervalMin(const QString& intervalLabel) const |
|
112 | qreal QIntervalsAxis::intervalMin(const QString& intervalLabel) const | |
107 | { |
|
113 | { | |
108 | Q_D(const QIntervalsAxis); |
|
114 | Q_D(const QIntervalsAxis); | |
109 | return d->m_intervalsMap.value(intervalLabel).first; |
|
115 | return d->m_intervalsMap.value(intervalLabel).first; | |
110 | } |
|
116 | } | |
111 |
|
117 | |||
|
118 | /*! | |||
|
119 | Returns the high end limit of the interval specified by an \a intervalLabel | |||
|
120 | */ | |||
112 | qreal QIntervalsAxis::intervalMax(const QString& intervalLabel) const |
|
121 | qreal QIntervalsAxis::intervalMax(const QString& intervalLabel) const | |
113 | { |
|
122 | { | |
114 | Q_D(const QIntervalsAxis); |
|
123 | Q_D(const QIntervalsAxis); | |
@@ -116,7 +125,7 qreal QIntervalsAxis::intervalMax(const QString& intervalLabel) const | |||||
116 | } |
|
125 | } | |
117 |
|
126 | |||
118 | /*! |
|
127 | /*! | |
119 |
Removes \a |
|
128 | Removes \a interval from axis | |
120 | */ |
|
129 | */ | |
121 | void QIntervalsAxis::remove(const QString &intervalLabel) |
|
130 | void QIntervalsAxis::remove(const QString &intervalLabel) | |
122 | { |
|
131 | { |
@@ -151,6 +151,37 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
151 | */ |
|
151 | */ | |
152 |
|
152 | |||
153 | /*! |
|
153 | /*! | |
|
154 | \property QPieSeries::donutInnerSize | |||
|
155 | \brief Defines the donut inner size. | |||
|
156 | ||||
|
157 | The value is a relative value to the chart rectangle where: | |||
|
158 | ||||
|
159 | \list | |||
|
160 | \o 0.0 is the minimum size (pie not drawn). | |||
|
161 | \o 1.0 is the maximum size that can fit the chart. (donut has no width) | |||
|
162 | \endlist | |||
|
163 | ||||
|
164 | The value is never greater then size property. | |||
|
165 | Default value is 0.5. | |||
|
166 | */ | |||
|
167 | ||||
|
168 | /*! | |||
|
169 | \qmlproperty real PieSeries::donutInnerSize | |||
|
170 | ||||
|
171 | Defines the donut inner size. | |||
|
172 | ||||
|
173 | The value is a relative value to the chart rectangle where: | |||
|
174 | ||||
|
175 | \list | |||
|
176 | \o 0.0 is the minimum size (donut is a pie). | |||
|
177 | \o 1.0 is the maximum size that can fit the chart. (donut has no width) | |||
|
178 | \endlist | |||
|
179 | ||||
|
180 | The value is never greater then size property. | |||
|
181 | Default value is 0.5. | |||
|
182 | */ | |||
|
183 | ||||
|
184 | /*! | |||
154 | \property QPieSeries::startAngle |
|
185 | \property QPieSeries::startAngle | |
155 | \brief Defines the starting angle of the pie. |
|
186 | \brief Defines the starting angle of the pie. | |
156 |
|
187 | |||
@@ -542,8 +573,8 void QPieSeries::setDonutInnerSize(qreal innerSize) | |||||
542 |
|
573 | |||
543 | if (innerSize < 0.0) |
|
574 | if (innerSize < 0.0) | |
544 | innerSize = 0.0; |
|
575 | innerSize = 0.0; | |
545 |
if (innerSize > |
|
576 | if (innerSize > d->m_pieRelativeSize) | |
546 |
innerSize = |
|
577 | innerSize = d->m_pieRelativeSize; | |
547 |
|
578 | |||
548 | d->m_donutRelativeInnerSize = innerSize; |
|
579 | d->m_donutRelativeInnerSize = innerSize; | |
549 | d->updateDerivativeData(); |
|
580 | d->updateDerivativeData(); |
@@ -38,6 +38,8 class QTCOMMERCIALCHART_EXPORT QPieSeries : public QAbstractSeries | |||||
38 | Q_PROPERTY(qreal endAngle READ pieEndAngle WRITE setPieEndAngle) |
|
38 | Q_PROPERTY(qreal endAngle READ pieEndAngle WRITE setPieEndAngle) | |
39 | Q_PROPERTY(int count READ count NOTIFY countChanged) |
|
39 | Q_PROPERTY(int count READ count NOTIFY countChanged) | |
40 | Q_PROPERTY(qreal sum READ sum NOTIFY sumChanged) |
|
40 | Q_PROPERTY(qreal sum READ sum NOTIFY sumChanged) | |
|
41 | Q_PROPERTY(qreal donutInnerSize READ donutInnerSize WRITE setDonutInnerSize) | |||
|
42 | Q_PROPERTY(bool donut READ donut WRITE setDonut) | |||
41 |
|
43 | |||
42 | public: |
|
44 | public: | |
43 | explicit QPieSeries(QObject *parent = 0); |
|
45 | explicit QPieSeries(QObject *parent = 0); |
@@ -61,7 +61,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
61 |
|
61 | |||
62 | \value LabelOutside Label is outside the slice with an arm. |
|
62 | \value LabelOutside Label is outside the slice with an arm. | |
63 | \value LabelInside Label is centered inside the slice. |
|
63 | \value LabelInside Label is centered inside the slice. | |
64 |
|
64 | \value LabelInsideTangential Label is centered inside the slice and rotated to be parallel to the tangential of the slice's arc | ||
|
65 | \value LabelInsideNormal Label is centered inside the slice rotated to be parallel to the normal of the slice's arc. | |||
65 | */ |
|
66 | */ | |
66 |
|
67 | |||
67 | /*! |
|
68 | /*! |
General Comments 0
You need to be logged in to leave comments.
Login now