##// END OF EJS Templates
Removed unused DeclarativeSeries class
Removed unused DeclarativeSeries class

File last commit:

r296:8254aab7233d
r311:e1f0c8c24a70
Show More
qbarchartseries.cpp
128 lines | 2.6 KiB | text/x-c | CppLexer
/ src / barchart / qbarchartseries.cpp
sauimone
Improved bar chart series
r71 #include <QDebug>
sauimone
Common naming convention for barcharts
r216 #include "qbarchartseries.h"
sauimone
removed barchartseriesbase. functionality is now in model
r172 #include "qbarcategory.h"
#include "qbarset.h"
#include "barchartmodel_p.h"
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
Common naming convention for barcharts
r216 QBarChartSeries::QBarChartSeries(QBarCategory *category, QObject *parent)
sauimone
removed barchartseriesbase. functionality is now in model
r172 : QChartSeries(parent)
,mModel(new BarChartModel(category, this))
sauimone
Improved bar chart series
r71 {
}
sauimone
Common naming convention for barcharts
r216 void QBarChartSeries::addBarSet(QBarSet *set)
sauimone
Barset and barcategory implememtation. Updated test application
r171 {
sauimone
removed barchartseriesbase. functionality is now in model
r172 mModel->addBarSet(set);
sauimone
Barset and barcategory implememtation. Updated test application
r171 }
sauimone
Common naming convention for barcharts
r216 void QBarChartSeries::removeBarSet(QBarSet *set)
sauimone
Barset and barcategory implememtation. Updated test application
r171 {
sauimone
removed barchartseriesbase. functionality is now in model
r172 mModel->removeBarSet(set);
}
sauimone
Common naming convention for barcharts
r216 int QBarChartSeries::countSets()
sauimone
Added pen & brush to QBarSet
r214 {
return mModel->countSets();
}
sauimone
Common naming convention for barcharts
r216 QBarSet* QBarChartSeries::nextSet(bool getFirst)
sauimone
Added pen & brush to QBarSet
r214 {
return mModel->nextSet(getFirst);
}
sauimone
moved tooltip to presenter
r288 QBarSet* QBarChartSeries::setAt(int index)
{
return mModel->setAt(index);
}
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 QList<QString> QBarChartSeries::legend()
{
return mModel->legend();
}
sauimone
moved tooltip to presenter
r288 QString QBarChartSeries::label(int category)
{
return mModel->label(category);
}
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 void QBarChartSeries::enableFloatingValues(bool enabled)
{
sauimone
enablers for tooltip and floating values, bug fixing, updated examples. tidying up the code
r296 if (enabled) {
for (int i=0; i<mModel->countSets(); i++) {
QBarSet *set = mModel->setAt(i);
connect(set,SIGNAL(clicked()),set,SIGNAL(toggleFloatingValues()));
}
} else {
for (int i=0; i<mModel->countSets(); i++) {
QBarSet *set = mModel->setAt(i);
disconnect(set,SIGNAL(clicked()),set,SIGNAL(toggleFloatingValues()));
}
}
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 }
sauimone
moved tooltip to presenter
r288 void QBarChartSeries::enableToolTip(bool enabled)
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 {
sauimone
enablers for tooltip and floating values, bug fixing, updated examples. tidying up the code
r296 if (enabled) {
for (int i=0; i<mModel->countSets(); i++) {
QBarSet *set = mModel->setAt(i);
connect(set,SIGNAL(showToolTip(QPoint,QString)),this,SIGNAL(showToolTip(QPoint,QString)));
}
} else {
for (int i=0; i<mModel->countSets(); i++) {
QBarSet *set = mModel->setAt(i);
disconnect(set,SIGNAL(showToolTip(QPoint,QString)),this,SIGNAL(showToolTip(QPoint,QString)));
}
}
sauimone
moved tooltip to presenter
r288 }
void QBarChartSeries::enableSeparators(bool enabled)
{
emit separatorsEnabled(enabled);
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 }
sauimone
Common naming convention for barcharts
r216 int QBarChartSeries::countCategories()
sauimone
removed barchartseriesbase. functionality is now in model
r172 {
return mModel->countCategories();
}
sauimone
Common naming convention for barcharts
r216 qreal QBarChartSeries::min()
sauimone
removed barchartseriesbase. functionality is now in model
r172 {
return mModel->min();
}
sauimone
Common naming convention for barcharts
r216 qreal QBarChartSeries::max()
sauimone
removed barchartseriesbase. functionality is now in model
r172 {
return mModel->max();
sauimone
Barset and barcategory implememtation. Updated test application
r171 }
sauimone
Common naming convention for barcharts
r216 qreal QBarChartSeries::valueAt(int set, int category)
sauimone
removed barchartseriesbase. functionality is now in model
r172 {
return mModel->valueAt(set,category);
}
sauimone
moved tooltip to presenter
r288 qreal QBarChartSeries::percentageAt(int set, int category)
{
return mModel->percentageAt(set,category);
}
qreal QBarChartSeries::categorySum(int category)
{
return mModel->categorySum(category);
}
sauimone
Common naming convention for barcharts
r216 qreal QBarChartSeries::maxCategorySum()
sauimone
removed barchartseriesbase. functionality is now in model
r172 {
return mModel->maxCategorySum();
}
sauimone
Common naming convention for barcharts
r216 BarChartModel& QBarChartSeries::model()
sauimone
removed barchartseriesbase. functionality is now in model
r172 {
return *mModel;
}
sauimone
Common naming convention for barcharts
r216 #include "moc_qbarchartseries.cpp"
sauimone
Improved bar chart series
r71
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 QTCOMMERCIALCHART_END_NAMESPACE