1 | // Copyright (C) 2014 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 QT3DRENDER_QLAYERFILTER_H |
5 | #define QT3DRENDER_QLAYERFILTER_H |
6 | |
7 | #include <Qt3DRender/qframegraphnode.h> |
8 | #include <QtCore/QStringList> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | namespace Qt3DRender { |
13 | |
14 | class QLayer; |
15 | class QLayerFilterPrivate; |
16 | |
17 | class Q_3DRENDERSHARED_EXPORT QLayerFilter : public QFrameGraphNode |
18 | { |
19 | Q_OBJECT |
20 | Q_PROPERTY(FilterMode filterMode READ filterMode WRITE setFilterMode NOTIFY filterModeChanged) |
21 | public: |
22 | enum FilterMode |
23 | { |
24 | AcceptAnyMatchingLayers = 0, |
25 | AcceptAllMatchingLayers, |
26 | DiscardAnyMatchingLayers, |
27 | DiscardAllMatchingLayers, |
28 | }; |
29 | Q_ENUM(FilterMode) // LOVC_EXLC_LINE |
30 | |
31 | explicit QLayerFilter(Qt3DCore::QNode *parent = nullptr); |
32 | ~QLayerFilter(); |
33 | |
34 | void addLayer(QLayer *layer); |
35 | void removeLayer(QLayer *layer); |
36 | QList<QLayer *> layers() const; |
37 | |
38 | FilterMode filterMode() const; |
39 | void setFilterMode(FilterMode filterMode); |
40 | |
41 | Q_SIGNALS: |
42 | void filterModeChanged(FilterMode filterMode); |
43 | |
44 | |
45 | protected: |
46 | explicit QLayerFilter(QLayerFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
47 | |
48 | private: |
49 | Q_DECLARE_PRIVATE(QLayerFilter) |
50 | }; |
51 | |
52 | } // namespace Qt3DRender |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif // QT3DRENDER_QLAYERFILTER_H |
57 | |