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_QINPUTSEQUENCE_H |
5 | #define QT3DINPUT_QINPUTSEQUENCE_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 QInputSequencePrivate; |
17 | |
18 | class Q_3DINPUTSHARED_EXPORT QInputSequence : public Qt3DInput::QAbstractActionInput |
19 | { |
20 | Q_OBJECT |
21 | Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged) |
22 | Q_PROPERTY(int buttonInterval READ buttonInterval WRITE setButtonInterval NOTIFY buttonIntervalChanged) |
23 | |
24 | public: |
25 | explicit QInputSequence(Qt3DCore::QNode *parent = nullptr); |
26 | ~QInputSequence(); |
27 | |
28 | int timeout() const; |
29 | int buttonInterval() const; |
30 | |
31 | void addSequence(QAbstractActionInput *input); |
32 | void removeSequence(QAbstractActionInput *input); |
33 | QList<QAbstractActionInput *> sequences() const; |
34 | |
35 | public Q_SLOTS: |
36 | void setTimeout(int timeout); |
37 | void setButtonInterval(int buttonInterval); |
38 | |
39 | Q_SIGNALS: |
40 | void timeoutChanged(int timeout); |
41 | void buttonIntervalChanged(int buttonInterval); |
42 | |
43 | private: |
44 | Q_DECLARE_PRIVATE(QInputSequence) |
45 | }; |
46 | |
47 | } // Qt3DInput |
48 | |
49 | QT_END_NAMESPACE |
50 | |
51 | #endif // QT3DINPUT_QINPUTSEQUENCE_H |
52 | |