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 QT3DRENDER_QCOLORMASK_H
5#define QT3DRENDER_QCOLORMASK_H
6
7#include <Qt3DRender/qrenderstate.h>
8
9QT_BEGIN_NAMESPACE
10
11namespace Qt3DRender {
12
13class QColorMaskPrivate;
14
15class Q_3DRENDERSHARED_EXPORT QColorMask : public QRenderState
16{
17 Q_OBJECT
18 Q_PROPERTY(bool redMasked READ isRedMasked WRITE setRedMasked NOTIFY redMaskedChanged)
19 Q_PROPERTY(bool greenMasked READ isGreenMasked WRITE setGreenMasked NOTIFY greenMaskedChanged)
20 Q_PROPERTY(bool blueMasked READ isBlueMasked WRITE setBlueMasked NOTIFY blueMaskedChanged)
21 Q_PROPERTY(bool alphaMasked READ isAlphaMasked WRITE setAlphaMasked NOTIFY alphaMaskedChanged)
22
23public:
24 explicit QColorMask(Qt3DCore::QNode *parent = nullptr);
25 ~QColorMask();
26
27 bool isRedMasked() const;
28 bool isGreenMasked() const;
29 bool isBlueMasked() const;
30 bool isAlphaMasked() const;
31
32public Q_SLOTS:
33 void setRedMasked(bool redMasked);
34 void setGreenMasked(bool greenMasked);
35 void setBlueMasked(bool blueMasked);
36 void setAlphaMasked(bool alphaMasked);
37
38Q_SIGNALS:
39 void redMaskedChanged(bool redMasked);
40 void greenMaskedChanged(bool greenMasked);
41 void blueMaskedChanged(bool blueMasked);
42 void alphaMaskedChanged(bool alphaMasked);
43
44private:
45 Q_DECLARE_PRIVATE(QColorMask)
46};
47
48} // namespace Qt3DRender
49
50QT_END_NAMESPACE
51
52#endif // QT3DRENDER_QCOLORMASK_H
53

source code of qt3d/src/render/renderstates/qcolormask.h