1 | // Copyright (C) 2023 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 QtGraphs 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 QABSTRACT3DINPUTHANDLER_P_H |
15 | #define QABSTRACT3DINPUTHANDLER_P_H |
16 | |
17 | #include "qabstract3dinputhandler.h" |
18 | |
19 | QT_BEGIN_NAMESPACE |
20 | |
21 | class QAbstract3DInputHandler; |
22 | class Q3DScene; |
23 | |
24 | class QAbstract3DInputHandlerPrivate : public QObject |
25 | { |
26 | Q_OBJECT |
27 | Q_DECLARE_PUBLIC(QAbstract3DInputHandler) |
28 | |
29 | public: |
30 | QAbstract3DInputHandlerPrivate(QAbstract3DInputHandler *q); |
31 | ~QAbstract3DInputHandlerPrivate(); |
32 | |
33 | public: |
34 | enum InputState { |
35 | InputStateNone = 0, |
36 | InputStateSelecting, |
37 | InputStateRotating, |
38 | InputStatePinching |
39 | }; |
40 | |
41 | int m_prevDistance = 0; |
42 | QPoint m_previousInputPos = {}; |
43 | InputState m_inputState = InputStateNone; |
44 | |
45 | protected: |
46 | QAbstract3DInputHandler *q_ptr; |
47 | |
48 | private: |
49 | QAbstract3DInputHandler::InputView m_inputView; |
50 | QPoint m_inputPosition; |
51 | |
52 | Q3DScene *m_scene; |
53 | bool m_isDefaultHandler; |
54 | |
55 | friend class QQuickGraphsItem; |
56 | }; |
57 | |
58 | QT_END_NAMESPACE |
59 | |
60 | #endif |
61 |