##// END OF EJS Templates
QML API versioning to QtCommercial.Chart 1.1
Tero Ahola -
r1857:58a3a87ea08b
parent child
Show More
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -31,7 +31,7 Rectangle {
31 legend.alignment: Qt.AlignBottom
31 legend.alignment: Qt.AlignBottom
32
32
33 HorizontalStackedBarSeries {
33 HorizontalStackedBarSeries {
34 axisY: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
34 axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -31,7 +31,7 Rectangle {
31 legend.alignment: Qt.AlignBottom
31 legend.alignment: Qt.AlignBottom
32
32
33 HorizontalPercentBarSeries {
33 HorizontalPercentBarSeries {
34 axisY: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
34 axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -32,7 +32,7 Rectangle {
32
32
33 BarSeries {
33 BarSeries {
34 id: mySeries
34 id: mySeries
35 axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
35 axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
36 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
36 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
37 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
37 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
38 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
38 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -32,7 +32,7 Rectangle {
32
32
33 StackedBarSeries {
33 StackedBarSeries {
34 id: mySeries
34 id: mySeries
35 axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
35 axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
36 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
36 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
37 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
37 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
38 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
38 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -31,7 +31,7 Rectangle {
31 legend.alignment: Qt.AlignBottom
31 legend.alignment: Qt.AlignBottom
32
32
33 PercentBarSeries {
33 PercentBarSeries {
34 axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
34 axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 anchors.fill: parent
25 anchors.fill: parent
@@ -31,7 +31,7 Rectangle {
31 legend.alignment: Qt.AlignBottom
31 legend.alignment: Qt.AlignBottom
32
32
33 HorizontalBarSeries {
33 HorizontalBarSeries {
34 axisY: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
34 axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
35 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
36 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
37 BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23 import QmlCustomModel 1.0
23 import QmlCustomModel 1.0
24
24
25 Rectangle {
25 Rectangle {
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.1
21 import QtQuick 1.1
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 width: 360
25 width: 360
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 //![1]
24 //![1]
25 ChartView {
25 ChartView {
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.1
21 import QtQuick 1.1
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 Rectangle {
24 Rectangle {
25 width: 360
25 width: 360
@@ -20,7 +20,7
20
20
21 //![1]
21 //![1]
22 import QtQuick 1.0
22 import QtQuick 1.0
23 import QtCommercial.Chart 1.0
23 import QtCommercial.Chart 1.1
24
24
25 ChartView {
25 ChartView {
26 width: 400
26 width: 400
@@ -31,8 +31,8 class DeclarativeAreaSeries : public QAreaSeries
31 Q_OBJECT
31 Q_OBJECT
32 Q_PROPERTY(DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries)
32 Q_PROPERTY(DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries)
33 Q_PROPERTY(DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries)
33 Q_PROPERTY(DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries)
34 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
34 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
35 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
35 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
36
36
37 public:
37 public:
38 explicit DeclarativeAreaSeries(QObject *parent = 0);
38 explicit DeclarativeAreaSeries(QObject *parent = 0);
@@ -46,8 +46,8 public:
46 void setAxisY(QAbstractAxis *axis) { m_axisY = axis; emit axisYChanged(axis); }
46 void setAxisY(QAbstractAxis *axis) { m_axisY = axis; emit axisYChanged(axis); }
47
47
48 Q_SIGNALS:
48 Q_SIGNALS:
49 void axisXChanged(QAbstractAxis *axis);
49 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
50 void axisYChanged(QAbstractAxis *axis);
50 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
51
51
52 private:
52 private:
53 QAbstractAxis *m_axisX;
53 QAbstractAxis *m_axisX;
@@ -63,8 +63,8 class DeclarativeBarSeries : public QBarSeries, public QDeclarativeParserStatus
63 {
63 {
64 Q_OBJECT
64 Q_OBJECT
65 Q_INTERFACES(QDeclarativeParserStatus)
65 Q_INTERFACES(QDeclarativeParserStatus)
66 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
66 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
67 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
67 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
68 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
68 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
69 Q_CLASSINFO("DefaultProperty", "seriesChildren")
69 Q_CLASSINFO("DefaultProperty", "seriesChildren")
70
70
@@ -88,8 +88,8 public: // from QDeclarativeParserStatus
88 void componentComplete();
88 void componentComplete();
89
89
90 Q_SIGNALS:
90 Q_SIGNALS:
91 void axisXChanged(QAbstractAxis *axis);
91 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
92 void axisYChanged(QAbstractAxis *axis);
92 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
93
93
94 public Q_SLOTS:
94 public Q_SLOTS:
95 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
95 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -103,8 +103,8 class DeclarativeStackedBarSeries : public QStackedBarSeries, public QDeclarativ
103 {
103 {
104 Q_OBJECT
104 Q_OBJECT
105 Q_INTERFACES(QDeclarativeParserStatus)
105 Q_INTERFACES(QDeclarativeParserStatus)
106 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
106 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
107 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
107 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
108 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
108 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
109 Q_CLASSINFO("DefaultProperty", "seriesChildren")
109 Q_CLASSINFO("DefaultProperty", "seriesChildren")
110
110
@@ -128,8 +128,8 public: // from QDeclarativeParserStatus
128 void componentComplete();
128 void componentComplete();
129
129
130 Q_SIGNALS:
130 Q_SIGNALS:
131 void axisXChanged(QAbstractAxis *axis);
131 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
132 void axisYChanged(QAbstractAxis *axis);
132 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
133
133
134 public Q_SLOTS:
134 public Q_SLOTS:
135 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
135 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -143,8 +143,8 class DeclarativePercentBarSeries : public QPercentBarSeries, public QDeclarativ
143 {
143 {
144 Q_OBJECT
144 Q_OBJECT
145 Q_INTERFACES(QDeclarativeParserStatus)
145 Q_INTERFACES(QDeclarativeParserStatus)
146 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
146 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
147 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
147 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
148 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
148 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
149 Q_CLASSINFO("DefaultProperty", "seriesChildren")
149 Q_CLASSINFO("DefaultProperty", "seriesChildren")
150
150
@@ -168,8 +168,8 public: // from QDeclarativeParserStatus
168 void componentComplete();
168 void componentComplete();
169
169
170 Q_SIGNALS:
170 Q_SIGNALS:
171 void axisXChanged(QAbstractAxis *axis);
171 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
172 void axisYChanged(QAbstractAxis *axis);
172 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
173
173
174 public Q_SLOTS:
174 public Q_SLOTS:
175 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
175 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -183,8 +183,8 class DeclarativeHorizontalBarSeries : public QHorizontalBarSeries, public QDecl
183 {
183 {
184 Q_OBJECT
184 Q_OBJECT
185 Q_INTERFACES(QDeclarativeParserStatus)
185 Q_INTERFACES(QDeclarativeParserStatus)
186 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
186 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
187 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
187 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
188 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
188 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
189 Q_CLASSINFO("DefaultProperty", "seriesChildren")
189 Q_CLASSINFO("DefaultProperty", "seriesChildren")
190
190
@@ -208,8 +208,8 public: // from QDeclarativeParserStatus
208 void componentComplete();
208 void componentComplete();
209
209
210 Q_SIGNALS:
210 Q_SIGNALS:
211 void axisXChanged(QAbstractAxis *axis);
211 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
212 void axisYChanged(QAbstractAxis *axis);
212 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
213
213
214 public Q_SLOTS:
214 public Q_SLOTS:
215 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
215 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -223,8 +223,8 class DeclarativeHorizontalStackedBarSeries : public QHorizontalStackedBarSeries
223 {
223 {
224 Q_OBJECT
224 Q_OBJECT
225 Q_INTERFACES(QDeclarativeParserStatus)
225 Q_INTERFACES(QDeclarativeParserStatus)
226 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
226 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
227 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
227 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
228 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
228 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
229 Q_CLASSINFO("DefaultProperty", "seriesChildren")
229 Q_CLASSINFO("DefaultProperty", "seriesChildren")
230
230
@@ -248,8 +248,8 public: // from QDeclarativeParserStatus
248 void componentComplete();
248 void componentComplete();
249
249
250 Q_SIGNALS:
250 Q_SIGNALS:
251 void axisXChanged(QAbstractAxis *axis);
251 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
252 void axisYChanged(QAbstractAxis *axis);
252 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
253
253
254 public Q_SLOTS:
254 public Q_SLOTS:
255 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
255 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -263,8 +263,8 class DeclarativeHorizontalPercentBarSeries : public QHorizontalPercentBarSeries
263 {
263 {
264 Q_OBJECT
264 Q_OBJECT
265 Q_INTERFACES(QDeclarativeParserStatus)
265 Q_INTERFACES(QDeclarativeParserStatus)
266 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
266 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
267 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
267 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
268 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
268 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
269 Q_CLASSINFO("DefaultProperty", "seriesChildren")
269 Q_CLASSINFO("DefaultProperty", "seriesChildren")
270
270
@@ -288,8 +288,8 public: // from QDeclarativeParserStatus
288 void componentComplete();
288 void componentComplete();
289
289
290 Q_SIGNALS:
290 Q_SIGNALS:
291 void axisXChanged(QAbstractAxis *axis);
291 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
292 void axisYChanged(QAbstractAxis *axis);
292 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
293
293
294 public Q_SLOTS:
294 public Q_SLOTS:
295 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
295 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -33,8 +33,8 class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries, pu
33 Q_OBJECT
33 Q_OBJECT
34 Q_INTERFACES(QDeclarativeParserStatus)
34 Q_INTERFACES(QDeclarativeParserStatus)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
36 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
36 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
37 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
37 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
40
40
@@ -61,8 +61,8 public:
61
61
62 Q_SIGNALS:
62 Q_SIGNALS:
63 void countChanged(int count);
63 void countChanged(int count);
64 void axisXChanged(QAbstractAxis *axis);
64 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
65 void axisYChanged(QAbstractAxis *axis);
65 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
66
66
67 public Q_SLOTS:
67 public Q_SLOTS:
68 static void appendDeclarativeChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
68 static void appendDeclarativeChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -33,8 +33,8 class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeri
33 Q_OBJECT
33 Q_OBJECT
34 Q_INTERFACES(QDeclarativeParserStatus)
34 Q_INTERFACES(QDeclarativeParserStatus)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
36 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
36 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
37 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
37 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
40
40
@@ -61,8 +61,8 public:
61
61
62 Q_SIGNALS:
62 Q_SIGNALS:
63 void countChanged(int count);
63 void countChanged(int count);
64 void axisXChanged(QAbstractAxis *axis);
64 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
65 void axisYChanged(QAbstractAxis *axis);
65 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
66
66
67 public Q_SLOTS:
67 public Q_SLOTS:
68 static void appendDeclarativeChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
68 static void appendDeclarativeChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -33,8 +33,8 class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries
33 Q_OBJECT
33 Q_OBJECT
34 Q_INTERFACES(QDeclarativeParserStatus)
34 Q_INTERFACES(QDeclarativeParserStatus)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
36 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
36 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1)
37 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
37 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
40
40
@@ -61,8 +61,8 public:
61
61
62 Q_SIGNALS:
62 Q_SIGNALS:
63 void countChanged(int count);
63 void countChanged(int count);
64 void axisXChanged(QAbstractAxis *axis);
64 Q_REVISION(1) void axisXChanged(QAbstractAxis *axis);
65 void axisYChanged(QAbstractAxis *axis);
65 Q_REVISION(1) void axisYChanged(QAbstractAxis *axis);
66
66
67 public Q_SLOTS:
67 public Q_SLOTS:
68 static void appendDeclarativeChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
68 static void appendDeclarativeChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
@@ -50,6 +50,7 public:
50 {
50 {
51 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart"));
51 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart"));
52
52
53 // QtCommercial.Chart 1.0
53 qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView");
54 qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView");
54 qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint");
55 qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint");
55 qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries");
56 qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries");
@@ -59,9 +60,6 public:
59 qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries");
60 qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries");
60 qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries");
61 qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries");
61 qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries");
62 qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries");
62 qmlRegisterType<DeclarativeHorizontalBarSeries>(uri, 1, 0, "HorizontalBarSeries");
63 qmlRegisterType<DeclarativeHorizontalStackedBarSeries>(uri, 1, 0, "HorizontalStackedBarSeries");
64 qmlRegisterType<DeclarativeHorizontalPercentBarSeries>(uri, 1, 0, "HorizontalPercentBarSeries");
65 qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries");
63 qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries");
66 qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice");
64 qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice");
67 qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet");
65 qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet");
@@ -71,9 +69,8 public:
71 qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper");
69 qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper");
72 qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper");
70 qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper");
73 qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper");
71 qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper");
74 qmlRegisterType<QValueAxis>(uri, 1, 0, "ValueAxis");
72 qmlRegisterType<QValueAxis>(uri, 1, 0, "ValuesAxis");
75 qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis");
73 qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis");
76
77 qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend",
74 qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend",
78 QLatin1String("Trying to create uncreatable: Legend."));
75 QLatin1String("Trying to create uncreatable: Legend."));
79 qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries",
76 qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries",
@@ -92,6 +89,49 public:
92 QLatin1String("Trying to create uncreatable: AbstractBarSeries."));
89 QLatin1String("Trying to create uncreatable: AbstractBarSeries."));
93 qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis",
90 qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis",
94 QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead."));
91 QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead."));
92
93 // QtCommercial.Chart 1.1
94 qmlRegisterType<DeclarativeChart>(uri, 1, 1, "ChartView");
95 qmlRegisterType<DeclarativeXYPoint>(uri, 1, 1, "XYPoint");
96 qmlRegisterType<DeclarativeScatterSeries, 1>(uri, 1, 1, "ScatterSeries");
97 qmlRegisterType<DeclarativeLineSeries, 1>(uri, 1, 1, "LineSeries");
98 qmlRegisterType<DeclarativeSplineSeries, 1>(uri, 1, 1, "SplineSeries");
99 qmlRegisterType<DeclarativeAreaSeries, 1>(uri, 1, 1, "AreaSeries");
100 qmlRegisterType<DeclarativeBarSeries, 1>(uri, 1, 1, "BarSeries");
101 qmlRegisterType<DeclarativeStackedBarSeries, 1>(uri, 1, 1, "StackedBarSeries");
102 qmlRegisterType<DeclarativePercentBarSeries, 1>(uri, 1, 1, "PercentBarSeries");
103 qmlRegisterType<DeclarativeHorizontalBarSeries, 1>(uri, 1, 1, "HorizontalBarSeries");
104 qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 1>(uri, 1, 1, "HorizontalStackedBarSeries");
105 qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 1>(uri, 1, 1, "HorizontalPercentBarSeries");
106 qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries");
107 qmlRegisterType<QPieSlice>(uri, 1, 1, "PieSlice");
108 qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet");
109 qmlRegisterType<QHXYModelMapper>(uri, 1, 1, "HXYModelMapper");
110 qmlRegisterType<QVXYModelMapper>(uri, 1, 1, "VXYModelMapper");
111 qmlRegisterType<QHPieModelMapper>(uri, 1, 1, "HPieModelMapper");
112 qmlRegisterType<QVPieModelMapper>(uri, 1, 1, "VPieModelMapper");
113 qmlRegisterType<QHBarModelMapper>(uri, 1, 1, "HBarModelMapper");
114 qmlRegisterType<QVBarModelMapper>(uri, 1, 1, "VBarModelMapper");
115 qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis");
116 qmlRegisterType<QBarCategoryAxis>(uri, 1, 1, "BarCategoryAxis");
117 qmlRegisterUncreatableType<QLegend>(uri, 1, 1, "Legend",
118 QLatin1String("Trying to create uncreatable: Legend."));
119 qmlRegisterUncreatableType<QXYSeries>(uri, 1, 1, "XYSeries",
120 QLatin1String("Trying to create uncreatable: XYSeries."));
121 qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 1, "AbstractItemModel",
122 QLatin1String("Trying to create uncreatable: AbstractItemModel."));
123 qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 1, "XYModelMapper",
124 QLatin1String("Trying to create uncreatable: XYModelMapper."));
125 qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 1, "PieModelMapper",
126 QLatin1String("Trying to create uncreatable: PieModelMapper."));
127 qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 1, "BarModelMapper",
128 QLatin1String("Trying to create uncreatable: BarModelMapper."));
129 qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 1, "AbstractSeries",
130 QLatin1String("Trying to create uncreatable: AbstractSeries."));
131 qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 1, "AbstractBarSeries",
132 QLatin1String("Trying to create uncreatable: AbstractBarSeries."));
133 qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 1, "AbstractAxis",
134 QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead."));
95 }
135 }
96 };
136 };
97
137
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "user defined axes"
25 title: "user defined axes"
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "configuring dynamically"
25 title: "configuring dynamically"
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "series specific dynamic axes"
25 title: "series specific dynamic axes"
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "area series"
25 title: "area series"
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "Bar series"
25 title: "Bar series"
@@ -34,7 +34,7 ChartView {
34 BarSeries {
34 BarSeries {
35 id: mySeries
35 id: mySeries
36 name: "bar"
36 name: "bar"
37 axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
37 axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
38 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
38 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
39 onClicked: console.log("barset.onClicked: " + index);
39 onClicked: console.log("barset.onClicked: " + index);
40 onHovered: console.log("barset.onHovered: " + status);
40 onHovered: console.log("barset.onHovered: " + status);
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 property variant series: lineSeries
25 property variant series: lineSeries
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "Percent bar series"
25 title: "Percent bar series"
@@ -33,7 +33,7 ChartView {
33 PercentBarSeries {
33 PercentBarSeries {
34 id: mySeries
34 id: mySeries
35 name: "bar"
35 name: "bar"
36 axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
36 axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
37
37
38 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
38 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
39 onClicked: console.log("barset.onClicked: " + index);
39 onClicked: console.log("barset.onClicked: " + index);
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 id: chart
25 id: chart
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "scatter series"
25 title: "scatter series"
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "spline series"
25 title: "spline series"
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.1
23
23
24 ChartView {
24 ChartView {
25 title: "Stacked bar series"
25 title: "Stacked bar series"
@@ -33,7 +33,7 ChartView {
33 StackedBarSeries {
33 StackedBarSeries {
34 id: mySeries
34 id: mySeries
35 name: "bar"
35 name: "bar"
36 axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
36 axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
37 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
37 BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
38 onClicked: console.log("barset.onClicked: " + index);
38 onClicked: console.log("barset.onClicked: " + index);
39 onHovered: console.log("barset.onHovered: " + status);
39 onHovered: console.log("barset.onHovered: " + status);
General Comments 0
You need to be logged in to leave comments. Login now