barchartseriesbase.h
52 lines
| 1.0 KiB
| text/x-c
|
CLexer
|
r126 | #ifndef BARCHARTSERIESBASE_H | ||
#define BARCHARTSERIESBASE_H | ||||
#include <QList> | ||||
#include <QAbstractItemModel> | ||||
#include "qchartseries.h" | ||||
#include "qchartglobal.h" | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
|
r161 | class BarGroupBase; | ||
class BarChartModel; | ||||
|
r126 | // Container for series | ||
class QTCOMMERCIALCHART_EXPORT BarChartSeriesBase : public QChartSeries | ||||
{ | ||||
Q_OBJECT | ||||
protected: | ||||
BarChartSeriesBase(QObject* parent=0); | ||||
public: | ||||
// from QChartSeries | ||||
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeInvalid; } | ||||
|
r161 | // TODO: << operator for convinience | ||
// Returns id for vector. | ||||
int addData(QList<qreal> data); | ||||
void removeData(int id); | ||||
|
r159 | |||
qreal min(); | ||||
qreal max(); | ||||
|
r161 | int countColumns(); // Count items in one series. | ||
qreal valueAt(int series, int item); | ||||
qreal maxColumnSum(); | ||||
BarChartModel& model(); | ||||
signals: | ||||
void changed(int index); | ||||
|
r126 | |||
public Q_SLOTS: | ||||
private: | ||||
|
r161 | BarChartModel& mModel; | ||
|
r126 | BarGroupBase* mBarGroup; | ||
|
r159 | |||
|
r126 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // BARCHARTSERIESBASE_H | ||||