1 | // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). |
2 | // Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). |
3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
4 | |
5 | #ifndef QT3DRENDER_QALPHATEST_H |
6 | #define QT3DRENDER_QALPHATEST_H |
7 | |
8 | #include <Qt3DRender/qrenderstate.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | namespace Qt3DRender { |
13 | |
14 | class QAlphaTestPrivate; |
15 | |
16 | class Q_3DRENDERSHARED_EXPORT QAlphaTest : public QRenderState |
17 | { |
18 | Q_OBJECT |
19 | Q_PROPERTY(AlphaFunction alphaFunction READ alphaFunction WRITE setAlphaFunction NOTIFY alphaFunctionChanged) |
20 | Q_PROPERTY(float referenceValue READ referenceValue WRITE setReferenceValue NOTIFY referenceValueChanged) |
21 | public: |
22 | |
23 | enum AlphaFunction { |
24 | Never = 0x0200, |
25 | Always = 0x0207, |
26 | Less = 0x0201, |
27 | LessOrEqual = 0x0203, |
28 | Equal = 0x0202, |
29 | GreaterOrEqual = 0x0206, |
30 | Greater = 0x0204, |
31 | NotEqual = 0x0205 |
32 | }; |
33 | Q_ENUM(AlphaFunction) // LCOV_EXCL_LINE |
34 | |
35 | explicit QAlphaTest(Qt3DCore::QNode *parent = nullptr); |
36 | ~QAlphaTest(); |
37 | |
38 | AlphaFunction alphaFunction() const; |
39 | float referenceValue() const; |
40 | |
41 | public Q_SLOTS: |
42 | void setAlphaFunction(AlphaFunction alphaFunction); |
43 | void setReferenceValue(float referenceValue); |
44 | |
45 | Q_SIGNALS: |
46 | void alphaFunctionChanged(AlphaFunction alphaFunction); |
47 | void referenceValueChanged(float referenceValue); |
48 | |
49 | private: |
50 | Q_DECLARE_PRIVATE(QAlphaTest) |
51 | }; |
52 | |
53 | } // namespace Qt3DRender |
54 | |
55 | QT_END_NAMESPACE |
56 | |
57 | #endif // QT3DRENDER_QALPHATEST_H |
58 | |