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