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_LOGICALDEVICE_H
5#define QT3DINPUT_INPUT_LOGICALDEVICE_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#include <Qt3DCore/qnodeid.h>
20
21QT_BEGIN_NAMESPACE
22
23namespace Qt3DInput {
24
25namespace Input {
26
27class LogicalDeviceManager;
28
29class Q_AUTOTEST_EXPORT LogicalDevice : public BackendNode
30{
31public:
32 LogicalDevice();
33 void cleanup();
34
35 inline QList<Qt3DCore::QNodeId> axes() const { return m_axes; }
36 inline QList<Qt3DCore::QNodeId> actions() const { return m_actions; }
37
38 void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
39
40private:
41 QList<Qt3DCore::QNodeId> m_axes;
42 QList<Qt3DCore::QNodeId> m_actions;
43};
44
45
46class LogicalDeviceNodeFunctor : public Qt3DCore::QBackendNodeMapper
47{
48public:
49 explicit LogicalDeviceNodeFunctor(LogicalDeviceManager *manager);
50
51 Qt3DCore::QBackendNode *create(Qt3DCore::QNodeId id) const final;
52 Qt3DCore::QBackendNode *get(Qt3DCore::QNodeId id) const final;
53 void destroy(Qt3DCore::QNodeId id) const final;
54
55private:
56 LogicalDeviceManager *m_manager;
57};
58
59
60} // namespace Input
61
62} // namespace Qt3DInput
63
64QT_END_NAMESPACE
65
66#endif // QT3DINPUT_INPUT_LOGICALDEVICE_H
67

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