qbarseries.h
82 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 | ||
sauimone
|
r172 | class QBarSet; | ||
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
|
r1487 | Q_PROPERTY(qreal barWidth READ barWidth WRITE setBarWidth) | ||
Tero Ahola
|
r1462 | Q_PROPERTY(int count READ count NOTIFY countChanged) | ||
sauimone
|
r1429 | Q_PROPERTY(bool labelsVisible READ isLabelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) | ||
Tero Ahola
|
r1302 | |||
sauimone
|
r56 | public: | ||
sauimone
|
r1167 | explicit QBarSeries(QObject *parent = 0); | ||
sauimone
|
r980 | virtual ~QBarSeries(); | ||
sauimone
|
r56 | |||
Michal Klocek
|
r1107 | QAbstractSeries::SeriesType type() const; | ||
sauimone
|
r56 | |||
sauimone
|
r1425 | void setBarWidth(qreal width); | ||
qreal barWidth() const; | ||||
sauimone
|
r1283 | |||
sauimone
|
r1208 | bool append(QBarSet *set); | ||
bool remove(QBarSet *set); | ||||
sauimone
|
r1194 | bool append(QList<QBarSet* > sets); | ||
Marek Rosa
|
r1362 | bool insert(int index, QBarSet *set); | ||
Tero Ahola
|
r1462 | int count() const; | ||
sauimone
|
r776 | QList<QBarSet*> barSets() const; | ||
Marek Rosa
|
r1295 | void clear(); | ||
Michal Klocek
|
r703 | |||
sauimone
|
r820 | void setLabelsVisible(bool visible = true); | ||
Marek Rosa
|
r1362 | bool isLabelsVisible() const; | ||
sauimone
|
r813 | |||
Michal Klocek
|
r943 | protected: | ||
explicit QBarSeries(QBarSeriesPrivate &d,QObject *parent = 0); | ||||
sauimone
|
r775 | Q_SIGNALS: | ||
sauimone
|
r1321 | void clicked(QBarSet *barset, int index); | ||
sauimone
|
r975 | void hovered(QBarSet* barset, bool status); | ||
Tero Ahola
|
r1462 | void countChanged(); | ||
sauimone
|
r1353 | void labelsVisibleChanged(); | ||
void barsetsAdded(QList<QBarSet*> sets); | ||||
void barsetsRemoved(QList<QBarSet*> sets); | ||||
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 | ||