diff --git a/examples/barmodelmapper/tablewidget.cpp b/examples/barmodelmapper/tablewidget.cpp index dc10e21..53522ef 100644 --- a/examples/barmodelmapper/tablewidget.cpp +++ b/examples/barmodelmapper/tablewidget.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ TableWidget::TableWidget(QWidget *parent) // series 1 //! [4] - QGroupedBarSeries *series = new QGroupedBarSeries; + QBarSeries *series = new QBarSeries; int first = 3; int count = 5; diff --git a/examples/groupedbarchart/main.cpp b/examples/groupedbarchart/main.cpp index 9d2b908..828435a 100644 --- a/examples/groupedbarchart/main.cpp +++ b/examples/groupedbarchart/main.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) //![1] //![2] - QGroupedBarSeries* series = new QGroupedBarSeries(); + QBarSeries* series = new QBarSeries(); series->append(set0); series->append(set1); series->append(set2); @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) //![3] QChart* chart = new QChart(); chart->addSeries(series); - chart->setTitle("Simple grouped barchart example"); + chart->setTitle("Simple barchart example"); chart->createDefaultAxes(); //![3] diff --git a/examples/legend/mainwidget.cpp b/examples/legend/mainwidget.cpp index 7e9fce0..a122430 100644 --- a/examples/legend/mainwidget.cpp +++ b/examples/legend/mainwidget.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -118,7 +118,7 @@ MainWidget::MainWidget(QWidget *parent) : void MainWidget::createSeries() { - m_series = new QGroupedBarSeries(); + m_series = new QBarSeries(); addBarset(); addBarset(); addBarset(); diff --git a/examples/legend/mainwidget.h b/examples/legend/mainwidget.h index f410185..e0b2fbd 100644 --- a/examples/legend/mainwidget.h +++ b/examples/legend/mainwidget.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include QTCOMMERCIALCHART_USE_NAMESPACE @@ -66,7 +66,7 @@ public slots: private: QChart *m_chart; - QGroupedBarSeries *m_series; + QBarSeries *m_series; QChartView *m_chartView; QGridLayout *m_mainLayout; diff --git a/plugins/declarative/declarativebarseries.cpp b/plugins/declarative/declarativebarseries.cpp index 0cac578..fbcadd3 100644 --- a/plugins/declarative/declarativebarseries.cpp +++ b/plugins/declarative/declarativebarseries.cpp @@ -160,16 +160,16 @@ DeclarativeBarSet *DeclarativeAbstractBarSeries::insert(int index, QString label return 0; } -DeclarativeGroupedBarSeries::DeclarativeGroupedBarSeries(QDeclarativeItem *parent) : - QGroupedBarSeries(parent) +DeclarativeBarSeries::DeclarativeBarSeries(QDeclarativeItem *parent) : + QBarSeries(parent) { } -void DeclarativeGroupedBarSeries::classBegin() +void DeclarativeBarSeries::classBegin() { } -void DeclarativeGroupedBarSeries::componentComplete() +void DeclarativeBarSeries::componentComplete() { foreach(QObject *child, children()) { if (qobject_cast(child)) { @@ -184,39 +184,39 @@ void DeclarativeGroupedBarSeries::componentComplete() } } -void DeclarativeGroupedBarSeries::setAxisX(QAbstractAxis *axis) +void DeclarativeBarSeries::setAxisX(QAbstractAxis *axis) { chart()->setAxisX(axis, this); } -QAbstractAxis *DeclarativeGroupedBarSeries::axisX() +QAbstractAxis *DeclarativeBarSeries::axisX() { return chart()->axisX(this); } -void DeclarativeGroupedBarSeries::setAxisY(QAbstractAxis *axis) +void DeclarativeBarSeries::setAxisY(QAbstractAxis *axis) { chart()->setAxisY(axis, this); } -QAbstractAxis *DeclarativeGroupedBarSeries::axisY() +QAbstractAxis *DeclarativeBarSeries::axisY() { return chart()->axisY(this); } -QDeclarativeListProperty DeclarativeGroupedBarSeries::seriesChildren() +QDeclarativeListProperty DeclarativeBarSeries::seriesChildren() { return QDeclarativeListProperty(this, 0, &DeclarativeAbstractBarSeries::appendSeriesChildren); } -void DeclarativeGroupedBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) +void DeclarativeBarSeries::appendSeriesChildren(QDeclarativeListProperty * list, QObject *element) { // Empty implementation; the children are parsed in componentComplete instead Q_UNUSED(list); Q_UNUSED(element); } -DeclarativeBarSet *DeclarativeGroupedBarSeries::at(int index) +DeclarativeBarSet *DeclarativeBarSeries::at(int index) { QList setList = barSets(); if (index >= 0 && index < setList.count()) @@ -225,12 +225,12 @@ DeclarativeBarSet *DeclarativeGroupedBarSeries::at(int index) return 0; } -DeclarativeBarSet *DeclarativeGroupedBarSeries::insert(int index, QString label, QVariantList values) +DeclarativeBarSet *DeclarativeBarSeries::insert(int index, QString label, QVariantList values) { DeclarativeBarSet *barset = new DeclarativeBarSet(this); barset->setLabel(label); barset->setValues(values); - if (QGroupedBarSeries::insert(index, barset)) + if (QBarSeries::insert(index, barset)) return barset; delete barset; return 0; diff --git a/plugins/declarative/declarativebarseries.h b/plugins/declarative/declarativebarseries.h index 03cb7ed..f16e60d 100644 --- a/plugins/declarative/declarativebarseries.h +++ b/plugins/declarative/declarativebarseries.h @@ -22,7 +22,8 @@ #define DECLARATIVEBARSERIES_H #include "qchartglobal.h" -#include "qgroupedbarseries.h" +#include "qabstractbarseries.h" +#include "qbarseries.h" #include "qstackedbarseries.h" #include "qpercentbarseries.h" #include "qbarset.h" @@ -94,7 +95,7 @@ public Q_SLOTS: void handleRemoved(QList barsets); }; -class DeclarativeGroupedBarSeries : public QGroupedBarSeries, public QDeclarativeParserStatus +class DeclarativeBarSeries : public QBarSeries, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) @@ -104,7 +105,7 @@ class DeclarativeGroupedBarSeries : public QGroupedBarSeries, public QDeclarativ Q_CLASSINFO("DefaultProperty", "seriesChildren") public: - explicit DeclarativeGroupedBarSeries(QDeclarativeItem *parent = 0); + explicit DeclarativeBarSeries(QDeclarativeItem *parent = 0); void setAxisX(QAbstractAxis *axis); QAbstractAxis *axisX(); void setAxisY(QAbstractAxis *axis); @@ -113,8 +114,8 @@ public: Q_INVOKABLE DeclarativeBarSet *at(int index); Q_INVOKABLE DeclarativeBarSet *append(QString label, QVariantList values) { return insert(count(), label, values); } Q_INVOKABLE DeclarativeBarSet *insert(int index, QString label, QVariantList values); - Q_INVOKABLE bool remove(QBarSet *barset) { return QGroupedBarSeries::remove(barset); } - Q_INVOKABLE void clear() { return QGroupedBarSeries::clear(); } + Q_INVOKABLE bool remove(QBarSet *barset) { return QBarSeries::remove(barset); } + Q_INVOKABLE void clear() { return QBarSeries::clear(); } public: // from QDeclarativeParserStatus void classBegin(); diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp index 053ec6c..4962b99 100644 --- a/plugins/declarative/declarativechart.cpp +++ b/plugins/declarative/declarativechart.cpp @@ -473,8 +473,8 @@ QAbstractSeries *DeclarativeChart::createSeries(DeclarativeChart::SeriesType typ case DeclarativeChart::SeriesTypePercentBar: // TODO break; - case DeclarativeChart::SeriesTypeGroupedBar: - series = new DeclarativeGroupedBarSeries(); + case DeclarativeChart::SeriesTypeBar: + series = new DeclarativeBarSeries(); break; case DeclarativeChart::SeriesTypePie: series = new DeclarativePieSeries(); diff --git a/plugins/declarative/declarativechart.h b/plugins/declarative/declarativechart.h index 866a970..b077da3 100644 --- a/plugins/declarative/declarativechart.h +++ b/plugins/declarative/declarativechart.h @@ -77,7 +77,6 @@ public: SeriesTypeBar, SeriesTypeStackedBar, SeriesTypePercentBar, - SeriesTypeGroupedBar, SeriesTypePie, SeriesTypeScatter, SeriesTypeSpline diff --git a/plugins/declarative/plugin.cpp b/plugins/declarative/plugin.cpp index 70757c8..b7a5b7f 100644 --- a/plugins/declarative/plugin.cpp +++ b/plugins/declarative/plugin.cpp @@ -55,7 +55,7 @@ public: qmlRegisterType(uri, 1, 0, "LineSeries"); qmlRegisterType(uri, 1, 0, "SplineSeries"); qmlRegisterType(uri, 1, 0, "AreaSeries"); - qmlRegisterType(uri, 1, 0, "GroupedBarSeries"); + qmlRegisterType(uri, 1, 0, "BarSeries"); qmlRegisterType(uri, 1, 0, "StackedBarSeries"); qmlRegisterType(uri, 1, 0, "PercentBarSeries"); qmlRegisterType(uri, 1, 0, "PieSeries"); diff --git a/src/animations/chartanimator_p.h b/src/animations/chartanimator_p.h index 9caf13a..d2c9c53 100644 --- a/src/animations/chartanimator_p.h +++ b/src/animations/chartanimator_p.h @@ -55,7 +55,7 @@ public: virtual ~ChartAnimator(); void addAnimation(PieChartItem *item); - void addAnimation(BarChartItem *item); // This can handle also grouped bar chart. + void addAnimation(BarChartItem *item); void addAnimation(StackedBarChartItem *item); void addAnimation(PercentBarChartItem *item); void removeAnimation(Chart *item); diff --git a/src/barchart/barchart.pri b/src/barchart/barchart.pri index a14c250..337c0c6 100644 --- a/src/barchart/barchart.pri +++ b/src/barchart/barchart.pri @@ -10,7 +10,7 @@ SOURCES += \ $$PWD/qbarset.cpp \ $$PWD/qpercentbarseries.cpp \ $$PWD/qstackedbarseries.cpp \ - $$PWD/qgroupedbarseries.cpp \ + $$PWD/qbarseries.cpp \ $$PWD/stackedbarchartitem.cpp \ $$PWD/qbarmodelmapper.cpp \ $$PWD/qvbarmodelmapper.cpp \ @@ -26,7 +26,7 @@ PRIVATE_HEADERS += \ $$PWD/qabstractbarseries_p.h \ $$PWD/qstackedbarseries_p.h\ $$PWD/qpercentbarseries_p.h \ - $$PWD/qgroupedbarseries_p.h \ + $$PWD/qbarseries_p.h \ $$PWD/qbarmodelmapper_p.h PUBLIC_HEADERS += \ @@ -34,7 +34,7 @@ PUBLIC_HEADERS += \ $$PWD/qbarset.h \ $$PWD/qpercentbarseries.h \ $$PWD/qstackedbarseries.h \ - $$PWD/qgroupedbarseries.h \ + $$PWD/qbarseries.h \ $$PWD/qbarmodelmapper.h \ $$PWD/qvbarmodelmapper.h \ $$PWD/qhbarmodelmapper.h diff --git a/src/barchart/qabstractbarseries.cpp b/src/barchart/qabstractbarseries.cpp index dd29315..007cad4 100644 --- a/src/barchart/qabstractbarseries.cpp +++ b/src/barchart/qabstractbarseries.cpp @@ -65,15 +65,15 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE The width of the bars of the series. The unit of \a width is the unit of x-axis. The minimum width for bars is zero and negative values are treated as zero. Setting the width to zero means that width of the bar on screen is one pixel no matter what the scale of x-axis is. Bars wider than zero are scaled with x-axis. - Note that with QGroupedBarSeries this value means the width of one group of bars instead of just one bar. - \sa QGroupedBarSeries + Note that with QBarSeries this value means the width of one group of bars instead of just one bar. + \sa QBarSeries */ /*! \qmlproperty real AbstractBarSeries::barWidth The width of the bars of the series. The unit of width is the unit of x-axis. The minimum width for bars is zero and negative values are treated as zero. Setting the width to zero means that width of the bar on screen is one pixel no matter what the scale of x-axis is. Bars wider than zero are scaled with x-axis. - Note that with QGroupedBarSeries this value means the width of one group of bars instead of just one bar. + Note that with QBarSeries this value means the width of one group of bars instead of just one bar. */ /*! @@ -220,7 +220,7 @@ QAbstractBarSeries::QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *pa Sets the width of the bars of the series. The unit of \a width is the unit of x-axis. The minimum width for bars is zero and negative values are treated as zero. Setting the width to zero means that width of the bar on screen is one pixel no matter what the scale of x-axis is. Bars wider than zero are scaled with x-axis. - Note that with \link QGroupedBarSeries \endlink this value means the width of one group of bars instead of just one bar. + Note that with \link QBarSeries \endlink this value means the width of one group of bars instead of just one bar. */ void QAbstractBarSeries::setBarWidth(qreal width) { diff --git a/src/barchart/qgroupedbarseries.cpp b/src/barchart/qbarseries.cpp similarity index 79% rename from src/barchart/qgroupedbarseries.cpp rename to src/barchart/qbarseries.cpp index b303a0e..be9ee6e 100644 --- a/src/barchart/qgroupedbarseries.cpp +++ b/src/barchart/qbarseries.cpp @@ -18,8 +18,8 @@ ** ****************************************************************************/ -#include "qgroupedbarseries.h" -#include "qgroupedbarseries_p.h" +#include "qbarseries.h" +#include "qbarseries_p.h" #include "groupedbarchartitem_p.h" #include "chartdataset_p.h" #include "charttheme_p.h" @@ -30,12 +30,12 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! - \class QGroupedBarSeries - \brief Series for creating grouped bar chart + \class QBarSeries + \brief Series for creating bar chart \mainclass - QGroupedBarSeries represents a series of data shown as bars. The purpose of this class is to draw bars - as groups, where bars in same category are grouped next to each other. QGroupedBarSeries groups the data + QBarSeries represents a series of data shown as bars. The purpose of this class is to draw bars + as groups, where bars in same category are grouped next to each other. QBarSeries groups the data from sets to categories, which are defined by a QStringList. See the \l {GroupedbarChart Example} {grouped bar chart example} to learn how to create a grouped bar chart. @@ -44,7 +44,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa QBarSet, QPercentBarSeries, QAbstractBarSeries, QStackedBarSeries */ /*! - \qmlclass GroupedBarSeries QGroupedBarSeries + \qmlclass BarSeries QBarSeries \inherits AbstractBarSeries The following QML shows how to create a simple grouped bar chart: @@ -56,30 +56,30 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! - Constructs empty QGroupedBarSeries. - QGroupedBarSeries is QObject which is a child of a \a parent. + Constructs empty QBarSeries. + QBarSeries is QObject which is a child of a \a parent. */ -QGroupedBarSeries::QGroupedBarSeries(QObject *parent) - : QAbstractBarSeries(*new QGroupedBarSeriesPrivate(this), parent) +QBarSeries::QBarSeries(QObject *parent) + : QAbstractBarSeries(*new QBarSeriesPrivate(this), parent) { } /*! Returns QChartSeries::SeriesTypeGroupedBar. */ -QAbstractSeries::SeriesType QGroupedBarSeries::type() const +QAbstractSeries::SeriesType QBarSeries::type() const { - return QAbstractSeries::SeriesTypeGroupedBar; + return QAbstractSeries::SeriesTypeBar; } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -QGroupedBarSeriesPrivate::QGroupedBarSeriesPrivate(QGroupedBarSeries *q) : QAbstractBarSeriesPrivate(q) +QBarSeriesPrivate::QBarSeriesPrivate(QBarSeries *q) : QAbstractBarSeriesPrivate(q) { } -void QGroupedBarSeriesPrivate::scaleDomain(Domain& domain) +void QBarSeriesPrivate::scaleDomain(Domain& domain) { qreal minX(domain.minX()); qreal minY(domain.minY()); @@ -100,9 +100,9 @@ void QGroupedBarSeriesPrivate::scaleDomain(Domain& domain) } -Chart* QGroupedBarSeriesPrivate::createGraphics(ChartPresenter* presenter) +Chart* QBarSeriesPrivate::createGraphics(ChartPresenter* presenter) { - Q_Q(QGroupedBarSeries); + Q_Q(QBarSeries); GroupedBarChartItem* bar = new GroupedBarChartItem(q,presenter); if(presenter->animationOptions().testFlag(QChart::SeriesAnimations)) { @@ -113,7 +113,7 @@ Chart* QGroupedBarSeriesPrivate::createGraphics(ChartPresenter* presenter) } -#include "moc_qgroupedbarseries.cpp" +#include "moc_qbarseries.cpp" QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/barchart/qgroupedbarseries.h b/src/barchart/qbarseries.h similarity index 78% rename from src/barchart/qgroupedbarseries.h rename to src/barchart/qbarseries.h index cfa4263..d4c5b74 100644 --- a/src/barchart/qgroupedbarseries.h +++ b/src/barchart/qbarseries.h @@ -18,28 +18,28 @@ ** ****************************************************************************/ -#ifndef GROUPEDBARSERIES_H -#define GROUPEDBARSERIES_H +#ifndef QBARSERIES_H +#define QBARSERIES_H #include #include QTCOMMERCIALCHART_BEGIN_NAMESPACE -class QGroupedBarSeriesPrivate; +class QBarSeriesPrivate; -class QTCOMMERCIALCHART_EXPORT QGroupedBarSeries : public QAbstractBarSeries +class QTCOMMERCIALCHART_EXPORT QBarSeries : public QAbstractBarSeries { Q_OBJECT public: - explicit QGroupedBarSeries(QObject *parent = 0); + explicit QBarSeries(QObject *parent = 0); QAbstractSeries::SeriesType type() const; private: - Q_DECLARE_PRIVATE(QGroupedBarSeries) - Q_DISABLE_COPY(QGroupedBarSeries) + Q_DECLARE_PRIVATE(QBarSeries) + Q_DISABLE_COPY(QBarSeries) }; QTCOMMERCIALCHART_END_NAMESPACE -#endif // GROUPEDBARSERIES_H +#endif // QBARSERIES_H diff --git a/src/barchart/qgroupedbarseries_p.h b/src/barchart/qbarseries_p.h similarity index 86% rename from src/barchart/qgroupedbarseries_p.h rename to src/barchart/qbarseries_p.h index 6b05595..7c0f824 100644 --- a/src/barchart/qgroupedbarseries_p.h +++ b/src/barchart/qbarseries_p.h @@ -27,8 +27,8 @@ // // We mean it. -#ifndef QGROUPEDBARSERIES_P_H -#define QGROUPEDBARSERIES_P_H +#ifndef QBARSERIES_P_H +#define QBARSERIES_P_H #include "qabstractbarseries_p.h" #include "domain_p.h" @@ -36,17 +36,17 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -class QGroupedBarSeriesPrivate: public QAbstractBarSeriesPrivate +class QBarSeriesPrivate: public QAbstractBarSeriesPrivate { public: - QGroupedBarSeriesPrivate(QGroupedBarSeries* q); + QBarSeriesPrivate(QBarSeries* q); Chart* createGraphics(ChartPresenter* presenter); void scaleDomain(Domain& domain); private: - Q_DECLARE_PUBLIC(QGroupedBarSeries) + Q_DECLARE_PUBLIC(QBarSeries) }; QTCOMMERCIALCHART_END_NAMESPACE -#endif // QGROUPEDBARSERIES_P_H +#endif // QBARSERIES_P_H diff --git a/src/barchart/qbarset.cpp b/src/barchart/qbarset.cpp index 07283be..f200dfa 100644 --- a/src/barchart/qbarset.cpp +++ b/src/barchart/qbarset.cpp @@ -34,7 +34,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \mainclass - \sa QAbstractBarSeries, QGroupedBarSeries, QStackedBarSeries, QPercentBarSeries + \sa QAbstractBarSeries, QBarSeries, QStackedBarSeries, QPercentBarSeries */ /*! \qmlclass BarSet QBarSet @@ -43,7 +43,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE First value of set is assumed to belong to first category, second to second category and so on. If set has fewer values than there are categories, then the missing values are assumed to be at the end of set. For missing values in middle of a set, numerical value of zero is used. - \sa AbstractBarSeries, GroupedBarSeries, StackedBarSeries, PercentBarSeries + \sa AbstractBarSeries, BarSeries, StackedBarSeries, PercentBarSeries */ /*! diff --git a/src/barchart/qvbarmodelmapper.cpp b/src/barchart/qvbarmodelmapper.cpp index 72a1d48..d938d1f 100644 --- a/src/barchart/qvbarmodelmapper.cpp +++ b/src/barchart/qvbarmodelmapper.cpp @@ -45,7 +45,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE model has at least four columns). Each bar set would contain data starting from row 1. The name of a set would be defined by the horizontal header (of the column). \code - GroupedBarSeries { + BarSeries { VBarModelMapper { model: myCustomModel // QAbstractItemModel derived implementation firstBarSetColumn: 1 diff --git a/src/qabstractseries.cpp b/src/qabstractseries.cpp index e4a4391..18f2046 100644 --- a/src/qabstractseries.cpp +++ b/src/qabstractseries.cpp @@ -49,7 +49,6 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \value SeriesTypeBar \value SeriesTypeStackedBar \value SeriesTypePercentBar - \value SeriesTypeGroupedBar \value SeriesTypePie \value SeriesTypeScatter \value SeriesTypeSpline diff --git a/src/qabstractseries.h b/src/qabstractseries.h index c7e54d9..6850729 100644 --- a/src/qabstractseries.h +++ b/src/qabstractseries.h @@ -46,7 +46,6 @@ public: SeriesTypeBar, SeriesTypeStackedBar, SeriesTypePercentBar, - SeriesTypeGroupedBar, SeriesTypePie, SeriesTypeScatter, SeriesTypeSpline diff --git a/tests/auto/chartdataset/tst_chartdataset.cpp b/tests/auto/chartdataset/tst_chartdataset.cpp index 7cae06b..31259d6 100644 --- a/tests/auto/chartdataset/tst_chartdataset.cpp +++ b/tests/auto/chartdataset/tst_chartdataset.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -135,7 +135,7 @@ void tst_ChartDataSet::addSeries_data() QAbstractSeries* scatter = new QScatterSeries(this); QAbstractSeries* spline = new QSplineSeries(this); QAbstractSeries* pie = new QPieSeries(this); - QAbstractSeries* bar = new QGroupedBarSeries(this); + QAbstractSeries* bar = new QBarSeries(this); QAbstractSeries* percent = new QPercentBarSeries(this); QAbstractSeries* stacked = new QStackedBarSeries(this); @@ -184,7 +184,7 @@ void tst_ChartDataSet::setAxisX_data() QAbstractSeries* scatter = new QScatterSeries(this); QAbstractSeries* spline = new QSplineSeries(this); QAbstractSeries* pie = new QPieSeries(this); - QAbstractSeries* bar = new QGroupedBarSeries(this); + QAbstractSeries* bar = new QBarSeries(this); QAbstractSeries* percent = new QPercentBarSeries(this); QAbstractSeries* stacked = new QStackedBarSeries(this); diff --git a/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp b/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp index aa1cd81..62390a4 100644 --- a/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp +++ b/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -72,7 +72,7 @@ class tst_qbarmodelmapper : public QObject QVBarModelMapper *m_vMapper; QHBarModelMapper *m_hMapper; - QGroupedBarSeries *m_series; + QBarSeries *m_series; QChart *m_chart; }; @@ -109,7 +109,7 @@ void tst_qbarmodelmapper::createHorizontalMapper() void tst_qbarmodelmapper::init() { - m_series = new QGroupedBarSeries; + m_series = new QBarSeries; m_chart->addSeries(m_series); m_model = new QStandardItemModel(m_modelRowCount, m_modelColumnCount, this); @@ -171,7 +171,7 @@ void tst_qbarmodelmapper::verticalMapper() QFETCH(int, lastBarSetColumn); QFETCH(int, expectedBarSetCount); - m_series = new QGroupedBarSeries; + m_series = new QBarSeries; QVBarModelMapper *mapper = new QVBarModelMapper; mapper->setFirstBarSetColumn(firstBarSetColumn); @@ -214,7 +214,7 @@ void tst_qbarmodelmapper::verticalMapperCustomMapping() QFETCH(int, expectedBarSetCount); QFETCH(int, expectedCount); - m_series = new QGroupedBarSeries; + m_series = new QBarSeries; QCOMPARE(m_series->count(), 0); @@ -261,7 +261,7 @@ void tst_qbarmodelmapper::horizontalMapper() QFETCH(int, lastBarSetRow); QFETCH(int, expectedBarSetCount); - m_series = new QGroupedBarSeries; + m_series = new QBarSeries; QHBarModelMapper *mapper = new QHBarModelMapper; mapper->setFirstBarSetRow(firstBarSetRow); @@ -304,7 +304,7 @@ void tst_qbarmodelmapper::horizontalMapperCustomMapping() QFETCH(int, expectedBarSetCount); QFETCH(int, expectedCount); - m_series = new QGroupedBarSeries; + m_series = new QBarSeries; QCOMPARE(m_series->count(), 0); diff --git a/tests/auto/qbarseries/tst_qbarseries.cpp b/tests/auto/qbarseries/tst_qbarseries.cpp index e13c382..3ae6576 100644 --- a/tests/auto/qbarseries/tst_qbarseries.cpp +++ b/tests/auto/qbarseries/tst_qbarseries.cpp @@ -19,7 +19,7 @@ ****************************************************************************/ #include -#include +#include #include #include #include @@ -63,8 +63,8 @@ private slots: void clearWithAnimations(); private: - QGroupedBarSeries* m_barseries; - QGroupedBarSeries* m_barseries_with_sets; + QBarSeries* m_barseries; + QBarSeries* m_barseries_with_sets; QList m_testSets; @@ -81,8 +81,8 @@ void tst_QBarSeries::cleanupTestCase() void tst_QBarSeries::init() { - m_barseries = new QGroupedBarSeries(); - m_barseries_with_sets = new QGroupedBarSeries(); + m_barseries = new QBarSeries(); + m_barseries_with_sets = new QBarSeries(); for (int i=0; i<5; i++) { m_testSets.append(new QBarSet("testset")); @@ -110,7 +110,7 @@ void tst_QBarSeries::qbarseries_data() void tst_QBarSeries::qbarseries() { - QGroupedBarSeries *barseries = new QGroupedBarSeries(); + QBarSeries *barseries = new QBarSeries(); QVERIFY(barseries != 0); } @@ -316,7 +316,7 @@ void tst_QBarSeries::mouseclicked_data() void tst_QBarSeries::mouseclicked() { - QGroupedBarSeries* series = new QGroupedBarSeries(); + QBarSeries* series = new QBarSeries(); QBarSet* set1 = new QBarSet(QString("set 1")); *set1 << 10 << 10 << 10; @@ -452,7 +452,7 @@ void tst_QBarSeries::mousehovered_data() void tst_QBarSeries::mousehovered() { - QGroupedBarSeries* series = new QGroupedBarSeries(); + QBarSeries* series = new QBarSeries(); QBarSet* set1 = new QBarSet(QString("set 1")); *set1 << 10 << 10 << 10; @@ -546,7 +546,7 @@ void tst_QBarSeries::mousehovered() void tst_QBarSeries::clearWithAnimations() { - QGroupedBarSeries* series = new QGroupedBarSeries(); + QBarSeries* series = new QBarSeries(); QBarSet* set1 = new QBarSet(QString("set 1")); *set1 << 10 << 10 << 10; diff --git a/tests/auto/qbarset/tst_qbarset.cpp b/tests/auto/qbarset/tst_qbarset.cpp index 95b2d81..5169ce1 100644 --- a/tests/auto/qbarset/tst_qbarset.cpp +++ b/tests/auto/qbarset/tst_qbarset.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include QTCOMMERCIALCHART_USE_NAMESPACE @@ -427,7 +427,7 @@ void tst_QBarSet::customize() QBarSet *set2 = new QBarSet("set2"); // Append set1 to series - QGroupedBarSeries *series = new QGroupedBarSeries(); + QBarSeries *series = new QBarSeries(); bool success = series->append(set1); QVERIFY(success); diff --git a/tests/auto/qchart/tst_qchart.cpp b/tests/auto/qchart/tst_qchart.cpp index 37264c2..b071de1 100644 --- a/tests/auto/qchart/tst_qchart.cpp +++ b/tests/auto/qchart/tst_qchart.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -178,7 +178,7 @@ void tst_QChart::addSeries_data() QAbstractSeries* series2 = new QScatterSeries(this); QAbstractSeries* series3 = new QSplineSeries(this); QAbstractSeries* series4 = new QPieSeries(this); - QAbstractSeries* series5 = new QGroupedBarSeries(this); + QAbstractSeries* series5 = new QBarSeries(this); QAbstractSeries* series6 = new QPercentBarSeries(this); QAbstractSeries* series7 = new QStackedBarSeries(this); diff --git a/tests/auto/qgroupedbarseries/tst_qgroupedbarseries.cpp b/tests/auto/qgroupedbarseries/tst_qgroupedbarseries.cpp index 33855ac..de81302 100644 --- a/tests/auto/qgroupedbarseries/tst_qgroupedbarseries.cpp +++ b/tests/auto/qgroupedbarseries/tst_qgroupedbarseries.cpp @@ -19,7 +19,7 @@ ****************************************************************************/ #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ private slots: void mousehovered(); private: - QGroupedBarSeries* m_barseries; + QBarSeries* m_barseries; }; void tst_QGroupedBarSeries::initTestCase() @@ -66,7 +66,7 @@ void tst_QGroupedBarSeries::cleanupTestCase() void tst_QGroupedBarSeries::init() { - m_barseries = new QGroupedBarSeries(); + m_barseries = new QBarSeries(); } void tst_QGroupedBarSeries::cleanup() @@ -81,7 +81,7 @@ void tst_QGroupedBarSeries::qgroupedbarseries_data() void tst_QGroupedBarSeries::qgroupedbarseries() { - QGroupedBarSeries *barseries = new QGroupedBarSeries(); + QBarSeries *barseries = new QBarSeries(); QVERIFY(barseries != 0); } @@ -102,7 +102,7 @@ void tst_QGroupedBarSeries::mouseclicked_data() void tst_QGroupedBarSeries::mouseclicked() { - QGroupedBarSeries* series = new QGroupedBarSeries(); + QBarSeries* series = new QBarSeries(); QBarSet* set1 = new QBarSet(QString("set 1")); *set1 << 10 << 10 << 10; @@ -200,7 +200,7 @@ void tst_QGroupedBarSeries::mousehovered_data() void tst_QGroupedBarSeries::mousehovered() { - QGroupedBarSeries* series = new QGroupedBarSeries(); + QBarSeries* series = new QBarSeries(); QBarSet* set1 = new QBarSet(QString("set 1")); *set1 << 10 << 10 << 10; diff --git a/tests/chartwidgettest/dataseriedialog.cpp b/tests/chartwidgettest/dataseriedialog.cpp index e4c4cc2..73e6fe4 100644 --- a/tests/chartwidgettest/dataseriedialog.cpp +++ b/tests/chartwidgettest/dataseriedialog.cpp @@ -65,7 +65,7 @@ QGroupBox *DataSerieDialog::seriesTypeSelector() layout->addWidget(line); layout->addWidget(new QRadioButton("Area")); layout->addWidget(new QRadioButton("Pie")); - layout->addWidget(new QRadioButton("Grouped bar")); + layout->addWidget(new QRadioButton("Bar")); layout->addWidget(new QRadioButton("Stacked bar")); layout->addWidget(new QRadioButton("Percent bar")); layout->addWidget(new QRadioButton("Scatter")); diff --git a/tests/chartwidgettest/mainwidget.cpp b/tests/chartwidgettest/mainwidget.cpp index c82a0cc..a3227ae 100644 --- a/tests/chartwidgettest/mainwidget.cpp +++ b/tests/chartwidgettest/mainwidget.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -265,7 +265,7 @@ void MainWidget::addSeries(QString seriesName, int columnCount, int rowCount, QS series->append(labels.at(i), column.at(i)); m_chart->addSeries(series); } - } else if (seriesName == "Grouped bar" + } else if (seriesName == "Bar" || seriesName == "Stacked bar" || seriesName == "Percent bar") { QStringList category; @@ -273,8 +273,8 @@ void MainWidget::addSeries(QString seriesName, int columnCount, int rowCount, QS foreach(QString label, labels) category << label; QAbstractBarSeries* series = 0; - if (seriesName == "Grouped bar") { - series = new QGroupedBarSeries(this); + if (seriesName == "Bar") { + series = new QBarSeries(this); QCategoriesAxis* axis = new QCategoriesAxis(); axis->append(category); m_chart->setAxisX(axis,series);