qseries.h
48 lines
| 1010 B
| text/x-c
|
CLexer
/ src / qseries.h
Michal Klocek
|
r360 | #ifndef QSERIES_H | ||
#define QSERIES_H | ||||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r30 | #include "qchartglobal.h" | ||
Michal Klocek
|
r23 | #include <QObject> | ||
sauimone
|
r71 | #include <QAbstractItemModel> | ||
sauimone
|
r380 | #include <QPen> | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r23 | |||
Michal Klocek
|
r360 | class QTCOMMERCIALCHART_EXPORT QSeries : public QObject | ||
Michal Klocek
|
r23 | { | ||
sauimone
|
r71 | Q_OBJECT | ||
Michal Klocek
|
r23 | public: | ||
Michal Klocek
|
r360 | enum QSeriesType { | ||
Tero Ahola
|
r120 | SeriesTypeLine, | ||
Tero Ahola
|
r309 | SeriesTypeArea, | ||
sauimone
|
r56 | SeriesTypeBar, | ||
sauimone
|
r94 | SeriesTypeStackedBar, | ||
sauimone
|
r101 | SeriesTypePercentBar, | ||
Tero Ahola
|
r51 | SeriesTypePie, | ||
Tero Ahola
|
r309 | SeriesTypeScatter, | ||
SeriesTypeSpline | ||||
Tero Ahola
|
r30 | }; | ||
Michal Klocek
|
r23 | |||
sauimone
|
r380 | // Helper class to contain legend and color for it | ||
// TODO: This as private class? | ||||
class Legend { | ||||
public: | ||||
QString mName; | ||||
QPen mPen; | ||||
}; | ||||
Michal Klocek
|
r23 | protected: | ||
Michal Klocek
|
r360 | QSeries(QObject *parent = 0) : QObject(parent) {} | ||
Michal Klocek
|
r23 | |||
public: | ||||
Michal Klocek
|
r360 | virtual ~QSeries() {} | ||
virtual QSeriesType type() const = 0; | ||||
Tero Ahola
|
r309 | // TODO | ||
sauimone
|
r175 | virtual bool setModel(QAbstractItemModel* /*model*/) { return false; } | ||
sauimone
|
r380 | |||
virtual QList<QSeries::Legend> legend() { QList<QSeries::Legend> l; return l; } | ||||
Michal Klocek
|
r23 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r23 | |||
#endif | ||||