##// END OF EJS Templates
integrating bar charts to test app.. crashes for now
integrating bar charts to test app.. crashes for now

File last commit:

r164:8e580b305fe6
r164:8e580b305fe6
Show More
barchartseriesbase.cpp
59 lines | 1.1 KiB | text/x-c | CppLexer
/ src / barchart / barchartseriesbase.cpp
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 #include <limits.h>
#include <QDebug>
#include "barchartseriesbase.h"
#include "bargroup.h"
sauimone
model delegate for bar series. updated examples
r161 #include "barchartmodel_p.h"
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
QTCOMMERCIALCHART_BEGIN_NAMESPACE
BarChartSeriesBase::BarChartSeriesBase(QObject *parent)
: QChartSeries(parent)
sauimone
model delegate for bar series. updated examples
r161 ,mModel(*(new BarChartModel(this))) // TODO: is this ok?
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 {
}
sauimone
model delegate for bar series. updated examples
r161
int BarChartSeriesBase::addData(QList<qreal> data)
sauimone
model prototyping for bar chart
r159 {
sauimone
model delegate for bar series. updated examples
r161 return mModel.addData(data);
}
sauimone
model prototyping for bar chart
r159
sauimone
model delegate for bar series. updated examples
r161 void BarChartSeriesBase::removeData(int id)
{
mModel.removeData(id);
}
qreal BarChartSeriesBase::min()
{
return mModel.min();
sauimone
model prototyping for bar chart
r159 }
qreal BarChartSeriesBase::max()
{
sauimone
model delegate for bar series. updated examples
r161 return mModel.max();
}
int BarChartSeriesBase::countColumns()
{
return mModel.countColumns();
}
qreal BarChartSeriesBase::valueAt(int series, int item)
{
sauimone
integrating bar charts to test app.. crashes for now
r164 qDebug() << "BarChartSeriesBase::valueAt" << series << item;
sauimone
model delegate for bar series. updated examples
r161 return mModel.valueAt(series,item);
sauimone
model prototyping for bar chart
r159 }
sauimone
model delegate for bar series. updated examples
r161 qreal BarChartSeriesBase::maxColumnSum()
sauimone
model prototyping for bar chart
r159 {
sauimone
model delegate for bar series. updated examples
r161 qDebug() << "BarChartSeriesBase::maxColumnSum" << mModel.maxColumnSum();
return mModel.maxColumnSum();
sauimone
model prototyping for bar chart
r159 }
sauimone
model delegate for bar series. updated examples
r161 BarChartModel& BarChartSeriesBase::model()
sauimone
model prototyping for bar chart
r159 {
sauimone
model delegate for bar series. updated examples
r161 return mModel;
sauimone
model prototyping for bar chart
r159 }
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
#include "moc_barchartseriesbase.cpp"
QTCOMMERCIALCHART_END_NAMESPACE