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_QABSTRACTPHYSICALDEVICEBACKENDNODE_P_H
5#define QT3DINPUT_QABSTRACTPHYSICALDEVICEBACKENDNODE_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 <Qt3DInput/private/backendnode_p.h>
19
20#include <Qt3DInput/private/qt3dinput_global_p.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace Qt3DCore {
25class QBackendNodePrivate;
26}
27
28namespace Qt3DInput {
29
30class QInputAspect;
31class QAbstractPhysicalDeviceBackendNodePrivate;
32
33class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNode : public Input::BackendNode
34{
35public:
36 explicit QAbstractPhysicalDeviceBackendNode(QBackendNode::Mode mode);
37 virtual void cleanup();
38 void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
39
40 void setInputAspect(QInputAspect *aspect);
41 QInputAspect *inputAspect() const;
42
43 float processedAxisValue(int axisIdentifier);
44 virtual float axisValue(int axisIdentifier) const = 0;
45 virtual bool isButtonPressed(int buttonIdentifier) const = 0;
46
47protected:
48 QAbstractPhysicalDeviceBackendNode(QAbstractPhysicalDeviceBackendNodePrivate &dd);
49
50 Q_DECLARE_PRIVATE(QAbstractPhysicalDeviceBackendNode)
51};
52
53} // Qt3DInput
54
55QT_END_NAMESPACE
56
57#endif // QT3DINPUT_QABSTRACTPHYSICALDEVICEBACKENDNODE_H
58

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