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
23QT_BEGIN_NAMESPACE
24
25namespace Qt3DInput {
26
27class QAbstractPhysicalDeviceBackendNode;
28
29namespace Input {
30
31class AbstractAxisInput;
32class ButtonAxisInput;
33class InputHandler;
34class UpdateAxisActionJobPrivate;
35
36class UpdateAxisActionJob : public Qt3DCore::QAspectJob
37{
38public:
39 explicit UpdateAxisActionJob(qint64 currentTime, InputHandler *handler, HLogicalDevice handle);
40 void run() final;
41
42private:
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
55typedef QSharedPointer<UpdateAxisActionJob> UpdateAxisActionJobPtr;
56
57} // Input
58
59} // Qt3DInput
60
61QT_END_NAMESPACE
62
63#endif // QT3DINPUT_INPUT_UPDATEAXISACTIONJOB_H
64

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