| 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 | |
| 39 | QT_BEGIN_NAMESPACE |
| 40 | |
| 41 | namespace Qt3DInput { |
| 42 | namespace Input { |
| 43 | |
| 44 | class KeyboardInputManager : public Qt3DCore::QResourceManager< |
| 45 | KeyboardHandler, |
| 46 | Qt3DCore::QNodeId> |
| 47 | { |
| 48 | public: |
| 49 | KeyboardInputManager() {} |
| 50 | }; |
| 51 | |
| 52 | class KeyboardDeviceManager : public Qt3DCore::QResourceManager< |
| 53 | KeyboardDevice, |
| 54 | Qt3DCore::QNodeId> |
| 55 | { |
| 56 | public: |
| 57 | KeyboardDeviceManager() {} |
| 58 | }; |
| 59 | |
| 60 | class MouseDeviceManager : public Qt3DCore::QResourceManager< |
| 61 | MouseDevice, |
| 62 | Qt3DCore::QNodeId> |
| 63 | { |
| 64 | public: |
| 65 | MouseDeviceManager() {} |
| 66 | }; |
| 67 | |
| 68 | class MouseInputManager : public Qt3DCore::QResourceManager< |
| 69 | MouseHandler, |
| 70 | Qt3DCore::QNodeId> |
| 71 | { |
| 72 | public: |
| 73 | MouseInputManager() {} |
| 74 | }; |
| 75 | |
| 76 | class AxisManager : public Qt3DCore::QResourceManager< |
| 77 | Axis, |
| 78 | Qt3DCore::QNodeId> |
| 79 | { |
| 80 | public: |
| 81 | AxisManager() {} |
| 82 | }; |
| 83 | |
| 84 | class AxisSettingManager : public Qt3DCore::QResourceManager< |
| 85 | AxisSetting, |
| 86 | Qt3DCore::QNodeId> |
| 87 | { |
| 88 | public: |
| 89 | AxisSettingManager() {} |
| 90 | }; |
| 91 | |
| 92 | class ActionManager : public Qt3DCore::QResourceManager< |
| 93 | Action, |
| 94 | Qt3DCore::QNodeId> |
| 95 | { |
| 96 | public: |
| 97 | ActionManager() {} |
| 98 | }; |
| 99 | |
| 100 | class ActionInputManager : public Qt3DCore::QResourceManager< |
| 101 | ActionInput, |
| 102 | Qt3DCore::QNodeId> |
| 103 | { |
| 104 | public: |
| 105 | ActionInputManager() {} |
| 106 | }; |
| 107 | |
| 108 | class AnalogAxisInputManager : public Qt3DCore::QResourceManager< |
| 109 | AnalogAxisInput, |
| 110 | Qt3DCore::QNodeId> |
| 111 | { |
| 112 | public: |
| 113 | AnalogAxisInputManager() {} |
| 114 | }; |
| 115 | |
| 116 | class ButtonAxisInputManager : public Qt3DCore::QResourceManager< |
| 117 | ButtonAxisInput, |
| 118 | Qt3DCore::QNodeId> |
| 119 | { |
| 120 | public: |
| 121 | ButtonAxisInputManager() {} |
| 122 | }; |
| 123 | |
| 124 | class InputChordManager : public Qt3DCore::QResourceManager< |
| 125 | InputChord, |
| 126 | Qt3DCore::QNodeId> |
| 127 | { |
| 128 | public: |
| 129 | InputChordManager() {} |
| 130 | }; |
| 131 | |
| 132 | class InputSequenceManager : public Qt3DCore::QResourceManager< |
| 133 | InputSequence, |
| 134 | Qt3DCore::QNodeId> |
| 135 | { |
| 136 | public: |
| 137 | InputSequenceManager() {} |
| 138 | }; |
| 139 | |
| 140 | class LogicalDeviceManager : public Qt3DCore::QResourceManager< |
| 141 | LogicalDevice, |
| 142 | Qt3DCore::QNodeId> |
| 143 | { |
| 144 | public: |
| 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 | |
| 151 | private: |
| 152 | QList<HLogicalDevice> m_activeDevices; |
| 153 | }; |
| 154 | |
| 155 | class GenericDeviceBackendNodeManager : public Qt3DCore::QResourceManager< |
| 156 | GenericDeviceBackendNode, |
| 157 | Qt3DCore::QNodeId> |
| 158 | { |
| 159 | public: |
| 160 | GenericDeviceBackendNodeManager() {} |
| 161 | }; |
| 162 | |
| 163 | class Q_AUTOTEST_EXPORT PhysicalDeviceProxyManager : public Qt3DCore::QResourceManager< |
| 164 | PhysicalDeviceProxy, |
| 165 | Qt3DCore::QNodeId> |
| 166 | { |
| 167 | public: |
| 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 | |
| 173 | private: |
| 174 | QList<Qt3DCore::QNodeId> m_pendingProxies; |
| 175 | }; |
| 176 | |
| 177 | class AxisAccumulatorManager : public Qt3DCore::QResourceManager< |
| 178 | AxisAccumulator, |
| 179 | Qt3DCore::QNodeId> |
| 180 | { |
| 181 | public: |
| 182 | AxisAccumulatorManager() {} |
| 183 | }; |
| 184 | |
| 185 | } // namespace Input |
| 186 | } // namespace Qt3DInput |
| 187 | |
| 188 | QT_END_NAMESPACE |
| 189 | |
| 190 | #endif // QT3DINPUT_INPUT_INPUTMANAGERS_P_H |
| 191 | |