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