qbarchartseries.cpp
69 lines
| 1.1 KiB
| text/x-c
|
CppLexer
|
r71 | #include <QDebug> | ||
|
r216 | #include "qbarchartseries.h" | ||
|
r172 | #include "qbarcategory.h" | ||
#include "qbarset.h" | ||||
#include "barchartmodel_p.h" | ||||
|
r126 | |||
|
r56 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r216 | QBarChartSeries::QBarChartSeries(QBarCategory *category, QObject *parent) | ||
|
r172 | : QChartSeries(parent) | ||
,mModel(new BarChartModel(category, this)) | ||||
|
r71 | { | ||
} | ||||
|
r216 | void QBarChartSeries::addBarSet(QBarSet *set) | ||
|
r171 | { | ||
|
r172 | mModel->addBarSet(set); | ||
|
r171 | } | ||
|
r216 | void QBarChartSeries::removeBarSet(QBarSet *set) | ||
|
r171 | { | ||
|
r172 | mModel->removeBarSet(set); | ||
} | ||||
|
r216 | int QBarChartSeries::countSets() | ||
|
r214 | { | ||
return mModel->countSets(); | ||||
} | ||||
|
r216 | QBarSet* QBarChartSeries::nextSet(bool getFirst) | ||
|
r214 | { | ||
return mModel->nextSet(getFirst); | ||||
} | ||||
|
r216 | int QBarChartSeries::countCategories() | ||
|
r172 | { | ||
return mModel->countCategories(); | ||||
} | ||||
|
r216 | qreal QBarChartSeries::min() | ||
|
r172 | { | ||
return mModel->min(); | ||||
} | ||||
|
r216 | qreal QBarChartSeries::max() | ||
|
r172 | { | ||
return mModel->max(); | ||||
|
r171 | } | ||
|
r216 | qreal QBarChartSeries::valueAt(int set, int category) | ||
|
r172 | { | ||
return mModel->valueAt(set,category); | ||||
} | ||||
|
r216 | qreal QBarChartSeries::maxCategorySum() | ||
|
r172 | { | ||
return mModel->maxCategorySum(); | ||||
} | ||||
|
r216 | BarChartModel& QBarChartSeries::model() | ||
|
r172 | { | ||
return *mModel; | ||||
} | ||||
|
r216 | #include "moc_qbarchartseries.cpp" | ||
|
r71 | |||
|
r56 | QTCOMMERCIALCHART_END_NAMESPACE | ||