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
qoffscreenwindow.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QOFFSCREENWINDOW_H
5#define QOFFSCREENWINDOW_H
6
7#include <qpa/qplatformbackingstore.h>
8#include <qpa/qplatformwindow.h>
9
10#include <qhash.h>
11
13
15{
16public:
17 QOffscreenWindow(QWindow *window, bool frameMarginsEnabled);
19
20 void setGeometry(const QRect &rect) override;
21 void setWindowState(Qt::WindowStates states) override;
22
23 QMargins frameMargins() const override;
24
25 void setVisible(bool visible) override;
26 void requestActivateWindow() override;
27
28 WId winId() const override;
29
30 static QOffscreenWindow *windowForWinId(WId id);
31
32private:
33 void setFrameMarginsEnabled(bool enabled);
34 void setGeometryImpl(const QRect &rect);
35
36 QRect m_normalGeometry;
37 QMargins m_margins;
38 bool m_positionIncludesFrame;
39 bool m_visible;
40 bool m_pendingGeometryChangeOnShow;
41 bool m_frameMarginsRequested;
42 WId m_winId;
43
44 Q_CONSTINIT static QHash<WId, QOffscreenWindow *> m_windowForWinIdHash;
45};
46
48
49#endif
\inmodule QtCore
Definition qmargins.h:24
QOffscreenWindow(QWindow *window, bool frameMarginsEnabled)
void setWindowState(Qt::WindowStates states) override
Requests setting the window state of this surface to type.
static QOffscreenWindow * windowForWinId(WId id)
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
void requestActivateWindow() override
Reimplement to let Qt be able to request activation/focus for a window.
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QMargins frameMargins() const override
void setVisible(bool visible) override
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
The QPlatformWindow class provides an abstraction for top-level windows.
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
Combined button and popup list for selecting options.
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint * states