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
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DInput {
13
14class QActionPrivate;
15class QAbstractActionInput;
16
17class Q_3DINPUTSHARED_EXPORT QAction : public Qt3DCore::QNode
18{
19 Q_OBJECT
20 Q_PROPERTY(bool active READ isActive NOTIFY activeChanged)
21public:
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
31Q_SIGNALS:
32 void activeChanged(bool isActive);
33
34private:
35 Q_DECLARE_PRIVATE(QAction)
36};
37
38} // Qt3DInput
39
40QT_END_NAMESPACE
41
42#endif // QT3DINPUT_QACTION_H
43

source code of qt3d/src/input/frontend/qaction.h