@@ -268,7 +268,7 void ChartAxis::handleAxisUpdated() | |||||
268 | } |
|
268 | } | |
269 | else { |
|
269 | else { | |
270 |
|
270 | |||
271 |
if (m_chartAxis->isA |
|
271 | if (m_chartAxis->isArrowVisible()) { | |
272 | setAxisOpacity(100); |
|
272 | setAxisOpacity(100); | |
273 | } |
|
273 | } | |
274 | else { |
|
274 | else { |
@@ -172,47 +172,56 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
172 | */ |
|
172 | */ | |
173 |
|
173 | |||
174 | /*! |
|
174 | /*! | |
175 | \fn void QAbstractAxis::visibleChanged(bool) |
|
175 | \fn void QAbstractAxis::visibleChanged(bool visible) | |
176 | Visiblity of the axis has changed to \a visible. |
|
176 | Visiblity of the axis has changed to \a visible. | |
177 | */ |
|
177 | */ | |
178 |
|
||||
179 | /*! |
|
178 | /*! | |
180 |
\ |
|
179 | \qmlsignal AbstractAxis::onVisibleChanged(bool visible) | |
181 |
Visiblity of the |
|
180 | Visiblity of the axis has changed to \a visible. | |
182 | */ |
|
181 | */ | |
183 |
|
182 | |||
184 | /*! |
|
183 | /*! | |
185 |
\fn void QAbstractAxis:: |
|
184 | \fn void QAbstractAxis::arrowVisibleChanged(bool visible) | |
186 |
Visiblity of the |
|
185 | Visiblity of the axis arrow has changed to \a visible. | |
187 | */ |
|
186 | */ | |
188 |
|
187 | /*! | ||
189 | /* |
|
188 | \qmlsignal AbstractAxis::onArrowVisibleChanged(bool visible) | |
190 | \fn void QAbstractAxis::minChanged(qreal min) |
|
189 | Visiblity of the axis arrow has changed to \a visible. | |
191 | Axis emits signal when \a min of axis has changed. |
|
|||
192 | */ |
|
190 | */ | |
193 |
|
191 | |||
194 | /* |
|
192 | /*! | |
195 |
\fn void QAbstractAxis:: |
|
193 | \fn void QAbstractAxis::labelsVisibleChanged(bool visible) | |
196 | Axis emits signal when \a max of axis has changed. |
|
194 | Visiblity of the labels of the axis has changed to \a visible. | |
197 | */ |
|
195 | */ | |
198 |
|
196 | /*! | ||
199 | /* |
|
197 | \qmlsignal AbstractAxis::onLabelsVisibleChanged(bool visible) | |
200 | \fn void QAbstractAxis::rangeChanged(qreal min, qreal max) |
|
198 | Visiblity of the labels of the axis has changed to \a visible. | |
201 | Axis emits signal when \a min or \a max of axis has changed. |
|
|||
202 | */ |
|
199 | */ | |
203 |
|
200 | |||
204 | /* |
|
201 | /*! | |
205 | \fn QChartAxisCategories* QAbstractAxis::categories() |
|
202 | \fn void QAbstractAxis::gridVisibleChanged(bool visible) | |
206 | Returns pointer to the list of categories which correspond to the values on the axis. |
|
203 | Visiblity of the grid lines of the axis has changed to \a visible. | |
|
204 | */ | |||
|
205 | /*! | |||
|
206 | \qmlsignal AbstractAxis::onGridVisibleChanged(bool visible) | |||
|
207 | Visiblity of the grid lines of the axis has changed to \a visible. | |||
207 | */ |
|
208 | */ | |
208 |
|
209 | |||
209 | /*! |
|
210 | /*! | |
210 | \fn void QAbstractAxis::colorChanged(QColor) |
|
211 | \fn void QAbstractAxis::colorChanged(QColor color) | |
|
212 | Emitted if the \a color of the axis is changed. | |||
|
213 | */ | |||
|
214 | /*! | |||
|
215 | \qmlsignal AbstractAxis::onColorChanged(QColor color) | |||
211 | Emitted if the \a color of the axis is changed. |
|
216 | Emitted if the \a color of the axis is changed. | |
212 | */ |
|
217 | */ | |
213 |
|
218 | |||
214 | /*! |
|
219 | /*! | |
215 | \fn void QAbstractAxis::labelsColorChanged(QColor) |
|
220 | \fn void QAbstractAxis::labelsColorChanged(QColor color) | |
|
221 | Emitted if the \a color of the axis labels is changed. | |||
|
222 | */ | |||
|
223 | /*! | |||
|
224 | \qmlsignal AbstractAxis::onLabelsColorChanged(QColor color) | |||
216 | Emitted if the \a color of the axis labels is changed. |
|
225 | Emitted if the \a color of the axis labels is changed. | |
217 | */ |
|
226 | */ | |
218 |
|
227 | |||
@@ -220,9 +229,17 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
220 | \fn void QAbstractAxis::shadesVisibleChanged(bool) |
|
229 | \fn void QAbstractAxis::shadesVisibleChanged(bool) | |
221 | Emitted if the visibility of the axis shades is changed to \a visible. |
|
230 | Emitted if the visibility of the axis shades is changed to \a visible. | |
222 | */ |
|
231 | */ | |
|
232 | /*! | |||
|
233 | \qmlsignal AbstractAxis::onShadesVisibleChanged(bool visible) | |||
|
234 | Emitted if the visibility of the axis shades is changed to \a visible. | |||
|
235 | */ | |||
223 |
|
236 | |||
224 | /*! |
|
237 | /*! | |
225 | \fn void QAbstractAxis::shadesColorChanged(QColor) |
|
238 | \fn void QAbstractAxis::shadesColorChanged(QColor color) | |
|
239 | Emitted if the \a color of the axis shades is changed. | |||
|
240 | */ | |||
|
241 | /*! | |||
|
242 | \qmlsignal AbstractAxis::onShadesColorChanged(QColor color) | |||
226 | Emitted if the \a color of the axis shades is changed. |
|
243 | Emitted if the \a color of the axis shades is changed. | |
227 | */ |
|
244 | */ | |
228 |
|
245 | |||
@@ -230,6 +247,10 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
230 | \fn void QAbstractAxis::shadesBorderColorChanged(QColor) |
|
247 | \fn void QAbstractAxis::shadesBorderColorChanged(QColor) | |
231 | Emitted if the border \a color of the axis shades is changed. |
|
248 | Emitted if the border \a color of the axis shades is changed. | |
232 | */ |
|
249 | */ | |
|
250 | /*! | |||
|
251 | \qmlsignal AbstractAxis::onBorderColorChanged(QColor color) | |||
|
252 | Emitted if the border \a color of the axis shades is changed. | |||
|
253 | */ | |||
233 |
|
254 | |||
234 | /*! |
|
255 | /*! | |
235 | Constructs new axis object which is a child of \a parent. Ownership is taken by |
|
256 | Constructs new axis object which is a child of \a parent. Ownership is taken by | |
@@ -287,18 +308,18 QColor QAbstractAxis::axisPenColor() const | |||||
287 | /*! |
|
308 | /*! | |
288 | Sets if axis and ticks are \a visible. |
|
309 | Sets if axis and ticks are \a visible. | |
289 | */ |
|
310 | */ | |
290 |
void QAbstractAxis::setA |
|
311 | void QAbstractAxis::setArrowVisible(bool visible) | |
291 | { |
|
312 | { | |
292 |
if (d_ptr->m_a |
|
313 | if (d_ptr->m_arrowVisible != visible) { | |
293 |
d_ptr->m_a |
|
314 | d_ptr->m_arrowVisible = visible; | |
294 | emit d_ptr->updated(); |
|
315 | emit d_ptr->updated(); | |
295 |
emit |
|
316 | emit arrowVisibleChanged(visible); | |
296 | } |
|
317 | } | |
297 | } |
|
318 | } | |
298 |
|
319 | |||
299 |
bool QAbstractAxis::isA |
|
320 | bool QAbstractAxis::isArrowVisible() const | |
300 | { |
|
321 | { | |
301 |
return d_ptr->m_a |
|
322 | return d_ptr->m_arrowVisible; | |
302 | } |
|
323 | } | |
303 |
|
324 | |||
304 | void QAbstractAxis::setGridLineVisible(bool visible) |
|
325 | void QAbstractAxis::setGridLineVisible(bool visible) | |
@@ -580,7 +601,7 void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) | |||||
580 | QAbstractAxisPrivate::QAbstractAxisPrivate(QAbstractAxis* q): |
|
601 | QAbstractAxisPrivate::QAbstractAxisPrivate(QAbstractAxis* q): | |
581 | q_ptr(q), |
|
602 | q_ptr(q), | |
582 | m_visible(false), |
|
603 | m_visible(false), | |
583 |
m_a |
|
604 | m_arrowVisible(true), | |
584 | m_gridLineVisible(true), |
|
605 | m_gridLineVisible(true), | |
585 | m_labelsVisible(true), |
|
606 | m_labelsVisible(true), | |
586 | m_labelsAngle(0), |
|
607 | m_labelsAngle(0), |
@@ -34,7 +34,7 class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject | |||||
34 | { |
|
34 | { | |
35 | Q_OBJECT |
|
35 | Q_OBJECT | |
36 | Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) |
|
36 | Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) | |
37 |
Q_PROPERTY(bool a |
|
37 | Q_PROPERTY(bool arrowVisible READ isArrowVisible WRITE setArrowVisible NOTIFY arrowVisibleChanged) | |
38 | Q_PROPERTY(QColor color READ axisPenColor WRITE setAxisPenColor NOTIFY colorChanged) |
|
38 | Q_PROPERTY(QColor color READ axisPenColor WRITE setAxisPenColor NOTIFY colorChanged) | |
39 | Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) |
|
39 | Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) | |
40 | Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle) |
|
40 | Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle) | |
@@ -69,8 +69,8 public: | |||||
69 |
|
69 | |||
70 |
|
70 | |||
71 | //axis handling |
|
71 | //axis handling | |
72 |
bool isA |
|
72 | bool isArrowVisible() const; | |
73 |
void setA |
|
73 | void setArrowVisible(bool visible = true); | |
74 | void setAxisPen(const QPen &pen); |
|
74 | void setAxisPen(const QPen &pen); | |
75 | QPen axisPen() const; |
|
75 | QPen axisPen() const; | |
76 | void setAxisPenColor(QColor color); |
|
76 | void setAxisPenColor(QColor color); | |
@@ -118,7 +118,7 public: | |||||
118 |
|
118 | |||
119 | Q_SIGNALS: |
|
119 | Q_SIGNALS: | |
120 | void visibleChanged(bool visible); |
|
120 | void visibleChanged(bool visible); | |
121 |
void a |
|
121 | void arrowVisibleChanged(bool visible); | |
122 | void labelsVisibleChanged(bool visible); |
|
122 | void labelsVisibleChanged(bool visible); | |
123 | void gridVisibleChanged(bool visible); |
|
123 | void gridVisibleChanged(bool visible); | |
124 | void colorChanged(QColor color); |
|
124 | void colorChanged(QColor color); |
@@ -61,7 +61,7 public: | |||||
61 | QAbstractAxis *q_ptr; |
|
61 | QAbstractAxis *q_ptr; | |
62 | bool m_visible; |
|
62 | bool m_visible; | |
63 |
|
63 | |||
64 |
bool m_a |
|
64 | bool m_arrowVisible; | |
65 | QPen m_axisPen; |
|
65 | QPen m_axisPen; | |
66 | QBrush m_axisBrush; |
|
66 | QBrush m_axisBrush; | |
67 |
|
67 |
@@ -69,7 +69,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
69 | Defines the minimum value on the axis. |
|
69 | Defines the minimum value on the axis. | |
70 | */ |
|
70 | */ | |
71 | /*! |
|
71 | /*! | |
72 |
\qmlproperty |
|
72 | \qmlproperty QString BarCategoriesAxis::min | |
73 | Defines the minimum value on the axis. |
|
73 | Defines the minimum value on the axis. | |
74 | */ |
|
74 | */ | |
75 |
|
75 | |||
@@ -78,7 +78,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
78 | Defines the maximum value on the axis. |
|
78 | Defines the maximum value on the axis. | |
79 | */ |
|
79 | */ | |
80 | /*! |
|
80 | /*! | |
81 |
\qmlproperty |
|
81 | \qmlproperty QString BarCategoriesAxis::max | |
82 | Defines the maximum value on the axis. |
|
82 | Defines the maximum value on the axis. | |
83 | */ |
|
83 | */ | |
84 |
|
84 | |||
@@ -86,11 +86,19 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
86 | \fn void QBarCategoriesAxis::minChanged(const QString &min) |
|
86 | \fn void QBarCategoriesAxis::minChanged(const QString &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 | /*! | |||
|
90 | \qmlsignal BarCategoriesAxis::onMinChanged(const QString &min) | |||
|
91 | Axis emits signal when \a min of axis has changed. | |||
|
92 | */ | |||
89 |
|
93 | |||
90 | /*! |
|
94 | /*! | |
91 | \fn void QBarCategoriesAxis::maxChanged(const QString &max) |
|
95 | \fn void QBarCategoriesAxis::maxChanged(const QString &max) | |
92 | Axis emits signal when \a max of axis has changed. |
|
96 | Axis emits signal when \a max of axis has changed. | |
93 | */ |
|
97 | */ | |
|
98 | /*! | |||
|
99 | \qmlsignal BarCategoriesAxis::onMaxChanged(const QString &max) | |||
|
100 | Axis emits signal when \a max of axis has changed. | |||
|
101 | */ | |||
94 |
|
102 | |||
95 | /*! |
|
103 | /*! | |
96 | \fn void QBarCategoriesAxis::rangeChanged(const QString &min, const QString &max) |
|
104 | \fn void QBarCategoriesAxis::rangeChanged(const QString &min, const QString &max) |
@@ -71,7 +71,7 QIntervalAxis::QIntervalAxis(QIntervalAxisPrivate &d,QObject *parent):QValuesAxi | |||||
71 | } |
|
71 | } | |
72 |
|
72 | |||
73 | /*! |
|
73 | /*! | |
74 |
Appends \a categor |
|
74 | Appends \a category to axis | |
75 | */ |
|
75 | */ | |
76 | void QIntervalAxis::append(const QString& category, qreal x) |
|
76 | void QIntervalAxis::append(const QString& category, qreal x) | |
77 | { |
|
77 | { |
@@ -76,11 +76,19 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
76 | \fn void QValuesAxis::minChanged(qreal min) |
|
76 | \fn void QValuesAxis::minChanged(qreal min) | |
77 | Axis emits signal when \a min of axis has changed. |
|
77 | Axis emits signal when \a min of axis has changed. | |
78 | */ |
|
78 | */ | |
|
79 | /*! | |||
|
80 | \qmlsignal ValuesAxis::onMinChanged(real min) | |||
|
81 | Axis emits signal when \a min of axis has changed. | |||
|
82 | */ | |||
79 |
|
83 | |||
80 | /*! |
|
84 | /*! | |
81 | \fn void QValuesAxis::maxChanged(qreal max) |
|
85 | \fn void QValuesAxis::maxChanged(qreal max) | |
82 | Axis emits signal when \a max of axis has changed. |
|
86 | Axis emits signal when \a max of axis has changed. | |
83 | */ |
|
87 | */ | |
|
88 | /*! | |||
|
89 | \qmlsignal ValuesAxis::onMaxChanged(real max) | |||
|
90 | Axis emits signal when \a max of axis has changed. | |||
|
91 | */ | |||
84 |
|
92 | |||
85 | /*! |
|
93 | /*! | |
86 | \fn void QValuesAxis::rangeChanged(qreal min, qreal max) |
|
94 | \fn void QValuesAxis::rangeChanged(qreal min, qreal max) |
@@ -262,7 +262,7 void ChartTheme::decorate(QAbstractAxis *axis,bool axisX) | |||||
262 | QBrush brush; |
|
262 | QBrush brush; | |
263 | QFont font; |
|
263 | QFont font; | |
264 |
|
264 | |||
265 |
if (axis->isA |
|
265 | if (axis->isArrowVisible()) { | |
266 |
|
266 | |||
267 | if(brush == axis->labelsBrush() || m_force){ |
|
267 | if(brush == axis->labelsBrush() || m_force){ | |
268 | axis->setLabelsBrush(m_labelBrush); |
|
268 | axis->setLabelsBrush(m_labelBrush); |
General Comments 0
You need to be logged in to leave comments.
Login now