1/****************************************************************************
2**
3** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt3D module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QT3DINPUT_INPUT_INPUTMANAGERS_P_H
41#define QT3DINPUT_INPUT_INPUTMANAGERS_P_H
42
43//
44// W A R N I N G
45// -------------
46//
47// This file is not part of the Qt API. It exists for the convenience
48// of other Qt classes. This header file may change from version to
49// version without notice, or even be removed.
50//
51// We mean it.
52//
53
54#include <QtCore/QtGlobal>
55
56#include <Qt3DInput/private/handle_types_p.h>
57#include <Qt3DInput/private/keyboarddevice_p.h>
58#include <Qt3DInput/private/keyboardhandler_p.h>
59#include <Qt3DInput/private/mousehandler_p.h>
60#include <Qt3DInput/private/mousedevice_p.h>
61#include <Qt3DInput/private/actioninput_p.h>
62#include <Qt3DInput/private/inputsequence_p.h>
63#include <Qt3DInput/private/inputchord_p.h>
64#include <Qt3DInput/private/action_p.h>
65#include <Qt3DInput/private/axis_p.h>
66#include <Qt3DInput/private/axisaccumulator_p.h>
67#include <Qt3DInput/private/axissetting_p.h>
68#include <Qt3DInput/private/analogaxisinput_p.h>
69#include <Qt3DInput/private/buttonaxisinput_p.h>
70#include <Qt3DInput/private/logicaldevice_p.h>
71#include <Qt3DInput/private/genericdevicebackendnode_p.h>
72#include <Qt3DInput/private/physicaldeviceproxy_p.h>
73#include <Qt3DCore/private/qresourcemanager_p.h>
74
75QT_BEGIN_NAMESPACE
76
77namespace Qt3DInput {
78namespace Input {
79
80class KeyboardInputManager : public Qt3DCore::QResourceManager<
81 KeyboardHandler,
82 Qt3DCore::QNodeId>
83{
84public:
85 KeyboardInputManager() {}
86};
87
88class KeyboardDeviceManager : public Qt3DCore::QResourceManager<
89 KeyboardDevice,
90 Qt3DCore::QNodeId>
91{
92public:
93 KeyboardDeviceManager() {}
94};
95
96class MouseDeviceManager : public Qt3DCore::QResourceManager<
97 MouseDevice,
98 Qt3DCore::QNodeId>
99{
100public:
101 MouseDeviceManager() {}
102};
103
104class MouseInputManager : public Qt3DCore::QResourceManager<
105 MouseHandler,
106 Qt3DCore::QNodeId>
107{
108public:
109 MouseInputManager() {}
110};
111
112class AxisManager : public Qt3DCore::QResourceManager<
113 Axis,
114 Qt3DCore::QNodeId>
115{
116public:
117 AxisManager() {}
118};
119
120class AxisSettingManager : public Qt3DCore::QResourceManager<
121 AxisSetting,
122 Qt3DCore::QNodeId>
123{
124public:
125 AxisSettingManager() {}
126};
127
128class ActionManager : public Qt3DCore::QResourceManager<
129 Action,
130 Qt3DCore::QNodeId>
131{
132public:
133 ActionManager() {}
134};
135
136class ActionInputManager : public Qt3DCore::QResourceManager<
137 ActionInput,
138 Qt3DCore::QNodeId>
139{
140public:
141 ActionInputManager() {}
142};
143
144class AnalogAxisInputManager : public Qt3DCore::QResourceManager<
145 AnalogAxisInput,
146 Qt3DCore::QNodeId>
147{
148public:
149 AnalogAxisInputManager() {}
150};
151
152class ButtonAxisInputManager : public Qt3DCore::QResourceManager<
153 ButtonAxisInput,
154 Qt3DCore::QNodeId>
155{
156public:
157 ButtonAxisInputManager() {}
158};
159
160class InputChordManager : public Qt3DCore::QResourceManager<
161 InputChord,
162 Qt3DCore::QNodeId>
163{
164public:
165 InputChordManager() {}
166};
167
168class InputSequenceManager : public Qt3DCore::QResourceManager<
169 InputSequence,
170 Qt3DCore::QNodeId>
171{
172public:
173 InputSequenceManager() {}
174};
175
176class LogicalDeviceManager : public Qt3DCore::QResourceManager<
177 LogicalDevice,
178 Qt3DCore::QNodeId>
179{
180public:
181 LogicalDeviceManager() {}
182
183 QVector<HLogicalDevice> activeDevices() const { return m_activeDevices; }
184 void addActiveDevice(HLogicalDevice device) { m_activeDevices.push_back(device); }
185 void removeActiveDevice(HLogicalDevice device) { m_activeDevices.removeOne(device); }
186
187private:
188 QVector<HLogicalDevice> m_activeDevices;
189};
190
191class GenericDeviceBackendNodeManager : public Qt3DCore::QResourceManager<
192 GenericDeviceBackendNode,
193 Qt3DCore::QNodeId>
194{
195public:
196 GenericDeviceBackendNodeManager() {}
197};
198
199class Q_AUTOTEST_EXPORT PhysicalDeviceProxyManager : public Qt3DCore::QResourceManager<
200 PhysicalDeviceProxy,
201 Qt3DCore::QNodeId>
202{
203public:
204 PhysicalDeviceProxyManager() {}
205
206 void addPendingProxyToLoad(Qt3DCore::QNodeId id) { m_pendingProxies.push_back(id); }
207 QVector<Qt3DCore::QNodeId> takePendingProxiesToLoad() { return std::move(m_pendingProxies); }
208
209private:
210 QVector<Qt3DCore::QNodeId> m_pendingProxies;
211};
212
213class AxisAccumulatorManager : public Qt3DCore::QResourceManager<
214 AxisAccumulator,
215 Qt3DCore::QNodeId>
216{
217public:
218 AxisAccumulatorManager() {}
219};
220
221} // namespace Input
222} // namespace Qt3DInput
223
224QT_END_NAMESPACE
225
226#endif // QT3DINPUT_INPUT_INPUTMANAGERS_P_H
227