qchartseries.h
45 lines
| 1.0 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 { | ||
Tero Ahola
|
r120 | SeriesTypeInvalid = -1, | ||
SeriesTypeLine, | ||||
Tero Ahola
|
r30 | // 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 | // Pure virtual | ||
Michal Klocek
|
r23 | virtual QChartSeriesType type() const = 0; | ||
Michal Klocek
|
r39 | |||
Tero Ahola
|
r110 | 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? | ||||
sauimone
|
r175 | virtual bool setModel(QAbstractItemModel* /*model*/) { return false; } | ||
Michal Klocek
|
r23 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r23 | |||
#endif | ||||