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 QABSTRACTAXIS_P_H |
14 | #define QABSTRACTAXIS_P_H |
15 | |
16 | #include <QtGraphs/QAbstractAxis> |
17 | #include <private/qgraphsview_p.h> |
18 | #include <QtCore/QDebug> |
19 | #include <QtCore/private/qobject_p.h> |
20 | #include <QColor> |
21 | |
22 | #include <memory> |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | class QQmlComponent; |
27 | |
28 | class QAbstractAxisPrivate : public QObjectPrivate |
29 | { |
30 | public: |
31 | QAbstractAxisPrivate(); |
32 | ~QAbstractAxisPrivate() override; |
33 | |
34 | public: |
35 | void setGraph(QGraphsView *graph) { m_graph = graph; } |
36 | |
37 | //interface for manipulating range form base class |
38 | virtual void setMin(const QVariant &min) = 0; |
39 | virtual void setMax(const QVariant &max) = 0; |
40 | virtual void setRange(const QVariant &min, const QVariant &max) = 0; |
41 | |
42 | //interface manipulating range form domain |
43 | virtual void setRange(qreal min, qreal max) = 0; |
44 | virtual qreal min() = 0; |
45 | virtual qreal max() = 0; |
46 | |
47 | public Q_SLOTS: |
48 | void handleRangeChanged(qreal min, qreal max); |
49 | |
50 | protected: |
51 | QGraphsView *m_graph = nullptr; |
52 | |
53 | private: |
54 | bool m_visible = true; |
55 | |
56 | bool m_lineVisible = true; |
57 | |
58 | bool m_gridVisible = true; |
59 | bool m_subGridVisible = true; |
60 | |
61 | bool m_labelsVisible = true; |
62 | qreal m_labelsAngle = 0; |
63 | QQmlComponent *m_labelDelegate = nullptr; |
64 | |
65 | bool m_titleVisible = true; |
66 | QColor m_titleColor; |
67 | QFont m_titleFont; |
68 | QString m_title; |
69 | |
70 | Q_DECLARE_PUBLIC(QAbstractAxis) |
71 | }; |
72 | |
73 | QT_END_NAMESPACE |
74 | |
75 | #endif |
76 |