qcategoryaxis.h
68 lines
| 1.9 KiB
| text/x-c
|
CLexer
|
r1540 | /**************************************************************************** | ||
** | ||||
|
r2776 | ** Copyright (C) 2015 The Qt Company Ltd | ||
|
r1540 | ** All rights reserved. | ||
|
r2776 | ** For any questions to The Qt Company, please use contact form at http://qt.io | ||
|
r1540 | ** | ||
|
r2740 | ** This file is part of the Qt Charts module. | ||
|
r1540 | ** | ||
|
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 | ||||
|
r2776 | ** agreement between you and The Qt Company. | ||
|
r1540 | ** | ||
** If you have questions regarding the use of this file, please use | ||||
|
r2740 | ** contact form at http://qt.io | ||
|
r1540 | ** | ||
****************************************************************************/ | ||||
|
r1935 | #ifndef QCATEGORYAXIS_H | ||
#define QCATEGORYAXIS_H | ||||
|
r1540 | |||
|
r2714 | #include <QtCharts/QAbstractAxis> | ||
#include <QtCharts/QValueAxis> | ||||
|
r1540 | |||
|
r2712 | QT_CHARTS_BEGIN_NAMESPACE | ||
|
r1540 | |||
|
r1816 | class QCategoryAxisPrivate; | ||
|
r1540 | |||
|
r2712 | class QT_CHARTS_EXPORT QCategoryAxis : public QValueAxis | ||
|
r1540 | { | ||
Q_OBJECT | ||||
|
r1834 | Q_PROPERTY(qreal startValue READ startValue WRITE setStartValue) | ||
|
r2244 | Q_PROPERTY(int count READ count) | ||
Q_PROPERTY(QStringList categoriesLabels READ categoriesLabels) | ||||
|
r1540 | |||
public: | ||||
|
r1816 | explicit QCategoryAxis(QObject *parent = 0); | ||
~QCategoryAxis(); | ||||
|
r1540 | |||
protected: | ||||
|
r2097 | QCategoryAxis(QCategoryAxisPrivate &d, QObject *parent = 0); | ||
|
r1540 | |||
public: | ||||
AxisType type() const; | ||||
|
r1613 | |||
|
r2104 | void append(const QString &label, qreal categoryEndValue); | ||
void remove(const QString &label); | ||||
void replaceLabel(const QString &oldLabel, const QString &newLabel); | ||||
|
r1613 | |||
|
r2104 | qreal startValue(const QString &categoryLabel = QString()) const; | ||
|
r1829 | void setStartValue(qreal min); | ||
|
r1613 | |||
|
r2104 | qreal endValue(const QString &categoryLabel) const; | ||
|
r1613 | |||
|
r1829 | QStringList categoriesLabels(); | ||
|
r1541 | int count() const; | ||
|
r1578 | |||
|
r2483 | Q_SIGNALS: | ||
void categoriesChanged(); | ||||
|
r1540 | private: | ||
|
r1816 | Q_DECLARE_PRIVATE(QCategoryAxis) | ||
Q_DISABLE_COPY(QCategoryAxis) | ||||
|
r1540 | }; | ||
|
r2712 | QT_CHARTS_END_NAMESPACE | ||
|
r1540 | |||
|
r1935 | #endif // QCATEGORYAXIS_H | ||