##// END OF EJS Templates
updated barchart examples
updated barchart examples

File last commit:

r169:1723c50daa1e
r170:ff886517a70e
Show More
barchartseriesbase.h
60 lines | 1.5 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"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
model delegate for bar series. updated examples
r161 class BarGroupBase;
class BarChartModel;
sauimone
proof of concept implementation for barset and barcategory
r169 class QBarSet;
class QBarCategory;
sauimone
model delegate for bar series. updated examples
r161
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 // Container for series
class QTCOMMERCIALCHART_EXPORT BarChartSeriesBase : public QChartSeries
{
Q_OBJECT
protected:
sauimone
proof of concept implementation for barset and barcategory
r169 // BarChartSeriesBase(QObject* parent=0);
BarChartSeriesBase(QBarCategory &category, QObject* parent=0);
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
public:
// from QChartSeries
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeInvalid; }
sauimone
proof of concept implementation for barset and barcategory
r169 // TODO: These 3 will be removed.
sauimone
model delegate for bar series. updated examples
r161 int addData(QList<qreal> data);
void removeData(int id);
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 void setLabels(QList<QString> labels);
sauimone
model prototyping for bar chart
r159
sauimone
proof of concept implementation for barset and barcategory
r169 // TODO: Expose these to user in derived class instead of here? Common implementation for all bar charts, but not visible to user
void addBarSet(QBarSet &set); // Bob[1,5,6,2,15,4] first value goes to category 1 etc..
void removeBarSet(QBarSet &set); //
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 // These shouldn't be visible to chart series user. However, ChartDataSet needs to access them, and friends are evil.
sauimone
model prototyping for bar chart
r159 qreal min();
qreal max();
sauimone
model delegate for bar series. updated examples
r161 int countColumns(); // Count items in one series.
qreal valueAt(int series, int item);
qreal maxColumnSum();
BarChartModel& model();
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 QString label(int item);
sauimone
model delegate for bar series. updated examples
r161
signals:
void changed(int index);
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
public Q_SLOTS:
private:
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 BarChartModel* mModel;
QList<QString> mLabels;
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARCHARTSERIESBASE_H