percentbarchartseries.cpp
62 lines
| 1.1 KiB
| text/x-c
|
CppLexer
sauimone
|
r101 | #include "percentbarchartseries.h" | ||
#include <limits.h> | ||||
#include <QDebug> | ||||
#include "percentbarchartseries.h" | ||||
sauimone
|
r172 | #include "qbarset.h" | ||
#include "qbarcategory.h" | ||||
#include "barchartmodel_p.h" | ||||
sauimone
|
r101 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
sauimone
|
r173 | PercentBarChartSeries::PercentBarChartSeries(QBarCategory *category, QObject *parent) | ||
sauimone
|
r172 | : QChartSeries(parent) | ||
,mModel(new BarChartModel(category, this)) | ||||
sauimone
|
r101 | { | ||
} | ||||
sauimone
|
r173 | void PercentBarChartSeries::addBarSet(QBarSet *set) | ||
sauimone
|
r171 | { | ||
sauimone
|
r172 | mModel->addBarSet(set); | ||
sauimone
|
r171 | } | ||
sauimone
|
r173 | void PercentBarChartSeries::removeBarSet(QBarSet *set) | ||
sauimone
|
r171 | { | ||
sauimone
|
r172 | mModel->removeBarSet(set); | ||
sauimone
|
r171 | } | ||
sauimone
|
r172 | int PercentBarChartSeries::countCategories() | ||
{ | ||||
return mModel->countCategories(); | ||||
} | ||||
qreal PercentBarChartSeries::min() | ||||
{ | ||||
return mModel->min(); | ||||
} | ||||
qreal PercentBarChartSeries::max() | ||||
{ | ||||
return mModel->max(); | ||||
} | ||||
qreal PercentBarChartSeries::valueAt(int set, int category) | ||||
{ | ||||
return mModel->valueAt(set,category); | ||||
} | ||||
qreal PercentBarChartSeries::maxCategorySum() | ||||
{ | ||||
return mModel->maxCategorySum(); | ||||
} | ||||
BarChartModel& PercentBarChartSeries::model() | ||||
{ | ||||
return *mModel; | ||||
} | ||||
sauimone
|
r101 | #include "moc_percentbarchartseries.cpp" | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||