##// END OF EJS Templates
Adds updated handling for line series
Adds updated handling for line series

File last commit:

r387:23f0c228569f
r392:938f3d3eaf7c
Show More
qseries.h
49 lines | 1.1 KiB | text/x-c | CLexer
#ifndef QSERIES_H
#define QSERIES_H
#include "qchartglobal.h"
#include <QObject>
#include <QAbstractItemModel>
#include <QPen>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QTCOMMERCIALCHART_EXPORT QSeries : public QObject
{
Q_OBJECT
public:
enum QSeriesType {
SeriesTypeLine,
SeriesTypeArea,
SeriesTypeBar,
SeriesTypeStackedBar,
SeriesTypePercentBar,
SeriesTypePie,
SeriesTypeScatter,
SeriesTypeSpline
};
// Helper class to contain legend and color for it
// TODO: This as private class? Or should we expose this to user of API
class Legend {
public:
QString mName;
QPen mPen;
};
protected:
QSeries(QObject *parent = 0) : QObject(parent) {}
public:
virtual ~QSeries() {}
virtual QSeriesType type() const = 0;
// TODO
virtual bool setModel(QAbstractItemModel* /*model*/) { return false; }
// TODO: should this be internal?
virtual QList<QSeries::Legend> legend() { QList<QSeries::Legend> l; return l; }
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif