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
19QT_BEGIN_NAMESPACE
20
21class QAbstract3DInputHandler;
22class Q3DScene;
23
24class QAbstract3DInputHandlerPrivate : public QObject
25{
26 Q_OBJECT
27 Q_DECLARE_PUBLIC(QAbstract3DInputHandler)
28
29public:
30 QAbstract3DInputHandlerPrivate(QAbstract3DInputHandler *q);
31 ~QAbstract3DInputHandlerPrivate();
32
33public:
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
45protected:
46 QAbstract3DInputHandler *q_ptr;
47
48private:
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
58QT_END_NAMESPACE
59
60#endif
61

source code of qtgraphs/src/graphs/input/qabstract3dinputhandler_p.h