1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the QtDataVisualization API. It exists purely as an |
9 | // implementation detail. This header file may change from version to |
10 | // version without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | |
14 | #ifndef QABSTRACT3DGRAPH_P_H |
15 | #define QABSTRACT3DGRAPH_P_H |
16 | |
17 | #include "datavisualizationglobal_p.h" |
18 | |
19 | QT_BEGIN_NAMESPACE |
20 | class QOpenGLContext; |
21 | class QOffscreenSurface; |
22 | QT_END_NAMESPACE |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | class QAbstract3DGraph; |
27 | class Abstract3DController; |
28 | class QAbstract3DAxis; |
29 | |
30 | class QAbstract3DGraphPrivate : public QObject |
31 | { |
32 | Q_OBJECT |
33 | public: |
34 | QAbstract3DGraphPrivate(QAbstract3DGraph *q); |
35 | ~QAbstract3DGraphPrivate(); |
36 | |
37 | void setVisualController(Abstract3DController *controller); |
38 | void handleDevicePixelRatioChange(); |
39 | |
40 | void render(); |
41 | |
42 | QImage renderToImage(int msaaSamples, const QSize &imageSize); |
43 | |
44 | public Q_SLOTS: |
45 | void renderLater(); |
46 | void renderNow(); |
47 | |
48 | virtual void handleAxisXChanged(QAbstract3DAxis *axis) = 0; |
49 | virtual void handleAxisYChanged(QAbstract3DAxis *axis) = 0; |
50 | virtual void handleAxisZChanged(QAbstract3DAxis *axis) = 0; |
51 | |
52 | public: |
53 | QAbstract3DGraph *q_ptr; |
54 | |
55 | bool m_updatePending; |
56 | QOpenGLContext *m_context; |
57 | Abstract3DController *m_visualController; |
58 | float m_devicePixelRatio; |
59 | QOffscreenSurface *m_offscreenSurface; |
60 | bool m_initialized; |
61 | }; |
62 | |
63 | QT_END_NAMESPACE |
64 | |
65 | #endif |
66 |