qbarseries.h
84 lines
| 2.3 KiB
| text/x-c
|
CLexer
Jani Honkonen
|
r794 | /**************************************************************************** | ||
** | ||||
** Copyright (C) 2012 Digia Plc | ||||
** All rights reserved. | ||||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
sauimone
|
r338 | #ifndef BARSERIES_H | ||
#define BARSERIES_H | ||||
sauimone
|
r56 | |||
Tero Ahola
|
r988 | #include <qabstractseries.h> | ||
sauimone
|
r377 | #include <QStringList> | ||
sauimone
|
r74 | |||
sauimone
|
r56 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r703 | typedef QStringList QBarCategories; | ||
Michal Klocek
|
r701 | |||
sauimone
|
r172 | class QBarSet; | ||
sauimone
|
r412 | class BarCategory; | ||
sauimone
|
r934 | class QBarSeriesPrivate; | ||
sauimone
|
r172 | |||
sauimone
|
r56 | // Container for series | ||
Tero Ahola
|
r988 | class QTCOMMERCIALCHART_EXPORT QBarSeries : public QAbstractSeries | ||
sauimone
|
r56 | { | ||
sauimone
|
r71 | Q_OBJECT | ||
Tero Ahola
|
r1302 | Q_PROPERTY(int count READ barsetCount) // TODO: categoryCount to be removed | ||
Q_PROPERTY(bool labelsVisible READ isLabelsVisible WRITE setLabelsVisible) | ||||
sauimone
|
r56 | public: | ||
sauimone
|
r1167 | explicit QBarSeries(QObject *parent = 0); | ||
sauimone
|
r980 | virtual ~QBarSeries(); | ||
sauimone
|
r56 | |||
Michal Klocek
|
r1107 | QAbstractSeries::SeriesType type() const; | ||
sauimone
|
r1112 | void setCategories(QBarCategories categories); | ||
sauimone
|
r56 | |||
sauimone
|
r1283 | void setBarMargin(qreal margin); | ||
sauimone
|
r1284 | qreal barMargin() const; | ||
sauimone
|
r1283 | |||
sauimone
|
r1208 | bool append(QBarSet *set); | ||
bool remove(QBarSet *set); | ||||
sauimone
|
r1194 | bool append(QList<QBarSet* > sets); | ||
bool remove(QList<QBarSet* > sets); | ||||
sauimone
|
r776 | int barsetCount() const; | ||
int categoryCount() const; | ||||
QList<QBarSet*> barSets() const; | ||||
Michal Klocek
|
r703 | QBarCategories categories() const; | ||
Marek Rosa
|
r1295 | void clear(); | ||
Michal Klocek
|
r703 | |||
sauimone
|
r1284 | void setVisible(bool visible = true); | ||
bool isVisible() const; | ||||
sauimone
|
r820 | void setLabelsVisible(bool visible = true); | ||
sauimone
|
r1246 | bool isLabelsVisible() const; | ||
sauimone
|
r813 | |||
Michal Klocek
|
r943 | protected: | ||
explicit QBarSeries(QBarSeriesPrivate &d,QObject *parent = 0); | ||||
sauimone
|
r775 | Q_SIGNALS: | ||
sauimone
|
r1008 | void clicked(QBarSet *barset, QString category); | ||
sauimone
|
r975 | void hovered(QBarSet* barset, bool status); | ||
sauimone
|
r171 | |||
sauimone
|
r281 | protected: | ||
sauimone
|
r934 | Q_DECLARE_PRIVATE(QBarSeries) | ||
sauimone
|
r962 | friend class BarChartItem; | ||
friend class PercentBarChartItem; | ||||
friend class StackedBarChartItem; | ||||
sauimone
|
r1167 | friend class GroupedBarChartItem; | ||
sauimone
|
r56 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
sauimone
|
r338 | #endif // BARSERIES_H | ||