| 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_QAXISSETTING_H |
| 5 | #define QT3DINPUT_QAXISSETTING_H |
| 6 | |
| 7 | #include <Qt3DInput/qt3dinput_global.h> |
| 8 | #include <Qt3DCore/qnode.h> |
| 9 | #include <QtCore/qlist.h> |
| 10 | |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | namespace Qt3DInput { |
| 14 | |
| 15 | class QAxisSettingPrivate; |
| 16 | |
| 17 | class Q_3DINPUTSHARED_EXPORT QAxisSetting : public Qt3DCore::QNode |
| 18 | { |
| 19 | Q_OBJECT |
| 20 | Q_PROPERTY(float deadZoneRadius READ deadZoneRadius WRITE setDeadZoneRadius NOTIFY deadZoneRadiusChanged) |
| 21 | Q_PROPERTY(QList<int> axes READ axes WRITE setAxes NOTIFY axesChanged) |
| 22 | Q_PROPERTY(bool smooth READ isSmoothEnabled WRITE setSmoothEnabled NOTIFY smoothChanged) |
| 23 | |
| 24 | public: |
| 25 | explicit QAxisSetting(Qt3DCore::QNode *parent = nullptr); |
| 26 | ~QAxisSetting(); |
| 27 | |
| 28 | float deadZoneRadius() const; |
| 29 | QList<int> axes() const; |
| 30 | bool isSmoothEnabled() const; |
| 31 | |
| 32 | public Q_SLOTS: |
| 33 | void setDeadZoneRadius(float deadZoneRadius); |
| 34 | void setAxes(const QList<int> &axes); |
| 35 | void setSmoothEnabled(bool enabled); |
| 36 | |
| 37 | Q_SIGNALS: |
| 38 | void deadZoneRadiusChanged(float deadZoneRadius); |
| 39 | void axesChanged(const QList<int> &axes); |
| 40 | void smoothChanged(bool smooth); |
| 41 | |
| 42 | private: |
| 43 | Q_DECLARE_PRIVATE(QAxisSetting) |
| 44 | }; |
| 45 | |
| 46 | } // namespace Qt3DInput |
| 47 | |
| 48 | QT_END_NAMESPACE |
| 49 | |
| 50 | #endif // QT3DINPUT_QAXISSETTING_H |
| 51 | |