| 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_P_H |
| 5 | #define QT3DINPUT_QABSTRACTPHYSICALDEVICEBACKENDNODE_P_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 <QtCore/qlist.h> |
| 19 | #include <Qt3DCore/qnodeid.h> |
| 20 | |
| 21 | #include <Qt3DInput/private/movingaverage_p.h> |
| 22 | #include <Qt3DInput/private/qt3dinput_global_p.h> |
| 23 | #include <Qt3DCore/private/qbackendnode_p.h> |
| 24 | |
| 25 | QT_BEGIN_NAMESPACE |
| 26 | |
| 27 | namespace Qt3DInput { |
| 28 | |
| 29 | class QAxisSetting; |
| 30 | class QInputAspect; |
| 31 | |
| 32 | namespace Input { |
| 33 | |
| 34 | struct AxisIdSetting |
| 35 | { |
| 36 | int m_axisIdentifier; |
| 37 | Qt3DCore::QNodeId m_axisSettingsId; |
| 38 | }; |
| 39 | |
| 40 | struct AxisIdFilter |
| 41 | { |
| 42 | int m_axisIdentifier; |
| 43 | MovingAverage m_filter; |
| 44 | }; |
| 45 | |
| 46 | class AxisSetting; |
| 47 | |
| 48 | } |
| 49 | |
| 50 | class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNodePrivate : public Qt3DCore::QBackendNodePrivate |
| 51 | { |
| 52 | public: |
| 53 | explicit QAbstractPhysicalDeviceBackendNodePrivate(Qt3DCore::QBackendNode::Mode mode = Qt3DCore::QBackendNode::ReadOnly); |
| 54 | |
| 55 | Q_DECLARE_PUBLIC(QAbstractPhysicalDeviceBackendNode) |
| 56 | |
| 57 | void addAxisSetting(int axisIdentifier, Qt3DCore::QNodeId axisSettingId); |
| 58 | void removeAxisSetting(Qt3DCore::QNodeId axisSettingsId); |
| 59 | |
| 60 | Input::MovingAverage &getOrCreateFilter(int axisIdentifier); |
| 61 | |
| 62 | Input::AxisSetting *getAxisSetting(Qt3DCore::QNodeId axisSettingId) const; |
| 63 | |
| 64 | Qt3DCore::QNodeIdVector m_currentAxisSettingIds; |
| 65 | QList<Input::AxisIdSetting> m_axisSettings; |
| 66 | QList<Input::AxisIdFilter> m_axisFilters; |
| 67 | QInputAspect *m_inputAspect; |
| 68 | }; |
| 69 | |
| 70 | } |
| 71 | |
| 72 | QT_END_NAMESPACE |
| 73 | |
| 74 | #endif // QT3DINPUT_QABSTRACTPHYSICALDEVICEBACKENDNODE_P_P_H |
| 75 | |
| 76 |
