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
qiosscreen.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 QIOSSCREEN_H
5#define QIOSSCREEN_H
6
7#include <UIKit/UIKit.h>
8
9#include <qpa/qplatformscreen.h>
10
11@class QIOSOrientationListener;
12
14
15class QIOSScreen : public QObject, public QPlatformScreen
16{
18
19public:
20#if !defined(Q_OS_VISIONOS)
21 QIOSScreen(UIScreen *screen);
22#else
23 QIOSScreen();
24#endif
26
27 QString name() const override;
28
29 QRect geometry() const override;
30 QRect availableGeometry() const override;
31 int depth() const override;
32 QImage::Format format() const override;
33 QSizeF physicalSize() const override;
34 QDpi logicalBaseDpi() const override;
35 qreal devicePixelRatio() const override;
36 qreal refreshRate() const override;
37
39 Qt::ScreenOrientation orientation() const override;
40
41 QPixmap grabWindow(WId window, int x, int y, int width, int height) const override;
42
43#if !defined(Q_OS_VISIONOS)
44 UIScreen *uiScreen() const;
45#endif
46
47 void setUpdatesPaused(bool);
48
49 void updateProperties();
50
51private:
52 void deliverUpdateRequests() const;
53
54#if !defined(Q_OS_VISIONOS)
55 UIScreen *m_uiScreen = nullptr;
56#endif
57 QRect m_geometry;
58 QRect m_availableGeometry;
59 int m_depth;
60#if !defined(Q_OS_VISIONOS)
61 uint m_physicalDpi;
62#endif
63 QSizeF m_physicalSize;
64 CADisplayLink *m_displayLink = nullptr;
65};
66
68
69#endif
qreal devicePixelRatio() const override
Reimplement this function in subclass to return the device pixel ratio for the screen.
void setUpdatesPaused(bool)
int depth() const override
Reimplement in subclass to return current depth of the screen.
QRect availableGeometry() const override
Reimplement in subclass to return the pixel geometry of the available space This normally is the desk...
Qt::ScreenOrientation nativeOrientation() const override
Reimplement this function in subclass to return the native orientation of the screen,...
QIOSScreen(UIScreen *screen)
void updateProperties()
qreal refreshRate() const override
Reimplement this function in subclass to return the vertical refresh rate of the screen,...
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.
QSizeF physicalSize() const override
Reimplement this function in subclass to return the physical size of the screen, in millimeters.
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
Qt::ScreenOrientation orientation() const override
Reimplement this function in subclass to return the current orientation of the screen,...
QDpi logicalBaseDpi() const override
Reimplement to return the base logical DPI for the platform.
QPixmap grabWindow(WId window, int x, int y, int width, int height) const override
This function is called when Qt needs to be able to grab the content of a window.
UIScreen * uiScreen() const
QString name() const override
Format
The following image formats are available in Qt.
Definition qimage.h:41
\inmodule QtCore
Definition qobject.h:103
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
The QPlatformScreen class provides an abstraction for visual displays.
QScreen * screen() const
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:208
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
ScreenOrientation
Definition qnamespace.h:271
QPair< qreal, qreal > QDpi
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLint GLsizei width
GLint y
#define Q_OBJECT
unsigned int uint
Definition qtypes.h:34
double qreal
Definition qtypes.h:187
aWidget window() -> setWindowTitle("New Window Title")
[2]