##// END OF EJS Templates
Added documentation for new properties of QAbstractAxis
Tero Ahola -
r2361:574e4e269d59
parent child
Show More
@@ -84,6 +84,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
84 */
84 */
85
85
86 /*!
86 /*!
87 \property QAbstractAxis::linePen
88 The pen of the line.
89 */
90
91 /*!
87 \property QAbstractAxis::labelsVisible
92 \property QAbstractAxis::labelsVisible
88 Defines if axis labels are visible.
93 Defines if axis labels are visible.
89 */
94 */
@@ -93,6 +98,16 QTCOMMERCIALCHART_BEGIN_NAMESPACE
93 */
98 */
94
99
95 /*!
100 /*!
101 \property QAbstractAxis::labelsPen
102 The pen of the labels.
103 */
104
105 /*!
106 \property QAbstractAxis::labelsBrush
107 The brush of the labels.
108 */
109
110 /*!
96 \property QAbstractAxis::visible
111 \property QAbstractAxis::visible
97 The visibility of the axis.
112 The visibility of the axis.
98 */
113 */
@@ -120,6 +135,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
120 */
135 */
121
136
122 /*!
137 /*!
138 \property QAbstractAxis::gridLinePen
139 The pen of the grid line.
140 */
141
142 /*!
123 \property QAbstractAxis::labelsFont
143 \property QAbstractAxis::labelsFont
124 The font of the axis labels.
144 The font of the axis labels.
125 */
145 */
@@ -177,6 +197,16 QTCOMMERCIALCHART_BEGIN_NAMESPACE
177 */
197 */
178
198
179 /*!
199 /*!
200 \property QAbstractAxis::shadesPen
201 The pen of the axis shades (area between grid lines).
202 */
203
204 /*!
205 \property QAbstractAxis::shadesBrush
206 The brush of the axis shades (area between grid lines).
207 */
208
209 /*!
180 \property QAbstractAxis::titleVisible
210 \property QAbstractAxis::titleVisible
181 The visibility of the axis title. By default the value is true.
211 The visibility of the axis title. By default the value is true.
182 */
212 */
@@ -186,21 +216,40 QTCOMMERCIALCHART_BEGIN_NAMESPACE
186 */
216 */
187
217
188 /*!
218 /*!
219 \property QAbstractAxis::titleText
220 The title of the axis. Empty by default.
221 */
222 /*!
223 \qmlproperty String AbstractAxis::titleText
224 The title of the axis. Empty by default.
225 */
226
227 /*!
228 \property QAbstractAxis::titlePen
229 The pen of the title text.
230 */
231
232 /*!
233 \property QAbstractAxis::titleBrush
234 The brush of the title text.
235 */
236
237 /*!
189 \property QAbstractAxis::titleFont
238 \property QAbstractAxis::titleFont
190 The font of the title of the axis.
239 The font of the title of the axis.
191 */
240 */
192 /*!
241 /*!
193 \qmlproperty Font AbstractAxis::title
242 \qmlproperty Font AbstractAxis::titleFont
194 The font of the title of the axis.
243 The font of the title of the axis.
195 */
244 */
196
245
197 /*!
246 /*!
198 \property QAbstractAxis::title
247 \property QAbstractAxis::orientation
199 The title of the axis. Empty by default.
248 The orientation of the axis. Fixed to either Qt::Horizontal or Qt::Vertical when you add the axis to a chart.
200 */
249 */
201 /*!
250 /*!
202 \qmlproperty string AbstractAxis::title
251 \qmlproperty Qt.Orientation AbstractAxis::orientation
203 The title of the axis. Empty string by default.
252 The orientation of the axis. Fixed to either Qt.Horizontal or Qt.Vertical when the axis is set to a Chart/Series.
204 */
253 */
205
254
206 /*!
255 /*!
@@ -222,6 +271,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
222 */
271 */
223
272
224 /*!
273 /*!
274 \fn void QAbstractAxis::linePenChanged(const QPen& pen)
275 The pen of the line of the axis has changed to \a pen.
276 */
277
278 /*!
225 \fn void QAbstractAxis::lineVisibleChanged(bool visible)
279 \fn void QAbstractAxis::lineVisibleChanged(bool visible)
226 Visibility of the axis line has changed to \a visible.
280 Visibility of the axis line has changed to \a visible.
227 */
281 */
@@ -240,6 +294,34 QTCOMMERCIALCHART_BEGIN_NAMESPACE
240 */
294 */
241
295
242 /*!
296 /*!
297 \fn void QAbstractAxis::labelsFontChanged(const QFont& font)
298 The font of the axis labels has changed to \a font.
299 */
300 /*!
301 \qmlsignal AbstractAxis::onLabelsFontChanged(Font font)
302 The font of the axis labels has changed to \a font.
303 */
304
305 /*!
306 \fn void QAbstractAxis::labelsPenChanged(const QPen& pen)
307 The pen of the axis labels has changed to \a pen.
308 */
309
310 /*!
311 \fn void QAbstractAxis::labelsBrushChanged(const QBrush& brush)
312 The brush of the axis labels has changed to \a brush.
313 */
314
315 /*!
316 \fn void QAbstractAxis::labelsAngleChanged(int angle)
317 The angle of the axis labels has changed to \a angle.
318 */
319 /*!
320 \qmlsignal AbstractAxis::onLabelsAngleChanged(int angle)
321 The angle of the axis labels has changed to \a angle.
322 */
323
324 /*!
243 \fn void QAbstractAxis::gridVisibleChanged(bool visible)
325 \fn void QAbstractAxis::gridVisibleChanged(bool visible)
244 Visibility of the grid lines of the axis has changed to \a visible.
326 Visibility of the grid lines of the axis has changed to \a visible.
245 */
327 */
@@ -249,6 +331,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
249 */
331 */
250
332
251 /*!
333 /*!
334 \fn void QAbstractAxis::gridLinePenChanged(const QPen& pen)
335 The pen of the grid line has changed to \a pen.
336 */
337
338 /*!
252 \fn void QAbstractAxis::colorChanged(QColor color)
339 \fn void QAbstractAxis::colorChanged(QColor color)
253 Emitted if the \a color of the axis is changed.
340 Emitted if the \a color of the axis is changed.
254 */
341 */
@@ -267,6 +354,43 QTCOMMERCIALCHART_BEGIN_NAMESPACE
267 */
354 */
268
355
269 /*!
356 /*!
357 \fn void QAbstractAxis::titleVisibleChanged(bool visible)
358 Visibility of the title text of the axis has changed to \a visible.
359 */
360 /*!
361 \qmlsignal AbstractAxis::onTitleVisibleChanged(bool visible)
362 Visibility of the title text of the axis has changed to \a visible.
363 */
364
365 /*!
366 \fn void QAbstractAxis::titleTextChanged(const QString& text)
367 The text of the axis title has changed to \a text.
368 */
369 /*!
370 \qmlsignal AbstractAxis::onTitleTextChanged(String text)
371 The text of the axis title has changed to \a text.
372 */
373
374 /*!
375 \fn void QAbstractAxis::titlePenChanged(const QPen& pen)
376 The pen of the axis shades has changed to \a pen.
377 */
378
379 /*!
380 \fn void QAbstractAxis::titleBrushChanged(const QBrush& brush)
381 The brush of the axis title has changed to \a brush.
382 */
383
384 /*!
385 \fn void QAbstractAxis::titleFontChanged(const QFont& font)
386 The font of the axis title has changed to \a font.
387 */
388 /*!
389 \qmlsignal AbstractAxis::onTitleFontChanged(Font font)
390 The font of the axis title has changed to \a font.
391 */
392
393 /*!
270 \fn void QAbstractAxis::shadesVisibleChanged(bool)
394 \fn void QAbstractAxis::shadesVisibleChanged(bool)
271 Emitted if the visibility of the axis shades is changed to \a visible.
395 Emitted if the visibility of the axis shades is changed to \a visible.
272 */
396 */
@@ -294,6 +418,16 QTCOMMERCIALCHART_BEGIN_NAMESPACE
294 */
418 */
295
419
296 /*!
420 /*!
421 \fn void QAbstractAxis::shadesBrushChanged(const QBrush& brush)
422 The brush of the axis shades has changed to \a brush.
423 */
424
425 /*!
426 \fn void QAbstractAxis::shadesPenChanged(const QPen& pen)
427 The pen of the axis shades has changed to \a pen.
428 */
429
430 /*!
297 \internal
431 \internal
298 Constructs new axis object which is a child of \a parent. Ownership is taken by
432 Constructs new axis object which is a child of \a parent. Ownership is taken by
299 QChart when axis added.
433 QChart when axis added.
@@ -38,23 +38,20 class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject
38 //arrow
38 //arrow
39 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
39 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
40 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
40 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
41 //TODO: make wrapping of color for qml
42 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
41 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
43 //labels
42 //labels
44 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
43 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
45 Q_PROPERTY(QPen lablesPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged)
44 Q_PROPERTY(QPen labelsPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged)
46 Q_PROPERTY(QBrush lablesBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
45 Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
47 //TODO: fix labels angles to work with layout
46 //TODO: fix labels angles to work with layout
48 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
47 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
49 Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
48 Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
50 //TODO: make wrapping of color for qml
51 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
49 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
52 //grid
50 //grid
53 Q_PROPERTY(bool gridVisible READ isGridLineVisible WRITE setGridLineVisible NOTIFY gridVisibleChanged)
51 Q_PROPERTY(bool gridVisible READ isGridLineVisible WRITE setGridLineVisible NOTIFY gridVisibleChanged)
54 Q_PROPERTY(QPen girdLinePen READ gridLinePen WRITE setGridLinePen NOTIFY gridLinePenChanged)
52 Q_PROPERTY(QPen gridLinePen READ gridLinePen WRITE setGridLinePen NOTIFY gridLinePenChanged)
55 //shades
53 //shades
56 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
54 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
57 //TODO: make wrapping of color for qml
58 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
55 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
59 //TODO: make wrapping of border for qml
56 //TODO: make wrapping of border for qml
60 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
57 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
@@ -173,14 +170,14 Q_SIGNALS:
173 void labelsColorChanged(QColor color);
170 void labelsColorChanged(QColor color);
174 void titleTextChanged(const QString& title);
171 void titleTextChanged(const QString& title);
175 void titlePenChanged(const QPen& pen);
172 void titlePenChanged(const QPen& pen);
176 void titleBrushChanged(const QBrush brush);
173 void titleBrushChanged(const QBrush& brush);
177 void titleVisibleChanged(bool visible);
174 void titleVisibleChanged(bool visible);
178 void titleFontChanged(const QFont& font);
175 void titleFontChanged(const QFont& font);
179 void shadesVisibleChanged(bool visible);
176 void shadesVisibleChanged(bool visible);
180 void shadesColorChanged(QColor color);
177 void shadesColorChanged(QColor color);
181 void shadesBorderColorChanged(QColor color);
178 void shadesBorderColorChanged(QColor color);
182 void shadesPenChanged(const QPen& pen);
179 void shadesPenChanged(const QPen& pen);
183 void shadesBrushChanged(const QBrush brush);
180 void shadesBrushChanged(const QBrush& brush);
184
181
185 protected:
182 protected:
186 QScopedPointer<QAbstractAxisPrivate> d_ptr;
183 QScopedPointer<QAbstractAxisPrivate> d_ptr;
@@ -28,22 +28,23 Row {
28 Flow {
28 Flow {
29 spacing: 5
29 spacing: 5
30 flow: Flow.TopToBottom
30 flow: Flow.TopToBottom
31 height: parent.height
31
32
32 Button {
33 Button {
33 text: "axis visible"
34 text: "axis visible"
34 onClicked: axis.visible = !axis.visible;
35 onClicked: axis.visible = !axis.visible;
35 }
36 }
36 Button {
37 Button {
37 text: "axis grid visible"
38 text: "axis line visible"
38 onClicked: axis.gridVisible = !axis.gridVisible;
39 onClicked: axis.lineVisible = !axis.lineVisible;
39 }
40 }
40 Button {
41 Button {
41 text: "axis color"
42 text: "axis color"
42 onClicked: axis.color = main.nextColor();
43 onClicked: axis.color = main.nextColor();
43 }
44 }
44 Button {
45 Button {
45 text: "axis labels color"
46 text: "axis labels visible"
46 onClicked: axis.labelsColor = main.nextColor();
47 onClicked: axis.labelsVisible = !axis.labelsVisible;
47 }
48 }
48 Button {
49 Button {
49 text: "axis labels angle +"
50 text: "axis labels angle +"
@@ -54,6 +55,14 Row {
54 onClicked: axis.labelsAngle -= 5;
55 onClicked: axis.labelsAngle -= 5;
55 }
56 }
56 Button {
57 Button {
58 text: "axis labels color"
59 onClicked: axis.labelsColor = main.nextColor();
60 }
61 Button {
62 text: "axis grid visible"
63 onClicked: axis.gridVisible = !axis.gridVisible;
64 }
65 Button {
57 text: "axis shades visible"
66 text: "axis shades visible"
58 onClicked: axis.shadesVisible = !axis.shadesVisible;
67 onClicked: axis.shadesVisible = !axis.shadesVisible;
59 }
68 }
@@ -66,6 +75,14 Row {
66 onClicked: axis.shadesBorderColor = main.nextColor();
75 onClicked: axis.shadesBorderColor = main.nextColor();
67 }
76 }
68 Button {
77 Button {
78 text: "axis title text"
79 onClicked: axis.titleText = axis.titleText + "X";
80 }
81 Button {
82 text: "axis title visible"
83 onClicked: axis.titleVisible = !axis.titleVisible;
84 }
85 Button {
69 text: "axis max +"
86 text: "axis max +"
70 onClicked: axis.max += 0.1;
87 onClicked: axis.max += 0.1;
71 }
88 }
@@ -94,13 +111,21 Row {
94 text: "axis nice nmb"
111 text: "axis nice nmb"
95 onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled;
112 onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled;
96 }
113 }
97 }
98
114
99 FontEditor {
115 FontEditor {
100 id: fontEditor
116 id: fontEditor
101 fontDescription: "axis"
117 fontDescription: "axis"
102 function editedFont() {
118 function editedFont() {
103 return axis.labelsFont;
119 return axis.labelsFont;
120 }
121 }
122
123 FontEditor {
124 id: titleFontEditor
125 fontDescription: "title"
126 function editedFont() {
127 return axis.titleFont;
128 }
104 }
129 }
105 }
130 }
106 }
131 }
General Comments 0
You need to be logged in to leave comments. Login now