From 58a3a87ea08bab18f524cf109c174c881250f72f 2012-08-27 10:01:23 From: Tero Ahola Date: 2012-08-27 10:01:23 Subject: [PATCH] QML API versioning to QtCommercial.Chart 1.1 --- diff --git a/demos/qmlchart/qml/qmlchart/View1.qml b/demos/qmlchart/qml/qmlchart/View1.qml index dc44adc..ee88270 100644 --- a/demos/qmlchart/qml/qmlchart/View1.qml +++ b/demos/qmlchart/qml/qmlchart/View1.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent diff --git a/demos/qmlchart/qml/qmlchart/View10.qml b/demos/qmlchart/qml/qmlchart/View10.qml index 15912cb..4c5e794 100644 --- a/demos/qmlchart/qml/qmlchart/View10.qml +++ b/demos/qmlchart/qml/qmlchart/View10.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent @@ -31,7 +31,7 @@ Rectangle { legend.alignment: Qt.AlignBottom HorizontalStackedBarSeries { - axisY: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlchart/qml/qmlchart/View11.qml b/demos/qmlchart/qml/qmlchart/View11.qml index fdf27ac..d09a95d 100644 --- a/demos/qmlchart/qml/qmlchart/View11.qml +++ b/demos/qmlchart/qml/qmlchart/View11.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent @@ -31,7 +31,7 @@ Rectangle { legend.alignment: Qt.AlignBottom HorizontalPercentBarSeries { - axisY: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlchart/qml/qmlchart/View12.qml b/demos/qmlchart/qml/qmlchart/View12.qml index 2e459c3..1ee0129 100644 --- a/demos/qmlchart/qml/qmlchart/View12.qml +++ b/demos/qmlchart/qml/qmlchart/View12.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent diff --git a/demos/qmlchart/qml/qmlchart/View2.qml b/demos/qmlchart/qml/qmlchart/View2.qml index 057027a..a8c32c6 100644 --- a/demos/qmlchart/qml/qmlchart/View2.qml +++ b/demos/qmlchart/qml/qmlchart/View2.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent diff --git a/demos/qmlchart/qml/qmlchart/View3.qml b/demos/qmlchart/qml/qmlchart/View3.qml index 1df7b6e..8e970be 100644 --- a/demos/qmlchart/qml/qmlchart/View3.qml +++ b/demos/qmlchart/qml/qmlchart/View3.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent diff --git a/demos/qmlchart/qml/qmlchart/View4.qml b/demos/qmlchart/qml/qmlchart/View4.qml index 02101e5..940f8e5 100644 --- a/demos/qmlchart/qml/qmlchart/View4.qml +++ b/demos/qmlchart/qml/qmlchart/View4.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent diff --git a/demos/qmlchart/qml/qmlchart/View5.qml b/demos/qmlchart/qml/qmlchart/View5.qml index c10599c..94a8a60 100644 --- a/demos/qmlchart/qml/qmlchart/View5.qml +++ b/demos/qmlchart/qml/qmlchart/View5.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent diff --git a/demos/qmlchart/qml/qmlchart/View6.qml b/demos/qmlchart/qml/qmlchart/View6.qml index b4c02b0..12cebd1 100644 --- a/demos/qmlchart/qml/qmlchart/View6.qml +++ b/demos/qmlchart/qml/qmlchart/View6.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent @@ -32,7 +32,7 @@ Rectangle { BarSeries { id: mySeries - axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlchart/qml/qmlchart/View7.qml b/demos/qmlchart/qml/qmlchart/View7.qml index c3dc8ca..eeb9cec 100644 --- a/demos/qmlchart/qml/qmlchart/View7.qml +++ b/demos/qmlchart/qml/qmlchart/View7.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent @@ -32,7 +32,7 @@ Rectangle { StackedBarSeries { id: mySeries - axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlchart/qml/qmlchart/View8.qml b/demos/qmlchart/qml/qmlchart/View8.qml index a507208..0a50108 100644 --- a/demos/qmlchart/qml/qmlchart/View8.qml +++ b/demos/qmlchart/qml/qmlchart/View8.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent @@ -31,7 +31,7 @@ Rectangle { legend.alignment: Qt.AlignBottom PercentBarSeries { - axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlchart/qml/qmlchart/View9.qml b/demos/qmlchart/qml/qmlchart/View9.qml index cf94d98..dccf9ff 100644 --- a/demos/qmlchart/qml/qmlchart/View9.qml +++ b/demos/qmlchart/qml/qmlchart/View9.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { anchors.fill: parent @@ -31,7 +31,7 @@ Rectangle { legend.alignment: Qt.AlignBottom HorizontalBarSeries { - axisY: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlcustommodel/qml/qmlcustommodel/main.qml b/demos/qmlcustommodel/qml/qmlcustommodel/main.qml index 9047369..74ea2eb 100644 --- a/demos/qmlcustommodel/qml/qmlcustommodel/main.qml +++ b/demos/qmlcustommodel/qml/qmlcustommodel/main.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 import QmlCustomModel 1.0 Rectangle { diff --git a/demos/qmlf1legends/qml/qmlf1legends/main.qml b/demos/qmlf1legends/qml/qmlf1legends/main.qml index 7bb8827..b172b99 100644 --- a/demos/qmlf1legends/qml/qmlf1legends/main.qml +++ b/demos/qmlf1legends/qml/qmlf1legends/main.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.1 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { width: 360 diff --git a/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml b/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml index 18ec68a..17592d5 100644 --- a/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml +++ b/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 //![1] ChartView { diff --git a/demos/qmlweather/qml/qmlweather/main.qml b/demos/qmlweather/qml/qmlweather/main.qml index 472a284..63f366e 100644 --- a/demos/qmlweather/qml/qmlweather/main.qml +++ b/demos/qmlweather/qml/qmlweather/main.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.1 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 Rectangle { width: 360 diff --git a/examples/qmlpiechart/qml/qmlpiechart/main.qml b/examples/qmlpiechart/qml/qmlpiechart/main.qml index 8fa6398..b405364 100644 --- a/examples/qmlpiechart/qml/qmlpiechart/main.qml +++ b/examples/qmlpiechart/qml/qmlpiechart/main.qml @@ -20,7 +20,7 @@ //![1] import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { width: 400 diff --git a/plugins/declarative/declarativeareaseries.h b/plugins/declarative/declarativeareaseries.h index 73a22b6..4fcd912 100644 --- a/plugins/declarative/declarativeareaseries.h +++ b/plugins/declarative/declarativeareaseries.h @@ -31,8 +31,8 @@ class DeclarativeAreaSeries : public QAreaSeries Q_OBJECT Q_PROPERTY(DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries) Q_PROPERTY(DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) public: explicit DeclarativeAreaSeries(QObject *parent = 0); @@ -46,8 +46,8 @@ public: void setAxisY(QAbstractAxis *axis) { m_axisY = axis; emit axisYChanged(axis); } Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); private: QAbstractAxis *m_axisX; diff --git a/plugins/declarative/declarativebarseries.h b/plugins/declarative/declarativebarseries.h index 5185930..3ed8adc 100644 --- a/plugins/declarative/declarativebarseries.h +++ b/plugins/declarative/declarativebarseries.h @@ -63,8 +63,8 @@ class DeclarativeBarSeries : public QBarSeries, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") @@ -88,8 +88,8 @@ public: // from QDeclarativeParserStatus void componentComplete(); Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); @@ -103,8 +103,8 @@ class DeclarativeStackedBarSeries : public QStackedBarSeries, public QDeclarativ { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") @@ -128,8 +128,8 @@ public: // from QDeclarativeParserStatus void componentComplete(); Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); @@ -143,8 +143,8 @@ class DeclarativePercentBarSeries : public QPercentBarSeries, public QDeclarativ { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") @@ -168,8 +168,8 @@ public: // from QDeclarativeParserStatus void componentComplete(); Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); @@ -183,8 +183,8 @@ class DeclarativeHorizontalBarSeries : public QHorizontalBarSeries, public QDecl { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") @@ -208,8 +208,8 @@ public: // from QDeclarativeParserStatus void componentComplete(); Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); @@ -223,8 +223,8 @@ class DeclarativeHorizontalStackedBarSeries : public QHorizontalStackedBarSeries { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") @@ -248,8 +248,8 @@ public: // from QDeclarativeParserStatus void componentComplete(); Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); @@ -263,8 +263,8 @@ class DeclarativeHorizontalPercentBarSeries : public QHorizontalPercentBarSeries { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") @@ -288,8 +288,8 @@ public: // from QDeclarativeParserStatus void componentComplete(); Q_SIGNALS: - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); diff --git a/plugins/declarative/declarativelineseries.h b/plugins/declarative/declarativelineseries.h index baed87a..29292d2 100644 --- a/plugins/declarative/declarativelineseries.h +++ b/plugins/declarative/declarativelineseries.h @@ -33,8 +33,8 @@ class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries, pu Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty declarativeChildren READ declarativeChildren) Q_CLASSINFO("DefaultProperty", "declarativeChildren") @@ -61,8 +61,8 @@ public: Q_SIGNALS: void countChanged(int count); - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendDeclarativeChildren(QDeclarativeListProperty *list, QObject *element); diff --git a/plugins/declarative/declarativescatterseries.h b/plugins/declarative/declarativescatterseries.h index f002539..d56e954 100644 --- a/plugins/declarative/declarativescatterseries.h +++ b/plugins/declarative/declarativescatterseries.h @@ -33,8 +33,8 @@ class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeri Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty declarativeChildren READ declarativeChildren) Q_CLASSINFO("DefaultProperty", "declarativeChildren") @@ -61,8 +61,8 @@ public: Q_SIGNALS: void countChanged(int count); - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendDeclarativeChildren(QDeclarativeListProperty *list, QObject *element); diff --git a/plugins/declarative/declarativesplineseries.h b/plugins/declarative/declarativesplineseries.h index 4f5f545..478e1c7 100644 --- a/plugins/declarative/declarativesplineseries.h +++ b/plugins/declarative/declarativesplineseries.h @@ -33,8 +33,8 @@ class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) + Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) + Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) Q_PROPERTY(QDeclarativeListProperty declarativeChildren READ declarativeChildren) Q_CLASSINFO("DefaultProperty", "declarativeChildren") @@ -61,8 +61,8 @@ public: Q_SIGNALS: void countChanged(int count); - void axisXChanged(QAbstractAxis *axis); - void axisYChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); + Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); public Q_SLOTS: static void appendDeclarativeChildren(QDeclarativeListProperty *list, QObject *element); diff --git a/plugins/declarative/plugin.cpp b/plugins/declarative/plugin.cpp index 024d84a..2aace60 100644 --- a/plugins/declarative/plugin.cpp +++ b/plugins/declarative/plugin.cpp @@ -50,6 +50,7 @@ public: { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart")); + // QtCommercial.Chart 1.0 qmlRegisterType(uri, 1, 0, "ChartView"); qmlRegisterType(uri, 1, 0, "XYPoint"); qmlRegisterType(uri, 1, 0, "ScatterSeries"); @@ -59,9 +60,6 @@ public: qmlRegisterType(uri, 1, 0, "BarSeries"); qmlRegisterType(uri, 1, 0, "StackedBarSeries"); qmlRegisterType(uri, 1, 0, "PercentBarSeries"); - qmlRegisterType(uri, 1, 0, "HorizontalBarSeries"); - qmlRegisterType(uri, 1, 0, "HorizontalStackedBarSeries"); - qmlRegisterType(uri, 1, 0, "HorizontalPercentBarSeries"); qmlRegisterType(uri, 1, 0, "PieSeries"); qmlRegisterType(uri, 1, 0, "PieSlice"); qmlRegisterType(uri, 1, 0, "BarSet"); @@ -71,9 +69,8 @@ public: qmlRegisterType(uri, 1, 0, "VPieModelMapper"); qmlRegisterType(uri, 1, 0, "HBarModelMapper"); qmlRegisterType(uri, 1, 0, "VBarModelMapper"); - qmlRegisterType(uri, 1, 0, "ValueAxis"); + qmlRegisterType(uri, 1, 0, "ValuesAxis"); qmlRegisterType(uri, 1, 0, "BarCategoriesAxis"); - qmlRegisterUncreatableType(uri, 1, 0, "Legend", QLatin1String("Trying to create uncreatable: Legend.")); qmlRegisterUncreatableType(uri, 1, 0, "XYSeries", @@ -92,6 +89,49 @@ public: QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); qmlRegisterUncreatableType(uri, 1, 0, "AbstractAxis", QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); + + // QtCommercial.Chart 1.1 + qmlRegisterType(uri, 1, 1, "ChartView"); + qmlRegisterType(uri, 1, 1, "XYPoint"); + qmlRegisterType(uri, 1, 1, "ScatterSeries"); + qmlRegisterType(uri, 1, 1, "LineSeries"); + qmlRegisterType(uri, 1, 1, "SplineSeries"); + qmlRegisterType(uri, 1, 1, "AreaSeries"); + qmlRegisterType(uri, 1, 1, "BarSeries"); + qmlRegisterType(uri, 1, 1, "StackedBarSeries"); + qmlRegisterType(uri, 1, 1, "PercentBarSeries"); + qmlRegisterType(uri, 1, 1, "HorizontalBarSeries"); + qmlRegisterType(uri, 1, 1, "HorizontalStackedBarSeries"); + qmlRegisterType(uri, 1, 1, "HorizontalPercentBarSeries"); + qmlRegisterType(uri, 1, 1, "PieSeries"); + qmlRegisterType(uri, 1, 1, "PieSlice"); + qmlRegisterType(uri, 1, 1, "BarSet"); + qmlRegisterType(uri, 1, 1, "HXYModelMapper"); + qmlRegisterType(uri, 1, 1, "VXYModelMapper"); + qmlRegisterType(uri, 1, 1, "HPieModelMapper"); + qmlRegisterType(uri, 1, 1, "VPieModelMapper"); + qmlRegisterType(uri, 1, 1, "HBarModelMapper"); + qmlRegisterType(uri, 1, 1, "VBarModelMapper"); + qmlRegisterType(uri, 1, 1, "ValueAxis"); + qmlRegisterType(uri, 1, 1, "BarCategoryAxis"); + qmlRegisterUncreatableType(uri, 1, 1, "Legend", + QLatin1String("Trying to create uncreatable: Legend.")); + qmlRegisterUncreatableType(uri, 1, 1, "XYSeries", + QLatin1String("Trying to create uncreatable: XYSeries.")); + qmlRegisterUncreatableType(uri, 1, 1, "AbstractItemModel", + QLatin1String("Trying to create uncreatable: AbstractItemModel.")); + qmlRegisterUncreatableType(uri, 1, 1, "XYModelMapper", + QLatin1String("Trying to create uncreatable: XYModelMapper.")); + qmlRegisterUncreatableType(uri, 1, 1, "PieModelMapper", + QLatin1String("Trying to create uncreatable: PieModelMapper.")); + qmlRegisterUncreatableType(uri, 1, 1, "BarModelMapper", + QLatin1String("Trying to create uncreatable: BarModelMapper.")); + qmlRegisterUncreatableType(uri, 1, 1, "AbstractSeries", + QLatin1String("Trying to create uncreatable: AbstractSeries.")); + qmlRegisterUncreatableType(uri, 1, 1, "AbstractBarSeries", + QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); + qmlRegisterUncreatableType(uri, 1, 1, "AbstractAxis", + QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); } }; diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart0.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart0.qml index 35ef313..932b60a 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart0.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart0.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart1.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart1.qml index 8f1817a..31679ca 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart1.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart1.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "user defined axes" diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart2.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart2.qml index 02c67e2..29250a6 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart2.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart2.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart3.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart3.qml index 4145d6a..129b64d 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart3.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart3.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "configuring dynamically" diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart4.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart4.qml index fcfed77..f39eb42 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart4.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart4.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "series specific dynamic axes" diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart5.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart5.qml index 3735dc2..d3b28db 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart5.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart5.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart6.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart6.qml index 47090d4..8dcf0b9 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart6.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart6.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart7.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart7.qml index 5582048..2e423ea 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart7.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart7.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView diff --git a/tests/qmlchartaxis/qml/qmlchartaxis/Chart8.qml b/tests/qmlchartaxis/qml/qmlchartaxis/Chart8.qml index 9e2950d..0497cf8 100644 --- a/tests/qmlchartaxis/qml/qmlchartaxis/Chart8.qml +++ b/tests/qmlchartaxis/qml/qmlchartaxis/Chart8.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml index 2c2ee87..dfdc9a9 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "area series" diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml index ad1243b..ce6c14e 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "Bar series" @@ -34,7 +34,7 @@ ChartView { BarSeries { id: mySeries name: "bar" - axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); onHovered: console.log("barset.onHovered: " + status); diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml index 820e05c..1172d7c 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chartView @@ -67,29 +67,29 @@ ChartView { ValueAxis{ - onColorChanged: console.log("axisX.onColorChanged: " + color); - onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); - onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color); - onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible); - onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible); - onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible); - onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color); - onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color); - onMinChanged: console.log("axisX.onMinChanged: " + min); - onMaxChanged: console.log("axisX.onMaxChanged: " + max); + onColorChanged: console.log("axisX.onColorChanged: " + color); + onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); + onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color); + onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible); + onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible); + onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible); + onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color); + onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color); + onMinChanged: console.log("axisX.onMinChanged: " + min); + onMaxChanged: console.log("axisX.onMaxChanged: " + max); } ValueAxis{ - onColorChanged: console.log("axisY.onColorChanged: " + color); - onLabelsVisibleChanged: console.log("axisY.onLabelsVisibleChanged: " + visible); - onLabelsColorChanged: console.log("axisY.onLabelsColorChanged: " + color); - onVisibleChanged: console.log("axisY.onVisibleChanged: " + visible); - onGridVisibleChanged: console.log("axisY.onGridVisibleChanged: " + visible); - onShadesVisibleChanged: console.log("axisY.onShadesVisibleChanged: " + visible); - onShadesColorChanged: console.log("axisY.onShadesColorChanged: " + color); - onShadesBorderColorChanged: console.log("axisY.onShadesBorderColorChanged: " + color); - onMinChanged: console.log("axisY.onMinChanged: " + min); - onMaxChanged: console.log("axisY.onMaxChanged: " + max); + onColorChanged: console.log("axisY.onColorChanged: " + color); + onLabelsVisibleChanged: console.log("axisY.onLabelsVisibleChanged: " + visible); + onLabelsColorChanged: console.log("axisY.onLabelsColorChanged: " + color); + onVisibleChanged: console.log("axisY.onVisibleChanged: " + visible); + onGridVisibleChanged: console.log("axisY.onGridVisibleChanged: " + visible); + onShadesVisibleChanged: console.log("axisY.onShadesVisibleChanged: " + visible); + onShadesColorChanged: console.log("axisY.onShadesColorChanged: " + color); + onShadesBorderColorChanged: console.log("axisY.onShadesBorderColorChanged: " + color); + onMinChanged: console.log("axisY.onMinChanged: " + min); + onMaxChanged: console.log("axisY.onMaxChanged: " + max); } Rectangle { diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml index 279f443..ce1628c 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { property variant series: lineSeries diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml index f8c5ed3..39509d5 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "Percent bar series" @@ -33,7 +33,7 @@ ChartView { PercentBarSeries { id: mySeries name: "bar" - axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/PieChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/PieChart.qml index 0c6b181..2ba116b 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/PieChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/PieChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { id: chart diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml index e3765fb..c018fc1 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "scatter series" diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml index 7b12519..7c0afe0 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "spline series" diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml index 9df3fa3..e2e1d9b 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.0 +import QtCommercial.Chart 1.1 ChartView { title: "Stacked bar series" @@ -33,7 +33,7 @@ ChartView { StackedBarSeries { id: mySeries name: "bar" - axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); onHovered: console.log("barset.onHovered: " + status);