qbarcategoryaxis.h
79 lines
| 2.5 KiB
| text/x-c
|
CLexer
Michal Klocek
|
r1613 | /**************************************************************************** | ||
** | ||||
Titta Heikkala
|
r2776 | ** Copyright (C) 2015 The Qt Company Ltd | ||
Michal Klocek
|
r1613 | ** All rights reserved. | ||
Titta Heikkala
|
r2776 | ** For any questions to The Qt Company, please use contact form at http://qt.io | ||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2740 | ** This file is part of the Qt Charts module. | ||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2740 | ** Licensees holding valid commercial license for Qt may use this file in | ||
** accordance with the Qt License Agreement provided with the Software | ||||
** or, alternatively, in accordance with the terms contained in a written | ||||
Titta Heikkala
|
r2776 | ** agreement between you and The Qt Company. | ||
Michal Klocek
|
r1613 | ** | ||
** If you have questions regarding the use of this file, please use | ||||
Titta Heikkala
|
r2740 | ** contact form at http://qt.io | ||
Michal Klocek
|
r1613 | ** | ||
****************************************************************************/ | ||||
Jani Honkonen
|
r1935 | #ifndef QBARCATEGORYAXIS_H | ||
#define QBARCATEGORYAXIS_H | ||||
Michal Klocek
|
r1613 | |||
Titta Heikkala
|
r2714 | #include <QtCharts/QAbstractAxis> | ||
Michal Klocek
|
r1613 | |||
Titta Heikkala
|
r2712 | QT_CHARTS_BEGIN_NAMESPACE | ||
Michal Klocek
|
r1613 | |||
Marek Rosa
|
r1808 | class QBarCategoryAxisPrivate; | ||
Michal Klocek
|
r1613 | |||
Titta Heikkala
|
r2712 | class QT_CHARTS_EXPORT QBarCategoryAxis : public QAbstractAxis | ||
Michal Klocek
|
r1613 | { | ||
Q_OBJECT | ||||
Q_PROPERTY(QStringList categories READ categories WRITE setCategories NOTIFY categoriesChanged) | ||||
Q_PROPERTY(QString min READ min WRITE setMin NOTIFY minChanged) | ||||
Q_PROPERTY(QString max READ max WRITE setMax NOTIFY maxChanged) | ||||
Tero Ahola
|
r2249 | Q_PROPERTY(int count READ count NOTIFY countChanged) | ||
Michal Klocek
|
r1613 | |||
public: | ||||
Marek Rosa
|
r1808 | explicit QBarCategoryAxis(QObject *parent = 0); | ||
~QBarCategoryAxis(); | ||||
Michal Klocek
|
r1613 | |||
protected: | ||||
Jani Honkonen
|
r2097 | QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent = 0); | ||
Michal Klocek
|
r1613 | |||
public: | ||||
AxisType type() const; | ||||
void append(const QStringList &categories); | ||||
void append(const QString &category); | ||||
void remove(const QString &category); | ||||
void insert(int index, const QString &category); | ||||
Marek Rosa
|
r1774 | void replace(const QString &oldCategory, const QString &newCategory); | ||
Titta Heikkala
|
r2691 | Q_INVOKABLE void clear(); | ||
Michal Klocek
|
r1613 | void setCategories(const QStringList &categories); | ||
QStringList categories(); | ||||
int count() const; | ||||
QString at(int index) const; | ||||
//range handling | ||||
Jani Honkonen
|
r2104 | void setMin(const QString &minCategory); | ||
Michal Klocek
|
r1613 | QString min() const; | ||
Jani Honkonen
|
r2104 | void setMax(const QString &maxCategory); | ||
Michal Klocek
|
r1613 | QString max() const; | ||
Jani Honkonen
|
r2104 | void setRange(const QString &minCategory, const QString &maxCategory); | ||
Michal Klocek
|
r1613 | |||
Q_SIGNALS: | ||||
void categoriesChanged(); | ||||
Jani Honkonen
|
r2097 | void minChanged(const QString &min); | ||
void maxChanged(const QString &max); | ||||
void rangeChanged(const QString &min, const QString &max); | ||||
Tero Ahola
|
r2249 | void countChanged(); | ||
Michal Klocek
|
r1613 | |||
private: | ||||
Marek Rosa
|
r1808 | Q_DECLARE_PRIVATE(QBarCategoryAxis) | ||
Q_DISABLE_COPY(QBarCategoryAxis) | ||||
Marek Rosa
|
r1918 | friend class ChartBarCategoryAxisX; | ||
friend class ChartBarCategoryAxisY; | ||||
Michal Klocek
|
r1613 | }; | ||
Titta Heikkala
|
r2712 | QT_CHARTS_END_NAMESPACE | ||
Michal Klocek
|
r1613 | |||
Jani Honkonen
|
r1935 | #endif // QBARCATEGORYAXIS_H | ||