##// END OF EJS Templates
QML support for LogValueAxis...
Miikka Heikkinen -
r2493:0a1f68456574
parent child
Show More
@@ -36,6 +36,7
36 <li><a href="qml-polarchartview.html">PolarChartView</a></li>
36 <li><a href="qml-polarchartview.html">PolarChartView</a></li>
37 <li><a href="qml-abstractaxis.html">AbstractAxis</a></li>
37 <li><a href="qml-abstractaxis.html">AbstractAxis</a></li>
38 <li><a href="qml-valueaxis.html">ValueAxis</a></li>
38 <li><a href="qml-valueaxis.html">ValueAxis</a></li>
39 <li><a href="qml-logvaluesaxis.html">LogValueAxis</a></li>
39 <li><a href="qml-categoryaxis.html">CategoryAxis</a></li>
40 <li><a href="qml-categoryaxis.html">CategoryAxis</a></li>
40 <li><a href="qml-categoryrange.html">CategoryRange</a></li>
41 <li><a href="qml-categoryrange.html">CategoryRange</a></li>
41 <li><a href="qml-barcategoryaxis.html">BarCategoryAxis</a></li>
42 <li><a href="qml-barcategoryaxis.html">BarCategoryAxis</a></li>
@@ -28,6 +28,7
28 #include "declarativescatterseries.h"
28 #include "declarativescatterseries.h"
29 #include "qbarcategoryaxis.h"
29 #include "qbarcategoryaxis.h"
30 #include "qvalueaxis.h"
30 #include "qvalueaxis.h"
31 #include "qlogvalueaxis.h"
31 #include "qcategoryaxis.h"
32 #include "qcategoryaxis.h"
32 #include "qabstractseries_p.h"
33 #include "qabstractseries_p.h"
33 #include "declarativemargins.h"
34 #include "declarativemargins.h"
@@ -762,6 +763,8 QAbstractAxis *DeclarativeChart::defaultAxis(Qt::Orientation orientation, QAbstr
762 case QAbstractAxis::AxisTypeDateTime:
763 case QAbstractAxis::AxisTypeDateTime:
763 return new QDateTimeAxis(this);
764 return new QDateTimeAxis(this);
764 #endif
765 #endif
766 case QAbstractAxis::AxisTypeLogValue:
767 return new QLogValueAxis(this);
765 default:
768 default:
766 // assume AxisTypeNoAxis
769 // assume AxisTypeNoAxis
767 return 0;
770 return 0;
@@ -21,6 +21,7
21 #include "qchart.h"
21 #include "qchart.h"
22 #include "qabstractaxis.h"
22 #include "qabstractaxis.h"
23 #include "qvalueaxis.h"
23 #include "qvalueaxis.h"
24 #include "qlogvalueaxis.h"
24 #include "declarativecategoryaxis.h"
25 #include "declarativecategoryaxis.h"
25 #include "qbarcategoryaxis.h"
26 #include "qbarcategoryaxis.h"
26 #include "declarativechart.h"
27 #include "declarativechart.h"
@@ -83,6 +84,7 Q_DECLARE_METATYPE(QValueAxis *)
83 Q_DECLARE_METATYPE(QBarCategoryAxis *)
84 Q_DECLARE_METATYPE(QBarCategoryAxis *)
84 Q_DECLARE_METATYPE(QCategoryAxis *)
85 Q_DECLARE_METATYPE(QCategoryAxis *)
85 Q_DECLARE_METATYPE(QDateTimeAxis *)
86 Q_DECLARE_METATYPE(QDateTimeAxis *)
87 Q_DECLARE_METATYPE(QLogValueAxis *)
86
88
87 Q_DECLARE_METATYPE(QLegend *)
89 Q_DECLARE_METATYPE(QLegend *)
88 Q_DECLARE_METATYPE(QLegendMarker *)
90 Q_DECLARE_METATYPE(QLegendMarker *)
@@ -232,6 +234,7 public:
232 qmlRegisterType<DeclarativeScatterSeries, 3>(uri, 1, 3, "ScatterSeries");
234 qmlRegisterType<DeclarativeScatterSeries, 3>(uri, 1, 3, "ScatterSeries");
233 qmlRegisterType<DeclarativeLineSeries, 3>(uri, 1, 3, "LineSeries");
235 qmlRegisterType<DeclarativeLineSeries, 3>(uri, 1, 3, "LineSeries");
234 qmlRegisterType<DeclarativeAreaSeries, 3>(uri, 1, 3, "AreaSeries");
236 qmlRegisterType<DeclarativeAreaSeries, 3>(uri, 1, 3, "AreaSeries");
237 qmlRegisterType<QLogValueAxis>(uri, 1, 3, "LogValueAxis");
235 }
238 }
236 };
239 };
237
240
@@ -41,23 +41,52 QTCOMMERCIALCHART_BEGIN_NAMESPACE
41 */
41 */
42
42
43 /*!
43 /*!
44 \qmlclass LogValuesAxis QLogValueAxis
45 \brief The LogValueAxis element is used for manipulating chart's axes
46 \inherits AbstractAxis
47
48 \note If a LogValueAxis is attached to a series with one or more points with
49 negative or zero values on the associated dimension, the series will not be
50 plotted at all. This is particularly relevant when XYModelMappers are used,
51 since empty cells in models typically contain zero values.
52 */
53
54 /*!
44 \property QLogValueAxis::min
55 \property QLogValueAxis::min
45 Defines the minimum value on the axis.
56 Defines the minimum value on the axis.
46 When setting this property the max is adjusted if necessary, to ensure that the range remains valid.
57 When setting this property the max is adjusted if necessary, to ensure that the range remains valid.
47 Value has to be greater then 0.
58 Value has to be greater than 0.
59 */
60 /*!
61 \qmlproperty real LogValuesAxis::min
62 Defines the minimum value on the axis.
63 When setting this property the max is adjusted if necessary, to ensure that the range remains valid.
64 Value has to be greater than 0.
48 */
65 */
49
66
50 /*!
67 /*!
51 \property QLogValueAxis::max
68 \property QLogValueAxis::max
52 Defines the maximum value on the axis.
69 Defines the maximum value on the axis.
53 When setting this property the min is adjusted if necessary, to ensure that the range remains valid.
70 When setting this property the min is adjusted if necessary, to ensure that the range remains valid.
54 Value has to be greater then 0.
71 Value has to be greater than 0.
72 */
73 /*!
74 \qmlproperty real LogValuesAxis::max
75 Defines the maximum value on the axis.
76 When setting this property the min is adjusted if necessary, to ensure that the range remains valid.
77 Value has to be greater than 0.
55 */
78 */
56
79
57 /*!
80 /*!
58 \property QLogValueAxis::base
81 \property QLogValueAxis::base
59 Defines the base of the logarithm.
82 Defines the base of the logarithm.
60 Value has to be greater then 0 and not equal 1
83 Value has to be greater than 0 and not equal 1
84 */
85 /*!
86 \qmlproperty real LogValuesAxis::base
87 Defines the maximum value on the axis.
88 Defines the base of the logarithm.
89 Value has to be greater than 0 and not equal 1
61 */
90 */
62
91
63 /*!
92 /*!
@@ -66,16 +95,30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
66 Supported specifiers are: d, i, o, x, X, f, F, e, E, g, G, c
95 Supported specifiers are: d, i, o, x, X, f, F, e, E, g, G, c
67 See QString::sprintf() for additional details.
96 See QString::sprintf() for additional details.
68 */
97 */
98 /*!
99 \qmlproperty real LogValuesAxis::labelFormat
100 Defines the label format of the axis.
101 Supported specifiers are: d, i, o, x, X, f, F, e, E, g, G, c
102 See QString::sprintf() for additional details.
103 */
69
104
70 /*!
105 /*!
71 \fn void QLogValueAxis::minChanged(qreal min)
106 \fn void QLogValueAxis::minChanged(qreal min)
72 Axis emits signal when \a min of axis has changed.
107 Axis emits signal when \a min of axis has changed.
73 */
108 */
109 /*!
110 \qmlsignal LogValuesAxis::onMinChanged(qreal min)
111 Axis emits signal when \a min of axis has changed.
112 */
74
113
75 /*!
114 /*!
76 \fn void QLogValueAxis::maxChanged(qreal max)
115 \fn void QLogValueAxis::maxChanged(qreal max)
77 Axis emits signal when \a max of axis has changed.
116 Axis emits signal when \a max of axis has changed.
78 */
117 */
118 /*!
119 \qmlsignal LogValuesAxis::onMaxChanged(qreal max)
120 Axis emits signal when \a max of axis has changed.
121 */
79
122
80 /*!
123 /*!
81 \fn void QLogValueAxis::rangeChanged(qreal min, qreal max)
124 \fn void QLogValueAxis::rangeChanged(qreal min, qreal max)
@@ -86,11 +129,19 QTCOMMERCIALCHART_BEGIN_NAMESPACE
86 \fn void QLogValueAxis::labelFormatChanged(const QString &format)
129 \fn void QLogValueAxis::labelFormatChanged(const QString &format)
87 Axis emits signal when \a format of axis labels has changed.
130 Axis emits signal when \a format of axis labels has changed.
88 */
131 */
132 /*!
133 \qmlsignal LogValueAxis::labelFormatChanged(const QString &format)
134 Axis emits signal when \a format of axis labels has changed.
135 */
89
136
90 /*!
137 /*!
91 \fn void QLogValueAxis::baseChanged(qreal base)
138 \fn void QLogValueAxis::baseChanged(qreal base)
92 Axis emits signal when \a base of logarithm of the axis has changed.
139 Axis emits signal when \a base of logarithm of the axis has changed.
93 */
140 */
141 /*!
142 \qmlsignal LogValuesAxis::baseChanged(qreal base)
143 Axis emits signal when \a base of logarithm of the axis has changed.
144 */
94
145
95 /*!
146 /*!
96 Constructs an axis object which is a child of \a parent.
147 Constructs an axis object which is a child of \a parent.
General Comments 0
You need to be logged in to leave comments. Login now