stackedbarchartseries.h
53 lines
| 1.3 KiB
| text/x-c
|
CLexer
|
r96 | #ifndef STACKEDBARCHARTSERIES_H | ||
#define STACKEDBARCHARTSERIES_H | ||||
#include <QList> | ||||
#include <QAbstractItemModel> | ||||
|
r172 | #include "qchartseries.h" | ||
|
r96 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class StackedBarGroup; | ||||
|
r172 | class QBarCategory; | ||
class QBarSet; | ||||
class BarChartModel; | ||||
|
r96 | |||
|
r172 | class QTCOMMERCIALCHART_EXPORT StackedBarChartSeries : public QChartSeries | ||
|
r96 | { | ||
Q_OBJECT | ||||
public: | ||||
|
r173 | StackedBarChartSeries(QBarCategory *category, QObject* parent=0); | ||
|
r96 | |||
// from QChartSeries | ||||
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeStackedBar; } | ||||
|
r173 | void addBarSet(QBarSet *set); // Takes ownership | ||
void removeBarSet(QBarSet *set); // Also deletes the set, if set is owned. | ||||
|
r171 | |||
|
r173 | //TODO: | ||
//QList<QString> legend(); // Returns legend of series (ie. names of all sets in series) | ||||
// TODO: Functions below this are not part of api and will be moved | ||||
// to private implementation, when we start using it (not part of api) | ||||
|
r172 | int countCategories(); | ||
qreal min(); | ||||
qreal max(); | ||||
qreal valueAt(int set, int category); | ||||
qreal maxCategorySum(); | ||||
BarChartModel& model(); | ||||
signals: | ||||
void changed(int index); | ||||
|
r96 | public Q_SLOTS: | ||
private: | ||||
StackedBarGroup* mStackedBarGroup; | ||||
|
r172 | BarChartModel* mModel; | ||
|
r96 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // STACKEDBARCHARTSERIES_H | ||||