##// 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 92 \property QAbstractAxis::labelsVisible
88 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 111 \property QAbstractAxis::visible
97 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 143 \property QAbstractAxis::labelsFont
124 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 210 \property QAbstractAxis::titleVisible
181 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 238 \property QAbstractAxis::titleFont
190 239 The font of the title of the axis.
191 240 */
192 241 /*!
193 \qmlproperty Font AbstractAxis::title
242 \qmlproperty Font AbstractAxis::titleFont
194 243 The font of the title of the axis.
195 244 */
196 245
197 246 /*!
198 \property QAbstractAxis::title
199 The title of the axis. Empty by default.
247 \property QAbstractAxis::orientation
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
203 The title of the axis. Empty string by default.
251 \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 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 279 \fn void QAbstractAxis::lineVisibleChanged(bool visible)
226 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 325 \fn void QAbstractAxis::gridVisibleChanged(bool visible)
244 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 339 \fn void QAbstractAxis::colorChanged(QColor color)
253 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 394 \fn void QAbstractAxis::shadesVisibleChanged(bool)
271 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 431 \internal
298 432 Constructs new axis object which is a child of \a parent. Ownership is taken by
299 433 QChart when axis added.
@@ -38,23 +38,20 class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject
38 38 //arrow
39 39 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
40 40 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
41 //TODO: make wrapping of color for qml
42 41 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
43 42 //labels
44 43 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
45 Q_PROPERTY(QPen lablesPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged)
46 Q_PROPERTY(QBrush lablesBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
44 Q_PROPERTY(QPen labelsPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged)
45 Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
47 46 //TODO: fix labels angles to work with layout
48 47 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
49 48 Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
50 //TODO: make wrapping of color for qml
51 49 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
52 50 //grid
53 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 53 //shades
56 54 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
57 //TODO: make wrapping of color for qml
58 55 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
59 56 //TODO: make wrapping of border for qml
60 57 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
@@ -173,14 +170,14 Q_SIGNALS:
173 170 void labelsColorChanged(QColor color);
174 171 void titleTextChanged(const QString& title);
175 172 void titlePenChanged(const QPen& pen);
176 void titleBrushChanged(const QBrush brush);
173 void titleBrushChanged(const QBrush& brush);
177 174 void titleVisibleChanged(bool visible);
178 175 void titleFontChanged(const QFont& font);
179 176 void shadesVisibleChanged(bool visible);
180 177 void shadesColorChanged(QColor color);
181 178 void shadesBorderColorChanged(QColor color);
182 179 void shadesPenChanged(const QPen& pen);
183 void shadesBrushChanged(const QBrush brush);
180 void shadesBrushChanged(const QBrush& brush);
184 181
185 182 protected:
186 183 QScopedPointer<QAbstractAxisPrivate> d_ptr;
@@ -28,22 +28,23 Row {
28 28 Flow {
29 29 spacing: 5
30 30 flow: Flow.TopToBottom
31 height: parent.height
31 32
32 33 Button {
33 34 text: "axis visible"
34 35 onClicked: axis.visible = !axis.visible;
35 36 }
36 37 Button {
37 text: "axis grid visible"
38 onClicked: axis.gridVisible = !axis.gridVisible;
38 text: "axis line visible"
39 onClicked: axis.lineVisible = !axis.lineVisible;
39 40 }
40 41 Button {
41 42 text: "axis color"
42 43 onClicked: axis.color = main.nextColor();
43 44 }
44 45 Button {
45 text: "axis labels color"
46 onClicked: axis.labelsColor = main.nextColor();
46 text: "axis labels visible"
47 onClicked: axis.labelsVisible = !axis.labelsVisible;
47 48 }
48 49 Button {
49 50 text: "axis labels angle +"
@@ -54,6 +55,14 Row {
54 55 onClicked: axis.labelsAngle -= 5;
55 56 }
56 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 66 text: "axis shades visible"
58 67 onClicked: axis.shadesVisible = !axis.shadesVisible;
59 68 }
@@ -66,6 +75,14 Row {
66 75 onClicked: axis.shadesBorderColor = main.nextColor();
67 76 }
68 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 86 text: "axis max +"
70 87 onClicked: axis.max += 0.1;
71 88 }
@@ -94,7 +111,6 Row {
94 111 text: "axis nice nmb"
95 112 onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled;
96 113 }
97 }
98 114
99 115 FontEditor {
100 116 id: fontEditor
@@ -103,4 +119,13 Row {
103 119 return axis.labelsFont;
104 120 }
105 121 }
122
123 FontEditor {
124 id: titleFontEditor
125 fontDescription: "title"
126 function editedFont() {
127 return axis.titleFont;
128 }
129 }
130 }
106 131 }
General Comments 0
You need to be logged in to leave comments. Login now