diff --git a/plugins/declarative/declarativebarseries.cpp b/plugins/declarative/declarativebarseries.cpp index 6f1a821..405c21e 100644 --- a/plugins/declarative/declarativebarseries.cpp +++ b/plugins/declarative/declarativebarseries.cpp @@ -60,14 +60,14 @@ void DeclarativeBarSet::setValues(QVariantList values) } } -DeclarativeBarSeries::DeclarativeBarSeries(QDeclarativeItem *parent) : +DeclarativeAbstractBarSeries::DeclarativeAbstractBarSeries(QDeclarativeItem *parent) : QAbstractBarSeries(parent) { connect(this, SIGNAL(barsetsAdded(QList)), this, SLOT(handleAdded(QList))); connect(this, SIGNAL(barsetsRemoved(QList)), this, SLOT(handleRemoved(QList))); } -void DeclarativeBarSeries::handleAdded(QList barsets) +void DeclarativeAbstractBarSeries::handleAdded(QList barsets) { foreach(QBarSet *b, barsets) { DeclarativeBarSet *barset = qobject_cast(b); @@ -75,7 +75,7 @@ void DeclarativeBarSeries::handleAdded(QList barsets) } } -void DeclarativeBarSeries::handleRemoved(QList barsets) +void DeclarativeAbstractBarSeries::handleRemoved(QList barsets) { foreach(QBarSet *b, barsets) { DeclarativeBarSet *barset = qobject_cast(b); @@ -83,11 +83,11 @@ void DeclarativeBarSeries::handleRemoved(QList barsets) } } -void DeclarativeBarSeries::classBegin() +void DeclarativeAbstractBarSeries::classBegin() { } -void DeclarativeBarSeries::componentComplete() +void DeclarativeAbstractBarSeries::componentComplete() { foreach(QObject *child, children()) { if (qobject_cast(child)) { @@ -102,39 +102,39 @@ void DeclarativeBarSeries::componentComplete() } } -void DeclarativeBarSeries::setAxisX(QAbstractAxis *axis) +void DeclarativeAbstractBarSeries::setAxisX(QAbstractAxis *axis) { chart()->setAxisX(axis, this); } -QAbstractAxis *DeclarativeBarSeries::axisX() +QAbstractAxis *DeclarativeAbstractBarSeries::axisX() { return chart()->axisX(this); } -void DeclarativeBarSeries::setAxisY(QAbstractAxis *axis) +void DeclarativeAbstractBarSeries::setAxisY(QAbstractAxis *axis) { chart()->setAxisY(axis, this); } -QAbstractAxis *DeclarativeBarSeries::axisY() +QAbstractAxis *DeclarativeAbstractBarSeries::axisY() { return chart()->axisY(this); } -QDeclarativeListProperty DeclarativeBarSeries::seriesChildren() +QDeclarativeListProperty DeclarativeAbstractBarSeries::seriesChildren() { - return QDeclarativeListProperty(this, 0, &DeclarativeBarSeries::appendSeriesChildren); + return QDeclarativeListProperty(this, 0, &DeclarativeAbstractBarSeries::appendSeriesChildren); } -void DeclarativeBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) +void DeclarativeAbstractBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) { // Empty implementation; the children are parsed in componentComplete instead Q_UNUSED(list); Q_UNUSED(element); } -DeclarativeBarSet *DeclarativeBarSeries::at(int index) +DeclarativeBarSet *DeclarativeAbstractBarSeries::at(int index) { QList setList = barSets(); if (index >= 0 && index < setList.count()) @@ -143,7 +143,7 @@ DeclarativeBarSet *DeclarativeBarSeries::at(int index) return 0; } -DeclarativeBarSet *DeclarativeBarSeries::insert(int index, QString label, QVariantList values) +DeclarativeBarSet *DeclarativeAbstractBarSeries::insert(int index, QString label, QVariantList values) { int insertIndex = index; if (insertIndex < 0) @@ -206,7 +206,7 @@ QAbstractAxis *DeclarativeGroupedBarSeries::axisY() QDeclarativeListProperty DeclarativeGroupedBarSeries::seriesChildren() { - return QDeclarativeListProperty(this, 0, &DeclarativeBarSeries::appendSeriesChildren); + return QDeclarativeListProperty(this, 0, &DeclarativeAbstractBarSeries::appendSeriesChildren); } void DeclarativeGroupedBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) @@ -282,7 +282,7 @@ QAbstractAxis *DeclarativeStackedBarSeries::axisY() QDeclarativeListProperty DeclarativeStackedBarSeries::seriesChildren() { - return QDeclarativeListProperty(this, 0, &DeclarativeBarSeries::appendSeriesChildren); + return QDeclarativeListProperty(this, 0, &DeclarativeAbstractBarSeries::appendSeriesChildren); } void DeclarativeStackedBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) @@ -358,7 +358,7 @@ QAbstractAxis *DeclarativePercentBarSeries::axisY() QDeclarativeListProperty DeclarativePercentBarSeries::seriesChildren() { - return QDeclarativeListProperty(this, 0, &DeclarativeBarSeries::appendSeriesChildren); + return QDeclarativeListProperty(this, 0, &DeclarativeAbstractBarSeries::appendSeriesChildren); } void DeclarativePercentBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) @@ -388,6 +388,6 @@ DeclarativeBarSet *DeclarativePercentBarSeries::insert(int index, QString label, return 0; } -#include "moc_declarativebarseries.cpp" +#include "moc_declarativeabstractbarseries.cpp" QTCOMMERCIALCHART_END_NAMESPACE diff --git a/plugins/declarative/declarativebarseries.h b/plugins/declarative/declarativebarseries.h index 91488f9..03cb7ed 100644 --- a/plugins/declarative/declarativebarseries.h +++ b/plugins/declarative/declarativebarseries.h @@ -58,7 +58,7 @@ private Q_SLOTS: void handleCountChanged(int index, int count); }; -class DeclarativeBarSeries : public QAbstractBarSeries, public QDeclarativeParserStatus +class DeclarativeAbstractBarSeries : public QAbstractBarSeries, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) @@ -68,7 +68,7 @@ class DeclarativeBarSeries : public QAbstractBarSeries, public QDeclarativeParse Q_CLASSINFO("DefaultProperty", "seriesChildren") public: - explicit DeclarativeBarSeries(QDeclarativeItem *parent = 0); + explicit DeclarativeAbstractBarSeries(QDeclarativeItem *parent = 0); void setAxisX(QAbstractAxis *axis); QAbstractAxis *axisX(); void setAxisY(QAbstractAxis *axis);