qbarchartseries.h
52 lines
| 1.3 KiB
| text/x-c
|
CLexer
|
r56 | #ifndef BARCHARTSERIES_H | ||
#define BARCHARTSERIES_H | ||||
#include <QList> | ||||
|
r71 | #include <QAbstractItemModel> | ||
|
r172 | #include "qchartseries.h" | ||
|
r74 | |||
|
r56 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r172 | class QBarCategory; | ||
class QBarSet; | ||||
class BarChartModel; | ||||
|
r56 | // Container for series | ||
|
r216 | class QTCOMMERCIALCHART_EXPORT QBarChartSeries : public QChartSeries | ||
|
r56 | { | ||
|
r71 | Q_OBJECT | ||
|
r56 | public: | ||
|
r216 | QBarChartSeries(QBarCategory *category, QObject* parent=0); | ||
|
r56 | |||
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeBar; } | ||||
|
r214 | void addBarSet(QBarSet *set); // Takes ownership of set | ||
void removeBarSet(QBarSet *set); // Removes set, releases ownership. | ||||
int countSets(); | ||||
QBarSet* nextSet(bool getFirst=false); // Returns first set, if called with true | ||||
|
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); | ||||
|
r171 | public Q_SLOTS: | ||
|
r56 | private: | ||
|
r172 | BarChartModel* mModel; | ||
|
r56 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // BARCHARTSERIES_H | ||||