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