1 | // Copyright (C) 2015 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_UPDATEAXISACTIONJOB_H |
5 | #define QT3DINPUT_INPUT_UPDATEAXISACTIONJOB_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 <Qt3DCore/qaspectjob.h> |
19 | #include <Qt3DCore/qnodeid.h> |
20 | |
21 | #include <Qt3DInput/private/handle_types_p.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | namespace Qt3DInput { |
26 | |
27 | class QAbstractPhysicalDeviceBackendNode; |
28 | |
29 | namespace Input { |
30 | |
31 | class AbstractAxisInput; |
32 | class ButtonAxisInput; |
33 | class InputHandler; |
34 | class UpdateAxisActionJobPrivate; |
35 | |
36 | class UpdateAxisActionJob : public Qt3DCore::QAspectJob |
37 | { |
38 | public: |
39 | explicit UpdateAxisActionJob(qint64 currentTime, InputHandler *handler, HLogicalDevice handle); |
40 | void run() final; |
41 | |
42 | private: |
43 | Q_DECLARE_PRIVATE(UpdateAxisActionJob) |
44 | |
45 | void updateAction(LogicalDevice *device); |
46 | bool processActionInput(const Qt3DCore::QNodeId actionInputId); |
47 | void updateAxis(LogicalDevice *device); |
48 | float processAxisInput(const Qt3DCore::QNodeId axisInputId); |
49 | |
50 | const qint64 m_currentTime; |
51 | InputHandler *m_handler; |
52 | HLogicalDevice m_handle; |
53 | }; |
54 | |
55 | typedef QSharedPointer<UpdateAxisActionJob> UpdateAxisActionJobPtr; |
56 | |
57 | } // Input |
58 | |
59 | } // Qt3DInput |
60 | |
61 | QT_END_NAMESPACE |
62 | |
63 | #endif // QT3DINPUT_INPUT_UPDATEAXISACTIONJOB_H |
64 |