qchartseries.h
47 lines
| 1.1 KiB
| text/x-c
|
CLexer
/ src / qchartseries.h
|
r23 | #ifndef QCHARTSERIES_H | ||
#define QCHARTSERIES_H | ||||
|
r30 | #include "qchartglobal.h" | ||
|
r23 | #include <QObject> | ||
|
r71 | #include <QAbstractItemModel> | ||
|
r23 | |||
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r23 | |||
|
r30 | class QTCOMMERCIALCHART_EXPORT QChartSeries : public QObject | ||
|
r23 | { | ||
|
r71 | Q_OBJECT | ||
|
r23 | public: | ||
|
r30 | enum QChartSeriesType { | ||
SeriesTypeLine = 0, | ||||
// SeriesTypeArea, | ||||
|
r56 | SeriesTypeBar, | ||
|
r51 | SeriesTypePie, | ||
|
r30 | SeriesTypeScatter | ||
// SeriesTypeSpline | ||||
}; | ||||
|
r23 | |||
protected: | ||||
|
r39 | QChartSeries(QObject *parent = 0):QObject(parent){}; | ||
|
r23 | |||
public: | ||||
|
r39 | virtual ~QChartSeries(){}; | ||
|
r23 | |||
|
r61 | // Factory method | ||
|
r62 | static QChartSeries* create(QChartSeriesType type, QObject* parent = 0 ); | ||
|
r61 | // Pure virtual | ||
|
r23 | virtual QChartSeriesType type() const = 0; | ||
|
r39 | |||
|
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; } | ||||
|
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; } | ||||
|
r23 | }; | ||
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r23 | |||
#endif | ||||