Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qoffscreensurface.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
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 QOFFSCREENSURFACE_H
5#define QOFFSCREENSURFACE_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/QObject>
9#include <QtCore/qnativeinterface.h>
10#include <QtGui/qsurface.h>
11Q_MOC_INCLUDE(<QtGui/qscreen.h>)
12
14
16
17class QScreen;
19
20class Q_GUI_EXPORT QOffscreenSurface : public QObject, public QSurface
21{
23 Q_DECLARE_PRIVATE(QOffscreenSurface)
24
25public:
26 explicit QOffscreenSurface(QScreen *screen = nullptr, QObject *parent = nullptr);
28
29 SurfaceType surfaceType() const override;
30
31 void create();
32 void destroy();
33
34 bool isValid() const;
35
36 void setFormat(const QSurfaceFormat &format);
37 QSurfaceFormat format() const override;
38 QSurfaceFormat requestedFormat() const;
39
40 QSize size() const override;
41
42 QScreen *screen() const;
43 void setScreen(QScreen *screen);
44
46
48
51
52private Q_SLOTS:
53 void screenDestroyed(QObject *screen);
54
55private:
56
57 QPlatformSurface *surfaceHandle() const override;
58
59 Q_DISABLE_COPY(QOffscreenSurface)
60};
61
63
64#include <QtGui/qoffscreensurface_platform.h>
65
66#endif // QOFFSCREENSURFACE_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtGui
void screenChanged(QScreen *screen)
This signal is emitted when an offscreen surface's screen changes, either by being set explicitly wit...
The QPlatformSurface class provides an abstraction for a surface.
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\inmodule QtCore
Definition qsize.h:25
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtGui
Definition qsurface.h:21
SurfaceType
The SurfaceType enum describes what type of surface this is.
Definition qsurface.h:30
widget setFormat(format)
Combined button and popup list for selecting options.
#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(T)
GLuint64 GLenum void * handle
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
QScreen * screen
[1]
Definition main.cpp:29
#define Q_OBJECT
#define Q_SLOTS
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS
view create()