##// END OF EJS Templates
model prototyping for bar chart
model prototyping for bar chart

File last commit:

r159:e1dfbbf1ecba
r159:e1dfbbf1ecba
Show More
barchartseriesbase.h
58 lines | 1.4 KiB | text/x-c | CLexer
/ src / barchart / barchartseriesbase.h
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 #ifndef BARCHARTSERIESBASE_H
#define BARCHARTSERIESBASE_H
#include <QList>
#include <QAbstractItemModel>
#include "qchartseries.h"
#include "qchartglobal.h"
class BarGroupBase;
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Container for series
class QTCOMMERCIALCHART_EXPORT BarChartSeriesBase : public QChartSeries
{
Q_OBJECT
protected:
BarChartSeriesBase(QObject* parent=0);
public:
// from QChartSeries
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeInvalid; }
// TODO: Better data model?
sauimone
model prototyping for bar chart
r159 // virtual bool setModel(QAbstractItemModel* model);
virtual bool setData(QList<qreal>& data);
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
// Methods to find out minimum and maximum values of data
sauimone
model prototyping for bar chart
r159 // int min(); // TODO: remove
// int max(); // TODO: remove
// int maxColumnSum(); // TODO: move to model. returns maximum sum of items in all columns.
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
sauimone
model prototyping for bar chart
r159 // int countRows(); // TODO: remove.
// int countColumns(); // TODO: remove. Count items in one series.
// int countTotalItems(); // TODO: move to model
// int valueAt(int row, int column); // TODO: move to model
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
sauimone
model prototyping for bar chart
r159 // int columnSum(int column); // TODO: move to model
qreal min();
qreal max();
int countItems();
qreal valueAt(int item);
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
public Q_SLOTS:
private:
QAbstractItemModel* mModel;
BarGroupBase* mBarGroup;
sauimone
model prototyping for bar chart
r159
QList<qreal>* mData;
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARCHARTSERIESBASE_H