| 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 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | namespace Qt3DCore { |
| 25 | class QBackendNodePrivate; |
| 26 | } |
| 27 | |
| 28 | namespace Qt3DInput { |
| 29 | |
| 30 | class QInputAspect; |
| 31 | class QAbstractPhysicalDeviceBackendNodePrivate; |
| 32 | |
| 33 | class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNode : public Input::BackendNode |
| 34 | { |
| 35 | public: |
| 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 | |
| 47 | protected: |
| 48 | QAbstractPhysicalDeviceBackendNode(QAbstractPhysicalDeviceBackendNodePrivate &dd); |
| 49 | |
| 50 | Q_DECLARE_PRIVATE(QAbstractPhysicalDeviceBackendNode) |
| 51 | }; |
| 52 | |
| 53 | } // Qt3DInput |
| 54 | |
| 55 | QT_END_NAMESPACE |
| 56 | |
| 57 | #endif // QT3DINPUT_QABSTRACTPHYSICALDEVICEBACKENDNODE_H |
| 58 | |