1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef QVALUE3DAXIS_H |
5 | #define QVALUE3DAXIS_H |
6 | |
7 | #include <QtDataVisualization/qabstract3daxis.h> |
8 | #include <QtDataVisualization/qvalue3daxisformatter.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | class QValue3DAxisPrivate; |
13 | |
14 | class Q_DATAVISUALIZATION_EXPORT QValue3DAxis : public QAbstract3DAxis |
15 | { |
16 | Q_OBJECT |
17 | Q_PROPERTY(int segmentCount READ segmentCount WRITE setSegmentCount NOTIFY segmentCountChanged) |
18 | Q_PROPERTY(int subSegmentCount READ subSegmentCount WRITE setSubSegmentCount NOTIFY subSegmentCountChanged) |
19 | Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged) |
20 | Q_PROPERTY(QValue3DAxisFormatter* formatter READ formatter WRITE setFormatter NOTIFY formatterChanged REVISION(1, 1)) |
21 | Q_PROPERTY(bool reversed READ reversed WRITE setReversed NOTIFY reversedChanged REVISION(1, 1)) |
22 | |
23 | public: |
24 | explicit QValue3DAxis(QObject *parent = nullptr); |
25 | virtual ~QValue3DAxis(); |
26 | |
27 | void setSegmentCount(int count); |
28 | int segmentCount() const; |
29 | |
30 | void setSubSegmentCount(int count); |
31 | int subSegmentCount() const; |
32 | |
33 | void setLabelFormat(const QString &format); |
34 | QString labelFormat() const; |
35 | |
36 | void setFormatter(QValue3DAxisFormatter *formatter); |
37 | QValue3DAxisFormatter *formatter() const; |
38 | |
39 | void setReversed(bool enable); |
40 | bool reversed() const; |
41 | |
42 | Q_SIGNALS: |
43 | void segmentCountChanged(int count); |
44 | void subSegmentCountChanged(int count); |
45 | void labelFormatChanged(const QString &format); |
46 | Q_REVISION(1, 1) void formatterChanged(QValue3DAxisFormatter *formatter); |
47 | Q_REVISION(1, 1) void reversedChanged(bool enable); |
48 | |
49 | protected: |
50 | QValue3DAxisPrivate *dptr(); |
51 | const QValue3DAxisPrivate *dptrc() const; |
52 | |
53 | private: |
54 | Q_DISABLE_COPY(QValue3DAxis) |
55 | friend class Abstract3DController; |
56 | friend class Bars3DController; |
57 | friend class Scatter3DController; |
58 | friend class Surface3DController; |
59 | friend class QValue3DAxisFormatterPrivate; |
60 | }; |
61 | |
62 | QT_END_NAMESPACE |
63 | |
64 | #endif |
65 |