1 | // Copyright (C) 2018 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_QRASTERMODE_H |
5 | #define QT3DRENDER_QRASTERMODE_H |
6 | |
7 | #include <Qt3DRender/qrenderstate.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | namespace Qt3DRender { |
12 | |
13 | class QRasterModePrivate; |
14 | |
15 | class Q_3DRENDERSHARED_EXPORT QRasterMode : public QRenderState |
16 | { |
17 | Q_OBJECT |
18 | Q_PROPERTY(RasterMode rasterMode READ rasterMode WRITE setRasterMode NOTIFY rasterModeChanged) |
19 | Q_PROPERTY(FaceMode faceMode READ faceMode WRITE setFaceMode NOTIFY faceModeChanged) |
20 | public: |
21 | |
22 | enum RasterMode { |
23 | Points = 0x1B00, |
24 | Lines = 0x1B01, |
25 | Fill = 0x1B02, |
26 | }; |
27 | Q_ENUM(RasterMode) // LCOV_EXCL_LINE |
28 | |
29 | enum FaceMode |
30 | { |
31 | Front = 0x0404, |
32 | Back = 0x0405, |
33 | FrontAndBack = 0x0408 |
34 | }; |
35 | Q_ENUM(FaceMode) // LCOV_EXCL_LINE |
36 | |
37 | explicit QRasterMode(Qt3DCore::QNode *parent = nullptr); |
38 | ~QRasterMode(); |
39 | |
40 | RasterMode rasterMode() const; |
41 | FaceMode faceMode() const; |
42 | |
43 | public Q_SLOTS: |
44 | void setRasterMode(RasterMode rasterMode); |
45 | void setFaceMode(FaceMode faceMode); |
46 | |
47 | Q_SIGNALS: |
48 | void rasterModeChanged(RasterMode rasterMode); |
49 | void faceModeChanged(FaceMode faceMode); |
50 | |
51 | private: |
52 | Q_DECLARE_PRIVATE(QRasterMode) |
53 | }; |
54 | |
55 | } // namespace Qt3DRender |
56 | |
57 | QT_END_NAMESPACE |
58 | |
59 | #endif // QT3DRENDER_QRASTERMODE_H |
60 | |