##// END OF EJS Templates
refactoring. QStackedBarSeries and QPercentBarSeries are now derived from QBarSeries.
refactoring. QStackedBarSeries and QPercentBarSeries are now derived from QBarSeries.

File last commit:

r281:d81c37855aff
r281:d81c37855aff
Show More
qpercentbarchartseries.cpp
79 lines | 1.6 KiB | text/x-c | CppLexer
/ src / barchart / qpercentbarchartseries.cpp
sauimone
Common naming convention for barcharts
r216 #include <limits.h>
#include <QDebug>
#include "qpercentbarchartseries.h"
#include "qbarset.h"
#include "qbarcategory.h"
#include "barchartmodel_p.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
QPercentBarChartSeries::QPercentBarChartSeries(QBarCategory *category, QObject *parent)
sauimone
refactoring. QStackedBarSeries and QPercentBarSeries are now derived from QBarSeries.
r281 : QBarChartSeries(category, parent)
// ,mModel(new BarChartModel(category, this))
sauimone
Common naming convention for barcharts
r216 {
}
sauimone
refactoring. QStackedBarSeries and QPercentBarSeries are now derived from QBarSeries.
r281 /*
sauimone
Common naming convention for barcharts
r216 void QPercentBarChartSeries::addBarSet(QBarSet *set)
{
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 connect(this,SIGNAL(floatingValuesEnabled(bool)),set,SLOT(enableFloatingValues(bool)));
connect(this,SIGNAL(hoverNamesEnabled(bool)),set,SLOT(enableHoverNames(bool)));
sauimone
Common naming convention for barcharts
r216 mModel->addBarSet(set);
}
void QPercentBarChartSeries::removeBarSet(QBarSet *set)
{
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 disconnect(set,SLOT(enableFloatingValues(bool)));
disconnect(set,SLOT(enableHoverNames(bool)));
sauimone
Common naming convention for barcharts
r216 mModel->removeBarSet(set);
}
int QPercentBarChartSeries::countSets()
{
return mModel->countSets();
}
QBarSet* QPercentBarChartSeries::nextSet(bool getFirst)
{
return mModel->nextSet(getFirst);
}
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 QList<QString> QPercentBarChartSeries::legend()
{
return mModel->legend();
}
sauimone
Common naming convention for barcharts
r216 int QPercentBarChartSeries::countCategories()
{
return mModel->countCategories();
}
qreal QPercentBarChartSeries::min()
{
return mModel->min();
}
qreal QPercentBarChartSeries::max()
{
return mModel->max();
}
qreal QPercentBarChartSeries::valueAt(int set, int category)
{
return mModel->valueAt(set,category);
}
qreal QPercentBarChartSeries::maxCategorySum()
{
return mModel->maxCategorySum();
}
BarChartModel& QPercentBarChartSeries::model()
{
return *mModel;
}
sauimone
refactoring. QStackedBarSeries and QPercentBarSeries are now derived from QBarSeries.
r281 */
sauimone
Common naming convention for barcharts
r216
#include "moc_qpercentbarchartseries.cpp"
QTCOMMERCIALCHART_END_NAMESPACE