1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DINPUT_INPUT_INPUTMANAGERS_P_H
5#define QT3DINPUT_INPUT_INPUTMANAGERS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/QtGlobal>
19
20#include <Qt3DInput/private/handle_types_p.h>
21#include <Qt3DInput/private/keyboarddevice_p.h>
22#include <Qt3DInput/private/keyboardhandler_p.h>
23#include <Qt3DInput/private/mousehandler_p.h>
24#include <Qt3DInput/private/mousedevice_p.h>
25#include <Qt3DInput/private/actioninput_p.h>
26#include <Qt3DInput/private/inputsequence_p.h>
27#include <Qt3DInput/private/inputchord_p.h>
28#include <Qt3DInput/private/action_p.h>
29#include <Qt3DInput/private/axis_p.h>
30#include <Qt3DInput/private/axisaccumulator_p.h>
31#include <Qt3DInput/private/axissetting_p.h>
32#include <Qt3DInput/private/analogaxisinput_p.h>
33#include <Qt3DInput/private/buttonaxisinput_p.h>
34#include <Qt3DInput/private/logicaldevice_p.h>
35#include <Qt3DInput/private/genericdevicebackendnode_p.h>
36#include <Qt3DInput/private/physicaldeviceproxy_p.h>
37#include <Qt3DCore/private/qresourcemanager_p.h>
38
39QT_BEGIN_NAMESPACE
40
41namespace Qt3DInput {
42namespace Input {
43
44class KeyboardInputManager : public Qt3DCore::QResourceManager<
45 KeyboardHandler,
46 Qt3DCore::QNodeId>
47{
48public:
49 KeyboardInputManager() {}
50};
51
52class KeyboardDeviceManager : public Qt3DCore::QResourceManager<
53 KeyboardDevice,
54 Qt3DCore::QNodeId>
55{
56public:
57 KeyboardDeviceManager() {}
58};
59
60class MouseDeviceManager : public Qt3DCore::QResourceManager<
61 MouseDevice,
62 Qt3DCore::QNodeId>
63{
64public:
65 MouseDeviceManager() {}
66};
67
68class MouseInputManager : public Qt3DCore::QResourceManager<
69 MouseHandler,
70 Qt3DCore::QNodeId>
71{
72public:
73 MouseInputManager() {}
74};
75
76class AxisManager : public Qt3DCore::QResourceManager<
77 Axis,
78 Qt3DCore::QNodeId>
79{
80public:
81 AxisManager() {}
82};
83
84class AxisSettingManager : public Qt3DCore::QResourceManager<
85 AxisSetting,
86 Qt3DCore::QNodeId>
87{
88public:
89 AxisSettingManager() {}
90};
91
92class ActionManager : public Qt3DCore::QResourceManager<
93 Action,
94 Qt3DCore::QNodeId>
95{
96public:
97 ActionManager() {}
98};
99
100class ActionInputManager : public Qt3DCore::QResourceManager<
101 ActionInput,
102 Qt3DCore::QNodeId>
103{
104public:
105 ActionInputManager() {}
106};
107
108class AnalogAxisInputManager : public Qt3DCore::QResourceManager<
109 AnalogAxisInput,
110 Qt3DCore::QNodeId>
111{
112public:
113 AnalogAxisInputManager() {}
114};
115
116class ButtonAxisInputManager : public Qt3DCore::QResourceManager<
117 ButtonAxisInput,
118 Qt3DCore::QNodeId>
119{
120public:
121 ButtonAxisInputManager() {}
122};
123
124class InputChordManager : public Qt3DCore::QResourceManager<
125 InputChord,
126 Qt3DCore::QNodeId>
127{
128public:
129 InputChordManager() {}
130};
131
132class InputSequenceManager : public Qt3DCore::QResourceManager<
133 InputSequence,
134 Qt3DCore::QNodeId>
135{
136public:
137 InputSequenceManager() {}
138};
139
140class LogicalDeviceManager : public Qt3DCore::QResourceManager<
141 LogicalDevice,
142 Qt3DCore::QNodeId>
143{
144public:
145 LogicalDeviceManager() {}
146
147 QList<HLogicalDevice> activeDevices() const { return m_activeDevices; }
148 void addActiveDevice(HLogicalDevice device) { m_activeDevices.push_back(t: device); }
149 void removeActiveDevice(HLogicalDevice device) { m_activeDevices.removeOne(t: device); }
150
151private:
152 QList<HLogicalDevice> m_activeDevices;
153};
154
155class GenericDeviceBackendNodeManager : public Qt3DCore::QResourceManager<
156 GenericDeviceBackendNode,
157 Qt3DCore::QNodeId>
158{
159public:
160 GenericDeviceBackendNodeManager() {}
161};
162
163class Q_AUTOTEST_EXPORT PhysicalDeviceProxyManager : public Qt3DCore::QResourceManager<
164 PhysicalDeviceProxy,
165 Qt3DCore::QNodeId>
166{
167public:
168 PhysicalDeviceProxyManager() {}
169
170 void addPendingProxyToLoad(Qt3DCore::QNodeId id) { m_pendingProxies.push_back(t: id); }
171 QList<Qt3DCore::QNodeId> takePendingProxiesToLoad() { return std::move(m_pendingProxies); }
172
173private:
174 QList<Qt3DCore::QNodeId> m_pendingProxies;
175};
176
177class AxisAccumulatorManager : public Qt3DCore::QResourceManager<
178 AxisAccumulator,
179 Qt3DCore::QNodeId>
180{
181public:
182 AxisAccumulatorManager() {}
183};
184
185} // namespace Input
186} // namespace Qt3DInput
187
188QT_END_NAMESPACE
189
190#endif // QT3DINPUT_INPUT_INPUTMANAGERS_P_H
191

source code of qt3d/src/input/backend/inputmanagers_p.h