percentbarchartseries.h
56 lines
| 1.3 KiB
| text/x-c
|
CLexer
sauimone
|
r101 | #ifndef PERCENTBARCHARTSERIES_H | ||
#define PERCENTBARCHARTSERIES_H | ||||
#include <QList> | ||||
#include <QAbstractItemModel> | ||||
sauimone
|
r172 | #include "qchartseries.h" | ||
sauimone
|
r101 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class PercentBarGroup; | ||||
sauimone
|
r172 | class QBarCategory; | ||
class QBarSet; | ||||
class BarChartModel; | ||||
sauimone
|
r101 | |||
sauimone
|
r172 | class QTCOMMERCIALCHART_EXPORT PercentBarChartSeries : public QChartSeries | ||
sauimone
|
r101 | { | ||
Q_OBJECT | ||||
public: | ||||
sauimone
|
r173 | PercentBarChartSeries(QBarCategory *category, QObject* parent=0); | ||
sauimone
|
r101 | |||
sauimone
|
r126 | // from BarChartSeriesBase | ||
sauimone
|
r101 | virtual QChartSeriesType type() const { return QChartSeries::SeriesTypePercentBar; } | ||
sauimone
|
r173 | void addBarSet(QBarSet *set); // Takes ownership | ||
void removeBarSet(QBarSet *set); // Also deletes the set, if set is owned. | ||||
sauimone
|
r171 | |||
sauimone
|
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) | ||||
sauimone
|
r172 | int countCategories(); | ||
qreal min(); | ||||
qreal max(); | ||||
qreal valueAt(int set, int category); | ||||
qreal maxCategorySum(); | ||||
BarChartModel& model(); | ||||
signals: | ||||
void changed(int index); | ||||
sauimone
|
r101 | public Q_SLOTS: | ||
sauimone
|
r172 | |||
sauimone
|
r101 | private: | ||
PercentBarGroup* mPercentBarGroup; | ||||
sauimone
|
r172 | BarChartModel* mModel; | ||
sauimone
|
r101 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // PERCENTBARCHARTSERIES_H | ||||