1 | // Copyright (C) 2023 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef Q3DSURFACE_H |
5 | #define Q3DSURFACE_H |
6 | |
7 | #include <QtGraphs/qabstract3dgraph.h> |
8 | #include <QtGraphs/qvalue3daxis.h> |
9 | #include <QtGraphs/qsurface3dseries.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QQuickGraphsSurface; |
14 | |
15 | class Q_GRAPHS_EXPORT Q3DSurface : public QAbstract3DGraph |
16 | { |
17 | Q_OBJECT |
18 | Q_PROPERTY(QValue3DAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged) |
19 | Q_PROPERTY(QValue3DAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged) |
20 | Q_PROPERTY(QValue3DAxis *axisZ READ axisZ WRITE setAxisZ NOTIFY axisZChanged) |
21 | Q_PROPERTY(QSurface3DSeries *selectedSeries READ selectedSeries NOTIFY selectedSeriesChanged) |
22 | Q_PROPERTY(bool flipHorizontalGrid READ flipHorizontalGrid WRITE setFlipHorizontalGrid NOTIFY flipHorizontalGridChanged) |
23 | |
24 | public: |
25 | explicit Q3DSurface(); |
26 | virtual ~Q3DSurface(); |
27 | |
28 | void addSeries(QSurface3DSeries *series); |
29 | void removeSeries(QSurface3DSeries *series); |
30 | QList<QSurface3DSeries *> seriesList() const; |
31 | |
32 | // Axes |
33 | void setAxisX(QValue3DAxis *axis); |
34 | QValue3DAxis *axisX() const; |
35 | void setAxisY(QValue3DAxis *axis); |
36 | QValue3DAxis *axisY() const; |
37 | void setAxisZ(QValue3DAxis *axis); |
38 | QValue3DAxis *axisZ() const; |
39 | void addAxis(QValue3DAxis *axis); |
40 | void releaseAxis(QValue3DAxis *axis); |
41 | QList<QValue3DAxis *> axes() const; |
42 | |
43 | QSurface3DSeries *selectedSeries() const; |
44 | void setFlipHorizontalGrid(bool flip); |
45 | bool flipHorizontalGrid() const; |
46 | |
47 | Q_SIGNALS: |
48 | void axisXChanged(QValue3DAxis *axis); |
49 | void axisYChanged(QValue3DAxis *axis); |
50 | void axisZChanged(QValue3DAxis *axis); |
51 | void selectedSeriesChanged(QSurface3DSeries *series); |
52 | void flipHorizontalGridChanged(bool flip); |
53 | |
54 | private: |
55 | QQuickGraphsSurface *dptr(); |
56 | const QQuickGraphsSurface *dptrc() const; |
57 | }; |
58 | |
59 | QT_END_NAMESPACE |
60 | |
61 | #endif |
62 |