1 | // Copyright (C) 2016 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 QRENDERSURFACESELECTOR_P_H |
5 | #define QRENDERSURFACESELECTOR_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists for the convenience |
12 | // of other Qt classes. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <Qt3DRender/private/qframegraphnode_p.h> |
19 | #include <Qt3DRender/private/platformsurfacefilter_p.h> |
20 | #include <Qt3DRender/private/qt3drender_global_p.h> |
21 | #include <QtGui/qsurface.h> |
22 | #include <QtGui/qwindow.h> |
23 | #include <QtCore/qpointer.h> |
24 | |
25 | QT_BEGIN_NAMESPACE |
26 | |
27 | namespace Qt3DRender { |
28 | |
29 | class QRenderSurfaceSelector; |
30 | |
31 | class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderSurfaceSelectorPrivate : public Qt3DRender::QFrameGraphNodePrivate |
32 | { |
33 | public: |
34 | QRenderSurfaceSelectorPrivate(); |
35 | ~QRenderSurfaceSelectorPrivate(); |
36 | |
37 | // TODO: Qt 5.8, make it public |
38 | static QRenderSurfaceSelector *find(QObject *rootObject); |
39 | |
40 | void setExternalRenderTargetSize(const QSize &size); |
41 | QSize externalRenderTargetSize() const { return m_externalRenderTargetSize; } |
42 | |
43 | QSurface *m_surface; |
44 | QSize m_externalRenderTargetSize; |
45 | QScopedPointer<Qt3DRender::Render::PlatformSurfaceFilter> m_surfaceEventFilter; |
46 | float m_surfacePixelRatio; |
47 | QMetaObject::Connection m_heightConn; |
48 | QMetaObject::Connection m_widthConn; |
49 | QMetaObject::Connection m_screenConn; |
50 | }; |
51 | |
52 | } // namespace Qt3DRender |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif // QRENDERSURFACESELECTOR_P_H |
57 | |