qabstractbarseries.h
83 lines
| 2.5 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$ | ||||
** | ||||
****************************************************************************/ | ||||
Jani Honkonen
|
r2046 | #ifndef QABSTRACTBARSERIES_H | ||
#define QABSTRACTBARSERIES_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
|
r1584 | class QAbstractBarSeriesPrivate; | ||
sauimone
|
r172 | |||
sauimone
|
r56 | // Container for series | ||
sauimone
|
r1584 | class QTCOMMERCIALCHART_EXPORT QAbstractBarSeries : 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
|
r1587 | public: | ||
sauimone
|
r1584 | virtual ~QAbstractBarSeries(); | ||
sauimone
|
r56 | |||
sauimone
|
r1425 | void setBarWidth(qreal width); | ||
qreal barWidth() const; | ||||
sauimone
|
r1283 | |||
sauimone
|
r1208 | bool append(QBarSet *set); | ||
bool remove(QBarSet *set); | ||||
sauimone
|
r1802 | bool take(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: | ||
Jani Honkonen
|
r2097 | explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = 0); | ||
Michal Klocek
|
r943 | |||
sauimone
|
r775 | Q_SIGNALS: | ||
sauimone
|
r1563 | void clicked(int index, QBarSet *barset); | ||
void hovered(bool status, QBarSet *barset); | ||||
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
|
r1584 | Q_DECLARE_PRIVATE(QAbstractBarSeries) | ||
sauimone
|
r1674 | friend class AbstractBarChartItem; | ||
sauimone
|
r962 | friend class PercentBarChartItem; | ||
friend class StackedBarChartItem; | ||||
sauimone
|
r1674 | friend class BarChartItem; | ||
sauimone
|
r1681 | friend class HorizontalBarChartItem; | ||
sauimone
|
r1685 | friend class HorizontalStackedBarChartItem; | ||
sauimone
|
r1688 | friend class HorizontalPercentBarChartItem; | ||
sauimone
|
r56 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
Jani Honkonen
|
r2046 | #endif // QABSTRACTBARSERIES_H | ||