| 1 | // Copyright (C) 2016 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_QINPUTCHORD_H |
| 5 | #define QT3DINPUT_QINPUTCHORD_H |
| 6 | |
| 7 | #include <Qt3DInput/qabstractactioninput.h> |
| 8 | #include <Qt3DInput/qt3dinput_global.h> |
| 9 | #include <Qt3DCore/qnode.h> |
| 10 | |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | namespace Qt3DInput { |
| 14 | |
| 15 | class QAbstractPhysicalDevice; |
| 16 | class QInputChordPrivate; |
| 17 | |
| 18 | class Q_3DINPUTSHARED_EXPORT QInputChord : public Qt3DInput::QAbstractActionInput |
| 19 | { |
| 20 | Q_OBJECT |
| 21 | Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged) |
| 22 | |
| 23 | public: |
| 24 | explicit QInputChord(Qt3DCore::QNode *parent = nullptr); |
| 25 | ~QInputChord(); |
| 26 | |
| 27 | int timeout() const; |
| 28 | |
| 29 | void addChord(QAbstractActionInput *input); |
| 30 | void removeChord(QAbstractActionInput *input); |
| 31 | QList<QAbstractActionInput *> chords() const; |
| 32 | |
| 33 | public Q_SLOTS: |
| 34 | void setTimeout(int timeout); |
| 35 | |
| 36 | Q_SIGNALS: |
| 37 | void timeoutChanged(int timeout); |
| 38 | |
| 39 | private: |
| 40 | Q_DECLARE_PRIVATE(QInputChord) |
| 41 | }; |
| 42 | |
| 43 | } // Qt3DInput |
| 44 | |
| 45 | QT_END_NAMESPACE |
| 46 | |
| 47 | #endif // QT3DINPUT_QINPUTCHORD_H |
| 48 | |