qabstractbarseries.h
84 lines
| 2.4 KiB
| text/x-c
|
CLexer
|
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$ | ||||
** | ||||
****************************************************************************/ | ||||
|
r1590 | #ifndef ABSTRACTBARSERIES_H | ||
#define ABSTRACTBARSERIES_H | ||||
|
r56 | |||
|
r988 | #include <qabstractseries.h> | ||
|
r377 | #include <QStringList> | ||
|
r74 | |||
|
r56 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r172 | class QBarSet; | ||
|
r1584 | class QAbstractBarSeriesPrivate; | ||
|
r172 | |||
|
r56 | // Container for series | ||
|
r1584 | class QTCOMMERCIALCHART_EXPORT QAbstractBarSeries : public QAbstractSeries | ||
|
r56 | { | ||
|
r71 | Q_OBJECT | ||
|
r1487 | Q_PROPERTY(qreal barWidth READ barWidth WRITE setBarWidth) | ||
|
r1462 | Q_PROPERTY(int count READ count NOTIFY countChanged) | ||
|
r1429 | Q_PROPERTY(bool labelsVisible READ isLabelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) | ||
|
r1302 | |||
|
r1587 | protected: | ||
|
r1584 | explicit QAbstractBarSeries(QObject *parent = 0); | ||
|
r1587 | |||
public: | ||||
|
r1584 | virtual ~QAbstractBarSeries(); | ||
|
r56 | |||
|
r1587 | virtual QAbstractSeries::SeriesType type() const = 0; | ||
|
r56 | |||
|
r1425 | void setBarWidth(qreal width); | ||
qreal barWidth() const; | ||||
|
r1283 | |||
|
r1208 | bool append(QBarSet *set); | ||
bool remove(QBarSet *set); | ||||
|
r1194 | bool append(QList<QBarSet* > sets); | ||
|
r1362 | bool insert(int index, QBarSet *set); | ||
|
r1462 | int count() const; | ||
|
r776 | QList<QBarSet*> barSets() const; | ||
|
r1295 | void clear(); | ||
|
r703 | |||
|
r820 | void setLabelsVisible(bool visible = true); | ||
|
r1362 | bool isLabelsVisible() const; | ||
|
r813 | |||
|
r943 | protected: | ||
|
r1584 | explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d,QObject *parent = 0); | ||
|
r943 | |||
|
r775 | Q_SIGNALS: | ||
|
r1563 | void clicked(int index, QBarSet *barset); | ||
void hovered(bool status, QBarSet *barset); | ||||
|
r1462 | void countChanged(); | ||
|
r1353 | void labelsVisibleChanged(); | ||
void barsetsAdded(QList<QBarSet*> sets); | ||||
void barsetsRemoved(QList<QBarSet*> sets); | ||||
|
r171 | |||
|
r281 | protected: | ||
|
r1584 | Q_DECLARE_PRIVATE(QAbstractBarSeries) | ||
|
r962 | friend class BarChartItem; | ||
friend class PercentBarChartItem; | ||||
friend class StackedBarChartItem; | ||||
|
r1167 | friend class GroupedBarChartItem; | ||
|
r56 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
|
r1590 | #endif // ABSTRACTBARSERIES_H | ||