##// END OF EJS Templates
BarGroup and Bar as ChartItems instead of GraphicItems
BarGroup and Bar as ChartItems instead of GraphicItems

File last commit:

r71:1f789ed92d7b
r74:5412c444e1e8
Show More
qchartseries.h
47 lines | 1.1 KiB | text/x-c | CLexer
#ifndef QCHARTSERIES_H
#define QCHARTSERIES_H
#include "qchartglobal.h"
#include <QObject>
#include <QAbstractItemModel>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QTCOMMERCIALCHART_EXPORT QChartSeries : public QObject
{
Q_OBJECT
public:
enum QChartSeriesType {
SeriesTypeLine = 0,
// SeriesTypeArea,
SeriesTypeBar,
SeriesTypePie,
SeriesTypeScatter
// SeriesTypeSpline
};
protected:
QChartSeries(QObject *parent = 0):QObject(parent){};
public:
virtual ~QChartSeries(){};
// Factory method
static QChartSeries* create(QChartSeriesType type, QObject* parent = 0 );
// Pure virtual
virtual QChartSeriesType type() const = 0;
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; }
// Prototype for data model. TODO: remove the other setData methods and use something like this for now?
virtual bool setData(QAbstractItemModel* model) { return false; }
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif