qchartseries.h
49 lines
| 1.2 KiB
| text/x-c
|
CLexer
/ src / qchartseries.h
Michal Klocek
|
r23 | #ifndef QCHARTSERIES_H | ||
#define QCHARTSERIES_H | ||||
Tero Ahola
|
r30 | #include "qchartglobal.h" | ||
Michal Klocek
|
r23 | #include <QObject> | ||
sauimone
|
r71 | #include <QAbstractItemModel> | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r30 | class QTCOMMERCIALCHART_EXPORT QChartSeries : public QObject | ||
Michal Klocek
|
r23 | { | ||
sauimone
|
r71 | Q_OBJECT | ||
Michal Klocek
|
r23 | public: | ||
Tero Ahola
|
r30 | enum QChartSeriesType { | ||
SeriesTypeLine = 0, | ||||
// SeriesTypeArea, | ||||
sauimone
|
r56 | SeriesTypeBar, | ||
sauimone
|
r94 | SeriesTypeStackedBar, | ||
sauimone
|
r101 | SeriesTypePercentBar, | ||
Tero Ahola
|
r51 | SeriesTypePie, | ||
Tero Ahola
|
r30 | SeriesTypeScatter | ||
// SeriesTypeSpline | ||||
}; | ||||
Michal Klocek
|
r23 | |||
protected: | ||||
Michal Klocek
|
r39 | QChartSeries(QObject *parent = 0):QObject(parent){}; | ||
Michal Klocek
|
r23 | |||
public: | ||||
Michal Klocek
|
r39 | virtual ~QChartSeries(){}; | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r61 | // Factory method | ||
sauimone
|
r62 | static QChartSeries* create(QChartSeriesType type, QObject* parent = 0 ); | ||
Tero Ahola
|
r61 | // Pure virtual | ||
Michal Klocek
|
r23 | virtual QChartSeriesType type() const = 0; | ||
Michal Klocek
|
r39 | |||
Tero Ahola
|
r61 | virtual bool setData(QList<int> data) { return false; } | ||
virtual bool setData(QList<qreal> data) { return false; } | ||||
virtual bool setData(QList<qreal> x, QList<qreal> y){ return false; } | ||||
sauimone
|
r71 | |||
// Prototype for data model. TODO: remove the other setData methods and use something like this for now? | ||||
virtual bool setData(QAbstractItemModel* model) { return false; } | ||||
Michal Klocek
|
r23 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r23 | |||
#endif | ||||