barchartseries.cpp
59 lines
| 984 B
| text/x-c
|
CppLexer
|
r71 | #include <QDebug> | ||
|
r56 | #include "barchartseries.h" | ||
|
r172 | #include "qbarcategory.h" | ||
#include "qbarset.h" | ||||
#include "barchartmodel_p.h" | ||||
|
r126 | |||
|
r56 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r169 | BarChartSeries::BarChartSeries(QBarCategory &category, QObject *parent) | ||
|
r172 | : QChartSeries(parent) | ||
,mModel(new BarChartModel(category, this)) | ||||
|
r71 | { | ||
} | ||||
|
r171 | void BarChartSeries::addBarSet(QBarSet &set) | ||
{ | ||||
|
r172 | mModel->addBarSet(set); | ||
|
r171 | } | ||
void BarChartSeries::removeBarSet(QBarSet &set) | ||||
{ | ||||
|
r172 | mModel->removeBarSet(set); | ||
} | ||||
int BarChartSeries::countCategories() | ||||
{ | ||||
return mModel->countCategories(); | ||||
} | ||||
qreal BarChartSeries::min() | ||||
{ | ||||
return mModel->min(); | ||||
} | ||||
qreal BarChartSeries::max() | ||||
{ | ||||
return mModel->max(); | ||||
|
r171 | } | ||
|
r172 | qreal BarChartSeries::valueAt(int set, int category) | ||
{ | ||||
return mModel->valueAt(set,category); | ||||
} | ||||
qreal BarChartSeries::maxCategorySum() | ||||
{ | ||||
return mModel->maxCategorySum(); | ||||
} | ||||
BarChartModel& BarChartSeries::model() | ||||
{ | ||||
return *mModel; | ||||
} | ||||
|
r71 | #include "moc_barchartseries.cpp" | ||
|
r56 | QTCOMMERCIALCHART_END_NAMESPACE | ||