1 | // Copyright (C) 2023 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef QSCATTER3DSERIES_H |
5 | #define QSCATTER3DSERIES_H |
6 | |
7 | #include <QtGraphs/qabstract3dseries.h> |
8 | #include <QtGraphs/qscatterdataproxy.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | class QScatter3DSeriesPrivate; |
13 | |
14 | class Q_GRAPHS_EXPORT QScatter3DSeries : public QAbstract3DSeries |
15 | { |
16 | Q_OBJECT |
17 | Q_DECLARE_PRIVATE(QScatter3DSeries) |
18 | Q_PROPERTY(QScatterDataProxy *dataProxy READ dataProxy WRITE setDataProxy NOTIFY dataProxyChanged) |
19 | Q_PROPERTY(int selectedItem READ selectedItem WRITE setSelectedItem NOTIFY selectedItemChanged) |
20 | Q_PROPERTY(float itemSize READ itemSize WRITE setItemSize NOTIFY itemSizeChanged) |
21 | |
22 | public: |
23 | explicit QScatter3DSeries(QObject *parent = nullptr); |
24 | explicit QScatter3DSeries(QScatterDataProxy *dataProxy, QObject *parent = nullptr); |
25 | virtual ~QScatter3DSeries(); |
26 | |
27 | void setDataProxy(QScatterDataProxy *proxy); |
28 | QScatterDataProxy *dataProxy() const; |
29 | |
30 | void setSelectedItem(int index); |
31 | int selectedItem() const; |
32 | static int invalidSelectionIndex(); |
33 | |
34 | void setItemSize(float size); |
35 | float itemSize() const; |
36 | |
37 | Q_SIGNALS: |
38 | void dataProxyChanged(QScatterDataProxy *proxy); |
39 | void selectedItemChanged(int index); |
40 | void itemSizeChanged(float size); |
41 | |
42 | protected: |
43 | explicit QScatter3DSeries(QScatter3DSeriesPrivate *d, QObject *parent = nullptr); |
44 | |
45 | private: |
46 | Q_DISABLE_COPY(QScatter3DSeries) |
47 | |
48 | friend class Scatter3DController; |
49 | friend class QQuickGraphsScatter; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | #endif |
55 | |