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
11QT_BEGIN_NAMESPACE
12
13namespace Qt3DRender {
14
15class QViewportPrivate;
16
17class 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
23public:
24 explicit QViewport(Qt3DCore::QNode *parent = nullptr);
25 ~QViewport();
26
27 QRectF normalizedRect() const;
28 float gamma() const;
29
30public Q_SLOTS:
31 void setNormalizedRect(const QRectF& normalizedRect);
32 void setGamma(float gamma);
33
34Q_SIGNALS:
35 void normalizedRectChanged(const QRectF& normalizedRect);
36 void gammaChanged(float gamma);
37
38protected:
39 explicit QViewport(QViewportPrivate &dd, Qt3DCore::QNode *parent = nullptr);
40
41private:
42 Q_DECLARE_PRIVATE(QViewport)
43};
44
45} // namespace Qt3DRender
46
47QT_END_NAMESPACE
48
49#endif // QT3DRENDER_QVIEWPORT_H
50

source code of qt3d/src/render/framegraph/qviewport.h