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_QVIEWPORT_H |
5 | #define QT3DRENDER_QVIEWPORT_H |
6 | |
7 | #include <Qt3DRender/qframegraphnode.h> |
8 | #include <QtCore/QRectF> |
9 | #include <QtGui/QColor> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | namespace Qt3DRender { |
14 | |
15 | class QViewportPrivate; |
16 | |
17 | class Q_3DRENDERSHARED_EXPORT QViewport : public QFrameGraphNode |
18 | { |
19 | Q_OBJECT |
20 | Q_PROPERTY(QRectF normalizedRect READ normalizedRect WRITE setNormalizedRect NOTIFY normalizedRectChanged) |
21 | Q_PROPERTY(float gamma READ gamma WRITE setGamma NOTIFY gammaChanged REVISION 9) |
22 | |
23 | public: |
24 | explicit QViewport(Qt3DCore::QNode *parent = nullptr); |
25 | ~QViewport(); |
26 | |
27 | QRectF normalizedRect() const; |
28 | float gamma() const; |
29 | |
30 | public Q_SLOTS: |
31 | void setNormalizedRect(const QRectF& normalizedRect); |
32 | void setGamma(float gamma); |
33 | |
34 | Q_SIGNALS: |
35 | void normalizedRectChanged(const QRectF& normalizedRect); |
36 | void gammaChanged(float gamma); |
37 | |
38 | protected: |
39 | explicit QViewport(QViewportPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
40 | |
41 | private: |
42 | Q_DECLARE_PRIVATE(QViewport) |
43 | }; |
44 | |
45 | } // namespace Qt3DRender |
46 | |
47 | QT_END_NAMESPACE |
48 | |
49 | #endif // QT3DRENDER_QVIEWPORT_H |
50 | |