1 | // Copyright (C) 2023 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | // W A R N I N G |
5 | // ------------- |
6 | // |
7 | // This file is not part of the QtGraphs API. It exists purely as an |
8 | // implementation detail. This header file may change from version to |
9 | // version without notice, or even be removed. |
10 | // |
11 | // We mean it. |
12 | |
13 | #ifndef QBARCATEGORYAXIS_P_H |
14 | #define QBARCATEGORYAXIS_P_H |
15 | |
16 | #include <QtGraphs/QBarCategoryAxis> |
17 | #include <private/qabstractaxis_p.h> |
18 | |
19 | QT_BEGIN_NAMESPACE |
20 | |
21 | class QBarCategoryAxisPrivate : public QAbstractAxisPrivate |
22 | { |
23 | public: |
24 | QBarCategoryAxisPrivate(); |
25 | ~QBarCategoryAxisPrivate() override; |
26 | |
27 | public: |
28 | //interface for manipulating range form base class |
29 | void setRange(const QVariant &min, const QVariant &max) override; |
30 | void setMin(const QVariant &min) override; |
31 | void setMax(const QVariant &max) override; |
32 | |
33 | //interface manipulating range form domain |
34 | qreal min() override { return m_min; } |
35 | qreal max() override { return m_max; } |
36 | void setRange(qreal min,qreal max) override; |
37 | |
38 | private: |
39 | //range handling |
40 | void setRange(const QString &minCategory, const QString &maxCategory); |
41 | |
42 | private: |
43 | QStringList m_categories; |
44 | QString m_minCategory; |
45 | QString m_maxCategory; |
46 | qreal m_min; |
47 | qreal m_max; |
48 | int m_count; |
49 | |
50 | private: |
51 | Q_DECLARE_PUBLIC(QBarCategoryAxis) |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif // QBARCATEGORYAXIS_P_H |
57 | |