1 | // Copyright (C) 2019 Ford Motor Company |
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 QT3DRENDER_QSUBTREEENABLER_H |
5 | #define QT3DRENDER_QSUBTREEENABLER_H |
6 | |
7 | #include <Qt3DRender/QFrameGraphNode> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | namespace Qt3DRender |
12 | { |
13 | |
14 | class QSubtreeEnablerPrivate; |
15 | |
16 | class Q_3DRENDERSHARED_EXPORT QSubtreeEnabler : public QFrameGraphNode |
17 | { |
18 | Q_OBJECT |
19 | Q_PROPERTY(Enablement enablement READ enablement WRITE setEnablement NOTIFY enablementChanged) |
20 | public: |
21 | explicit QSubtreeEnabler(Qt3DCore::QNode *parent = nullptr); |
22 | ~QSubtreeEnabler(); |
23 | |
24 | enum Enablement { |
25 | Persistent, |
26 | SingleShot |
27 | }; |
28 | Q_ENUM(Enablement) |
29 | |
30 | Enablement enablement() const; |
31 | void setEnablement(Enablement enablement); |
32 | |
33 | Q_INVOKABLE void requestUpdate(); |
34 | |
35 | Q_SIGNALS: |
36 | void enablementChanged(Qt3DRender::QSubtreeEnabler::Enablement enablement); |
37 | |
38 | private: |
39 | Q_DECLARE_PRIVATE(QSubtreeEnabler) |
40 | }; |
41 | |
42 | } //Qt3DRender |
43 | |
44 | QT_END_NAMESPACE |
45 | |
46 | #endif // QT3DRENDER_QSUBTREEENABLER_H |
47 | |