##// END OF EJS Templates
Clears the qml plugin code from legacy code
Michal Klocek -
r1608:f0863591c53c
parent child
Show More
@@ -31,6 +31,7 Rectangle {
31 title: "Top-5 car brand shares in Finland"
31 title: "Top-5 car brand shares in Finland"
32 anchors.fill: parent
32 anchors.fill: parent
33 animationOptions: ChartView.SeriesAnimations
33 animationOptions: ChartView.SeriesAnimations
34
34 CategoriesAxis {
35 CategoriesAxis {
35 id: categoryAxis
36 id: categoryAxis
36 categories: ["2007", "2008", "2009", "2010", "2011", "2012" ]
37 categories: ["2007", "2008", "2009", "2010", "2011", "2012" ]
@@ -57,7 +58,6 Rectangle {
57 name: "Others"
58 name: "Others"
58 barWidth: 0.9
59 barWidth: 0.9
59 visible: false
60 visible: false
60 axisX: categoryAxis
61 HBarModelMapper {
61 HBarModelMapper {
62 model: customModel
62 model: customModel
63 firstBarSetRow: 6
63 firstBarSetRow: 6
@@ -70,7 +70,6 Rectangle {
70 //![4]
70 //![4]
71 LineSeries {
71 LineSeries {
72 name: "Volkswagen"
72 name: "Volkswagen"
73 axisX: categoryAxis
74 visible: false
73 visible: false
75 HXYModelMapper {
74 HXYModelMapper {
76 model: customModel
75 model: customModel
@@ -83,7 +82,6 Rectangle {
83
82
84 LineSeries {
83 LineSeries {
85 name: "Toyota"
84 name: "Toyota"
86 axisX: categoryAxis
87 visible: false
85 visible: false
88 HXYModelMapper {
86 HXYModelMapper {
89 model: customModel
87 model: customModel
@@ -95,7 +93,6 Rectangle {
95
93
96 LineSeries {
94 LineSeries {
97 name: "Ford"
95 name: "Ford"
98 axisX: categoryAxis
99 visible: false
96 visible: false
100 HXYModelMapper {
97 HXYModelMapper {
101 model: customModel
98 model: customModel
@@ -107,7 +104,6 Rectangle {
107
104
108 LineSeries {
105 LineSeries {
109 name: "Skoda"
106 name: "Skoda"
110 axisX: categoryAxis
111 visible: false
107 visible: false
112 HXYModelMapper {
108 HXYModelMapper {
113 model: customModel
109 model: customModel
@@ -119,7 +115,6 Rectangle {
119
115
120 LineSeries {
116 LineSeries {
121 name: "Volvo"
117 name: "Volvo"
122 axisX: categoryAxis
123 visible: false
118 visible: false
124 HXYModelMapper {
119 HXYModelMapper {
125 model: customModel
120 model: customModel
@@ -30,25 +30,6 DeclarativeAreaSeries::DeclarativeAreaSeries(QObject *parent) :
30 {
30 {
31 }
31 }
32
32
33 void DeclarativeAreaSeries::setAxisX(QAbstractAxis *axis)
34 {
35 chart()->setAxisX(axis,this);
36 }
37
38 QAbstractAxis *DeclarativeAreaSeries::axisX()
39 {
40 return chart()->axisX(this);
41 }
42
43 void DeclarativeAreaSeries::setAxisY(QAbstractAxis *axis)
44 {
45 chart()->setAxisY(axis,this);
46 }
47
48 QAbstractAxis *DeclarativeAreaSeries::axisY()
49 {
50 return chart()->axisY(this);
51 }
52
33
53 void DeclarativeAreaSeries::setUpperSeries(DeclarativeLineSeries* series)
34 void DeclarativeAreaSeries::setUpperSeries(DeclarativeLineSeries* series)
54 {
35 {
@@ -31,16 +31,10 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 class DeclarativeAreaSeries : public QAreaSeries
31 class DeclarativeAreaSeries : public QAreaSeries
32 {
32 {
33 Q_OBJECT
33 Q_OBJECT
34 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX)
35 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY)
36 Q_PROPERTY(DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries)
34 Q_PROPERTY(DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries)
37 Q_PROPERTY(DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries)
35 Q_PROPERTY(DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries)
38
36
39 public:
37 public:
40 void setAxisX(QAbstractAxis *axis);
41 QAbstractAxis *axisX();
42 void setAxisY(QAbstractAxis *axis);
43 QAbstractAxis *axisY();
44 explicit DeclarativeAreaSeries(QObject *parent = 0);
38 explicit DeclarativeAreaSeries(QObject *parent = 0);
45 void setUpperSeries(DeclarativeLineSeries* series);
39 void setUpperSeries(DeclarativeLineSeries* series);
46 DeclarativeLineSeries* upperSeries() const;
40 DeclarativeLineSeries* upperSeries() const;
@@ -68,10 +68,6 class DeclarativeBarSeries : public QBarSeries, public QDeclarativeParserStatus
68
68
69 public:
69 public:
70 explicit DeclarativeBarSeries(QDeclarativeItem *parent = 0);
70 explicit DeclarativeBarSeries(QDeclarativeItem *parent = 0);
71 void setAxisX(QAbstractAxis *axis);
72 QAbstractAxis *axisX();
73 void setAxisY(QAbstractAxis *axis);
74 QAbstractAxis *axisY();
75 QDeclarativeListProperty<QObject> seriesChildren();
71 QDeclarativeListProperty<QObject> seriesChildren();
76 Q_INVOKABLE DeclarativeBarSet *at(int index);
72 Q_INVOKABLE DeclarativeBarSet *at(int index);
77 Q_INVOKABLE DeclarativeBarSet *append(QString label, QVariantList values) { return insert(count(), label, values); }
73 Q_INVOKABLE DeclarativeBarSet *append(QString label, QVariantList values) { return insert(count(), label, values); }
@@ -37,26 +37,6 QXYSeries *DeclarativeLineSeries::xySeries()
37 return this;
37 return this;
38 }
38 }
39
39
40 void DeclarativeLineSeries::setAxisX(QAbstractAxis *axis)
41 {
42 chart()->setAxisX(axis,this);
43 }
44
45 QAbstractAxis *DeclarativeLineSeries::axisX()
46 {
47 return chart()->axisX(this);
48 }
49
50 void DeclarativeLineSeries::setAxisY(QAbstractAxis *axis)
51 {
52 chart()->setAxisY(axis,this);
53 }
54
55 QAbstractAxis *DeclarativeLineSeries::axisY()
56 {
57 return chart()->axisY(this);
58 }
59
60 void DeclarativeLineSeries::handleCountChanged(int index)
40 void DeclarativeLineSeries::handleCountChanged(int index)
61 {
41 {
62 Q_UNUSED(index)
42 Q_UNUSED(index)
@@ -35,8 +35,6 class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries, pu
35 {
35 {
36 Q_OBJECT
36 Q_OBJECT
37 Q_INTERFACES(QDeclarativeParserStatus)
37 Q_INTERFACES(QDeclarativeParserStatus)
38 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX)
39 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY)
40 Q_PROPERTY(int count READ count NOTIFY countChanged)
38 Q_PROPERTY(int count READ count NOTIFY countChanged)
41 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
39 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
42 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
40 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
@@ -44,10 +42,6 class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries, pu
44 public:
42 public:
45 explicit DeclarativeLineSeries(QObject *parent = 0);
43 explicit DeclarativeLineSeries(QObject *parent = 0);
46 QXYSeries *xySeries();
44 QXYSeries *xySeries();
47 void setAxisX(QAbstractAxis *axis);
48 QAbstractAxis *axisX();
49 void setAxisY(QAbstractAxis *axis);
50 QAbstractAxis *axisY();
51 QDeclarativeListProperty<QObject> declarativeChildren();
45 QDeclarativeListProperty<QObject> declarativeChildren();
52
46
53 public: // from QDeclarativeParserStatus
47 public: // from QDeclarativeParserStatus
@@ -37,26 +37,6 QXYSeries *DeclarativeScatterSeries::xySeries()
37 return this;
37 return this;
38 }
38 }
39
39
40 void DeclarativeScatterSeries::setAxisX(QAbstractAxis *axis)
41 {
42 chart()->setAxisX(axis,this);
43 }
44
45 QAbstractAxis *DeclarativeScatterSeries::axisX()
46 {
47 return chart()->axisX(this);
48 }
49
50 void DeclarativeScatterSeries::setAxisY(QAbstractAxis *axis)
51 {
52 chart()->setAxisY(axis,this);
53 }
54
55 QAbstractAxis *DeclarativeScatterSeries::axisY()
56 {
57 return chart()->axisY(this);
58 }
59
60 void DeclarativeScatterSeries::handleCountChanged(int index)
40 void DeclarativeScatterSeries::handleCountChanged(int index)
61 {
41 {
62 Q_UNUSED(index)
42 Q_UNUSED(index)
@@ -34,8 +34,6 class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeri
34 {
34 {
35 Q_OBJECT
35 Q_OBJECT
36 Q_INTERFACES(QDeclarativeParserStatus)
36 Q_INTERFACES(QDeclarativeParserStatus)
37 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX)
38 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY)
39 Q_PROPERTY(int count READ count NOTIFY countChanged)
37 Q_PROPERTY(int count READ count NOTIFY countChanged)
40 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
38 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
41 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
39 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
@@ -43,10 +41,6 class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeri
43 public:
41 public:
44 explicit DeclarativeScatterSeries(QObject *parent = 0);
42 explicit DeclarativeScatterSeries(QObject *parent = 0);
45 QXYSeries *xySeries();
43 QXYSeries *xySeries();
46 void setAxisX(QAbstractAxis *axis);
47 QAbstractAxis *axisX();
48 void setAxisY(QAbstractAxis *axis);
49 QAbstractAxis *axisY();
50 QDeclarativeListProperty<QObject> declarativeChildren();
44 QDeclarativeListProperty<QObject> declarativeChildren();
51
45
52 public: // from QDeclarativeParserStatus
46 public: // from QDeclarativeParserStatus
@@ -37,26 +37,6 QXYSeries *DeclarativeSplineSeries::xySeries()
37 return this;
37 return this;
38 }
38 }
39
39
40 void DeclarativeSplineSeries::setAxisX(QAbstractAxis *axis)
41 {
42 chart()->setAxisX(axis,this);
43 }
44
45 QAbstractAxis *DeclarativeSplineSeries::axisX()
46 {
47 return chart()->axisX(this);
48 }
49
50 void DeclarativeSplineSeries::setAxisY(QAbstractAxis *axis)
51 {
52 chart()->setAxisY(axis,this);
53 }
54
55 QAbstractAxis *DeclarativeSplineSeries::axisY()
56 {
57 return chart()->axisY(this);
58 }
59
60 void DeclarativeSplineSeries::handleCountChanged(int index)
40 void DeclarativeSplineSeries::handleCountChanged(int index)
61 {
41 {
62 Q_UNUSED(index)
42 Q_UNUSED(index)
@@ -35,8 +35,6 class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries
35 {
35 {
36 Q_OBJECT
36 Q_OBJECT
37 Q_INTERFACES(QDeclarativeParserStatus)
37 Q_INTERFACES(QDeclarativeParserStatus)
38 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX)
39 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY)
40 Q_PROPERTY(int count READ count NOTIFY countChanged)
38 Q_PROPERTY(int count READ count NOTIFY countChanged)
41 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
39 Q_PROPERTY(QDeclarativeListProperty<QObject> declarativeChildren READ declarativeChildren)
42 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
40 Q_CLASSINFO("DefaultProperty", "declarativeChildren")
@@ -44,10 +42,6 class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries
44 public:
42 public:
45 explicit DeclarativeSplineSeries(QObject *parent = 0);
43 explicit DeclarativeSplineSeries(QObject *parent = 0);
46 QXYSeries *xySeries();
44 QXYSeries *xySeries();
47 void setAxisX(QAbstractAxis *axis);
48 QAbstractAxis *axisX();
49 void setAxisY(QAbstractAxis *axis);
50 QAbstractAxis *axisY();
51 QDeclarativeListProperty<QObject> declarativeChildren();
45 QDeclarativeListProperty<QObject> declarativeChildren();
52
46
53 public: // from QDeclarativeParserStatus
47 public: // from QDeclarativeParserStatus
General Comments 0
You need to be logged in to leave comments. Login now