From f0863591c53ce7cb0c85deaa82115a73758d85cc 2012-07-03 17:58:12 From: Michal Klocek Date: 2012-07-03 17:58:12 Subject: [PATCH] Clears the qml plugin code from legacy code --- diff --git a/demos/qmlcustommodel/qml/qmlcustommodel/main.qml b/demos/qmlcustommodel/qml/qmlcustommodel/main.qml index 5dce44a..b1b4b2a 100644 --- a/demos/qmlcustommodel/qml/qmlcustommodel/main.qml +++ b/demos/qmlcustommodel/qml/qmlcustommodel/main.qml @@ -31,6 +31,7 @@ Rectangle { title: "Top-5 car brand shares in Finland" anchors.fill: parent animationOptions: ChartView.SeriesAnimations + CategoriesAxis { id: categoryAxis categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] @@ -57,7 +58,6 @@ Rectangle { name: "Others" barWidth: 0.9 visible: false - axisX: categoryAxis HBarModelMapper { model: customModel firstBarSetRow: 6 @@ -70,7 +70,6 @@ Rectangle { //![4] LineSeries { name: "Volkswagen" - axisX: categoryAxis visible: false HXYModelMapper { model: customModel @@ -83,7 +82,6 @@ Rectangle { LineSeries { name: "Toyota" - axisX: categoryAxis visible: false HXYModelMapper { model: customModel @@ -95,7 +93,6 @@ Rectangle { LineSeries { name: "Ford" - axisX: categoryAxis visible: false HXYModelMapper { model: customModel @@ -107,7 +104,6 @@ Rectangle { LineSeries { name: "Skoda" - axisX: categoryAxis visible: false HXYModelMapper { model: customModel @@ -119,7 +115,6 @@ Rectangle { LineSeries { name: "Volvo" - axisX: categoryAxis visible: false HXYModelMapper { model: customModel diff --git a/plugins/declarative/declarativeareaseries.cpp b/plugins/declarative/declarativeareaseries.cpp index 1ec2f37..a1c75e8 100644 --- a/plugins/declarative/declarativeareaseries.cpp +++ b/plugins/declarative/declarativeareaseries.cpp @@ -30,25 +30,6 @@ DeclarativeAreaSeries::DeclarativeAreaSeries(QObject *parent) : { } -void DeclarativeAreaSeries::setAxisX(QAbstractAxis *axis) -{ - chart()->setAxisX(axis,this); -} - -QAbstractAxis *DeclarativeAreaSeries::axisX() -{ - return chart()->axisX(this); -} - -void DeclarativeAreaSeries::setAxisY(QAbstractAxis *axis) -{ - chart()->setAxisY(axis,this); -} - -QAbstractAxis *DeclarativeAreaSeries::axisY() -{ - return chart()->axisY(this); -} void DeclarativeAreaSeries::setUpperSeries(DeclarativeLineSeries* series) { diff --git a/plugins/declarative/declarativeareaseries.h b/plugins/declarative/declarativeareaseries.h index 8845aa7..55f4468 100644 --- a/plugins/declarative/declarativeareaseries.h +++ b/plugins/declarative/declarativeareaseries.h @@ -31,16 +31,10 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE class DeclarativeAreaSeries : public QAreaSeries { Q_OBJECT - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY) Q_PROPERTY(DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries) Q_PROPERTY(DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries) public: - void setAxisX(QAbstractAxis *axis); - QAbstractAxis *axisX(); - void setAxisY(QAbstractAxis *axis); - QAbstractAxis *axisY(); explicit DeclarativeAreaSeries(QObject *parent = 0); void setUpperSeries(DeclarativeLineSeries* series); DeclarativeLineSeries* upperSeries() const; diff --git a/plugins/declarative/declarativebarseries.h b/plugins/declarative/declarativebarseries.h index b4caf14..ae4f3f3 100644 --- a/plugins/declarative/declarativebarseries.h +++ b/plugins/declarative/declarativebarseries.h @@ -68,10 +68,6 @@ class DeclarativeBarSeries : public QBarSeries, public QDeclarativeParserStatus public: explicit DeclarativeBarSeries(QDeclarativeItem *parent = 0); - void setAxisX(QAbstractAxis *axis); - QAbstractAxis *axisX(); - void setAxisY(QAbstractAxis *axis); - QAbstractAxis *axisY(); QDeclarativeListProperty seriesChildren(); Q_INVOKABLE DeclarativeBarSet *at(int index); Q_INVOKABLE DeclarativeBarSet *append(QString label, QVariantList values) { return insert(count(), label, values); } diff --git a/plugins/declarative/declarativelineseries.cpp b/plugins/declarative/declarativelineseries.cpp index 3fe15ff..dda1f5f 100644 --- a/plugins/declarative/declarativelineseries.cpp +++ b/plugins/declarative/declarativelineseries.cpp @@ -37,26 +37,6 @@ QXYSeries *DeclarativeLineSeries::xySeries() return this; } -void DeclarativeLineSeries::setAxisX(QAbstractAxis *axis) -{ - chart()->setAxisX(axis,this); -} - -QAbstractAxis *DeclarativeLineSeries::axisX() -{ - return chart()->axisX(this); -} - -void DeclarativeLineSeries::setAxisY(QAbstractAxis *axis) -{ - chart()->setAxisY(axis,this); -} - -QAbstractAxis *DeclarativeLineSeries::axisY() -{ - return chart()->axisY(this); -} - void DeclarativeLineSeries::handleCountChanged(int index) { Q_UNUSED(index) diff --git a/plugins/declarative/declarativelineseries.h b/plugins/declarative/declarativelineseries.h index 60b0f84..725855d 100644 --- a/plugins/declarative/declarativelineseries.h +++ b/plugins/declarative/declarativelineseries.h @@ -35,8 +35,6 @@ class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries, pu { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(QDeclarativeListProperty declarativeChildren READ declarativeChildren) Q_CLASSINFO("DefaultProperty", "declarativeChildren") @@ -44,10 +42,6 @@ class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries, pu public: explicit DeclarativeLineSeries(QObject *parent = 0); QXYSeries *xySeries(); - void setAxisX(QAbstractAxis *axis); - QAbstractAxis *axisX(); - void setAxisY(QAbstractAxis *axis); - QAbstractAxis *axisY(); QDeclarativeListProperty declarativeChildren(); public: // from QDeclarativeParserStatus diff --git a/plugins/declarative/declarativescatterseries.cpp b/plugins/declarative/declarativescatterseries.cpp index 3b2bc6c..53deebb 100644 --- a/plugins/declarative/declarativescatterseries.cpp +++ b/plugins/declarative/declarativescatterseries.cpp @@ -37,26 +37,6 @@ QXYSeries *DeclarativeScatterSeries::xySeries() return this; } -void DeclarativeScatterSeries::setAxisX(QAbstractAxis *axis) -{ - chart()->setAxisX(axis,this); -} - -QAbstractAxis *DeclarativeScatterSeries::axisX() -{ - return chart()->axisX(this); -} - -void DeclarativeScatterSeries::setAxisY(QAbstractAxis *axis) -{ - chart()->setAxisY(axis,this); -} - -QAbstractAxis *DeclarativeScatterSeries::axisY() -{ - return chart()->axisY(this); -} - void DeclarativeScatterSeries::handleCountChanged(int index) { Q_UNUSED(index) diff --git a/plugins/declarative/declarativescatterseries.h b/plugins/declarative/declarativescatterseries.h index 3581964..c352f74 100644 --- a/plugins/declarative/declarativescatterseries.h +++ b/plugins/declarative/declarativescatterseries.h @@ -34,8 +34,6 @@ class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeri { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(QDeclarativeListProperty declarativeChildren READ declarativeChildren) Q_CLASSINFO("DefaultProperty", "declarativeChildren") @@ -43,10 +41,6 @@ class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeri public: explicit DeclarativeScatterSeries(QObject *parent = 0); QXYSeries *xySeries(); - void setAxisX(QAbstractAxis *axis); - QAbstractAxis *axisX(); - void setAxisY(QAbstractAxis *axis); - QAbstractAxis *axisY(); QDeclarativeListProperty declarativeChildren(); public: // from QDeclarativeParserStatus diff --git a/plugins/declarative/declarativesplineseries.cpp b/plugins/declarative/declarativesplineseries.cpp index 636d3bb..e924f4a 100644 --- a/plugins/declarative/declarativesplineseries.cpp +++ b/plugins/declarative/declarativesplineseries.cpp @@ -37,26 +37,6 @@ QXYSeries *DeclarativeSplineSeries::xySeries() return this; } -void DeclarativeSplineSeries::setAxisX(QAbstractAxis *axis) -{ - chart()->setAxisX(axis,this); -} - -QAbstractAxis *DeclarativeSplineSeries::axisX() -{ - return chart()->axisX(this); -} - -void DeclarativeSplineSeries::setAxisY(QAbstractAxis *axis) -{ - chart()->setAxisY(axis,this); -} - -QAbstractAxis *DeclarativeSplineSeries::axisY() -{ - return chart()->axisY(this); -} - void DeclarativeSplineSeries::handleCountChanged(int index) { Q_UNUSED(index) diff --git a/plugins/declarative/declarativesplineseries.h b/plugins/declarative/declarativesplineseries.h index f91db02..ce4539f 100644 --- a/plugins/declarative/declarativesplineseries.h +++ b/plugins/declarative/declarativesplineseries.h @@ -35,8 +35,6 @@ class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX) - Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(QDeclarativeListProperty declarativeChildren READ declarativeChildren) Q_CLASSINFO("DefaultProperty", "declarativeChildren") @@ -44,10 +42,6 @@ class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries public: explicit DeclarativeSplineSeries(QObject *parent = 0); QXYSeries *xySeries(); - void setAxisX(QAbstractAxis *axis); - QAbstractAxis *axisX(); - void setAxisY(QAbstractAxis *axis); - QAbstractAxis *axisY(); QDeclarativeListProperty declarativeChildren(); public: // from QDeclarativeParserStatus