qbarseries.h
82 lines
| 2.4 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 | |||
Jani Honkonen
|
r697 | #include <qseries.h> | ||
sauimone
|
r377 | #include <QStringList> | ||
sauimone
|
r74 | |||
Marek Rosa
|
r877 | class QModelIndex; | ||
sauimone
|
r56 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r703 | typedef QStringList QBarCategories; | ||
Michal Klocek
|
r701 | |||
sauimone
|
r172 | class QBarSet; | ||
class BarChartModel; | ||||
sauimone
|
r412 | class BarCategory; | ||
sauimone
|
r934 | class QBarSeriesPrivate; | ||
sauimone
|
r172 | |||
sauimone
|
r56 | // Container for series | ||
Michal Klocek
|
r360 | class QTCOMMERCIALCHART_EXPORT QBarSeries : public QSeries | ||
sauimone
|
r56 | { | ||
sauimone
|
r71 | Q_OBJECT | ||
sauimone
|
r56 | public: | ||
Michal Klocek
|
r970 | explicit QBarSeries(QBarCategories categories, QObject *parent = 0); | ||
sauimone
|
r980 | virtual ~QBarSeries(); | ||
sauimone
|
r56 | |||
Michal Klocek
|
r938 | QSeries::QSeriesType type() const; | ||
sauimone
|
r56 | |||
sauimone
|
r850 | void appendBarSet(QBarSet *set); // Takes ownership of set | ||
sauimone
|
r280 | void removeBarSet(QBarSet *set); // Releases ownership, doesn't delete set | ||
sauimone
|
r850 | void appendBarSets(QList<QBarSet* > sets); | ||
void removeBarSets(QList<QBarSet* > sets); | ||||
Marek Rosa
|
r662 | void insertBarSet(int i, QBarSet *set); | ||
void insertCategory(int i, QString category); | ||||
Marek Rosa
|
r663 | void removeCategory(int i); | ||
sauimone
|
r776 | int barsetCount() const; | ||
int categoryCount() const; | ||||
QList<QBarSet*> barSets() const; | ||||
Michal Klocek
|
r703 | QBarCategories categories() const; | ||
sauimone
|
r820 | void setLabelsVisible(bool visible = true); | ||
sauimone
|
r813 | |||
Tero Ahola
|
r737 | bool setModel(QAbstractItemModel *model); | ||
sauimone
|
r934 | void setModelMapping(int categories, int bottomBoundary, int topBoundary, Qt::Orientation orientation = Qt::Vertical); | ||
Marek Rosa
|
r527 | |||
Michal Klocek
|
r943 | protected: | ||
explicit QBarSeries(QBarSeriesPrivate &d,QObject *parent = 0); | ||||
sauimone
|
r775 | Q_SIGNALS: | ||
sauimone
|
r962 | void clicked(QBarSet *barset, QString category, Qt::MouseButtons button); | ||
Michal Klocek
|
r855 | void selected(); | ||
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
|
r56 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
sauimone
|
r338 | #endif // BARSERIES_H | ||