qbarcategoryaxis.h
82 lines
| 2.6 KiB
| text/x-c
|
CLexer
Titta Heikkala
|
r2845 | /****************************************************************************** | ||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2845 | ** Copyright (C) 2015 The Qt Company Ltd. | ||
** Contact: http://www.qt.io/licensing/ | ||||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2740 | ** This file is part of the Qt Charts module. | ||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2845 | ** $QT_BEGIN_LICENSE:COMM$ | ||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2845 | ** Commercial License Usage | ||
** Licensees holding valid commercial Qt licenses may use this file in | ||||
** accordance with the commercial license agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and The Qt Company. For licensing terms | ||||
** and conditions see http://www.qt.io/terms-conditions. For further | ||||
** information use the contact form at http://www.qt.io/contact-us. | ||||
Michal Klocek
|
r1613 | ** | ||
Titta Heikkala
|
r2845 | ** $QT_END_LICENSE$ | ||
** | ||||
******************************************************************************/ | ||||
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: | ||||
Marc Mutz
|
r2871 | explicit QBarCategoryAxis(QObject *parent = Q_NULLPTR); | ||
Marek Rosa
|
r1808 | ~QBarCategoryAxis(); | ||
Michal Klocek
|
r1613 | |||
protected: | ||||
Marc Mutz
|
r2871 | QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent = Q_NULLPTR); | ||
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 | ||