| 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 | #ifndef QT3DINPUT_QAXIS_H |
| 4 | #define QT3DINPUT_QAXIS_H |
| 5 | |
| 6 | #include <Qt3DInput/qt3dinput_global.h> |
| 7 | #include <Qt3DCore/qnode.h> |
| 8 | |
| 9 | QT_BEGIN_NAMESPACE |
| 10 | |
| 11 | namespace Qt3DInput { |
| 12 | |
| 13 | class QAxisPrivate; |
| 14 | class QAbstractAxisInput; |
| 15 | |
| 16 | class Q_3DINPUTSHARED_EXPORT QAxis : public Qt3DCore::QNode |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | Q_PROPERTY(float value READ value NOTIFY valueChanged) |
| 20 | public: |
| 21 | explicit QAxis(Qt3DCore::QNode *parent = nullptr); |
| 22 | ~QAxis(); |
| 23 | |
| 24 | void addInput(QAbstractAxisInput *input); |
| 25 | void removeInput(QAbstractAxisInput *input); |
| 26 | QList<QAbstractAxisInput *> inputs() const; |
| 27 | |
| 28 | float value() const; |
| 29 | |
| 30 | Q_SIGNALS: |
| 31 | void valueChanged(float value); |
| 32 | |
| 33 | private: |
| 34 | Q_DECLARE_PRIVATE(QAxis) |
| 35 | }; |
| 36 | |
| 37 | } // Qt3DInput |
| 38 | |
| 39 | QT_END_NAMESPACE |
| 40 | |
| 41 | #endif // QT3DINPUT_QAXIS_H |
| 42 | |