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
QPlatformScreen Class Referenceabstract

The QPlatformScreen class provides an abstraction for visual displays. More...

#include <qplatformscreen.h>

+ Inheritance diagram for QPlatformScreen:
+ Collaboration diagram for QPlatformScreen:

Classes

struct  Mode
 

Public Types

enum  SubpixelAntialiasingType {
  Subpixel_None , Subpixel_RGB , Subpixel_BGR , Subpixel_VRGB ,
  Subpixel_VBGR
}
 
enum  PowerState { PowerStateOn , PowerStateStandby , PowerStateSuspend , PowerStateOff }
 

Public Member Functions

 QPlatformScreen ()
 
virtual ~QPlatformScreen ()
 
virtual bool isPlaceholder () const
 
virtual QPixmap grabWindow (WId window, int x, int y, int width, int height) const
 This function is called when Qt needs to be able to grab the content of a window.
 
virtual QRect geometry () const =0
 Reimplement in subclass to return the pixel geometry of the screen.
 
virtual QRect availableGeometry () const
 Reimplement in subclass to return the pixel geometry of the available space This normally is the desktop screen minus the task manager, global menubar etc.
 
virtual int depth () const =0
 Reimplement in subclass to return current depth of the screen.
 
virtual QImage::Format format () const =0
 Reimplement in subclass to return the image format which corresponds to the screen format.
 
virtual QColorSpace colorSpace () const
 
virtual QSizeF physicalSize () const
 Reimplement this function in subclass to return the physical size of the screen, in millimeters.
 
virtual QDpi logicalDpi () const
 Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.
 
virtual QDpi logicalBaseDpi () const
 Reimplement to return the base logical DPI for the platform.
 
virtual qreal devicePixelRatio () const
 Reimplement this function in subclass to return the device pixel ratio for the screen.
 
virtual qreal refreshRate () const
 Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.
 
virtual Qt::ScreenOrientation nativeOrientation () const
 Reimplement this function in subclass to return the native orientation of the screen, e.g.
 
virtual Qt::ScreenOrientation orientation () const
 Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.
 
virtual QWindowtopLevelAt (const QPoint &point) const
 Return the given top level window for a given position.
 
QWindowList windows () const
 Return all windows residing on this screen.
 
virtual QList< QPlatformScreen * > virtualSiblings () const
 Returns a list of all the platform screens that are part of the same virtual desktop.
 
const QPlatformScreenscreenForPosition (const QPoint &point) const
 Find the sibling screen corresponding to globalPos.
 
QScreenscreen () const
 
virtual QString name () const
 
virtual QString manufacturer () const
 Reimplement this function in subclass to return the manufacturer of this screen.
 
virtual QString model () const
 Reimplement this function in subclass to return the model of this screen.
 
virtual QString serialNumber () const
 Reimplement this function in subclass to return the serial number of this screen.
 
virtual QPlatformCursorcursor () const
 Reimplement this function in subclass to return the cursor of the screen.
 
virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint () const
 Returns a hint about this screen's subpixel layout structure.
 
virtual PowerState powerState () const
 Returns the current power state.
 
virtual void setPowerState (PowerState state)
 Sets the power state for this screen.
 
virtual QList< Modemodes () const
 Reimplement this function in subclass to return the list of modes for this screen.
 
virtual int currentMode () const
 Reimplement this function in subclass to return the index of the current mode from the modes list.
 
virtual int preferredMode () const
 Reimplement this function in subclass to return the preferred mode index from the modes list.
 

Static Public Member Functions

static QPlatformScreenplatformScreenForWindow (const QWindow *window)
 
static int angleBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b)
 
static QTransform transformBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
 
static QRect mapBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
 
static QDpi overrideDpi (const QDpi &in)
 

Protected Member Functions

void resizeMaximizedWindows ()
 Convenience method to resize all the maximized and fullscreen windows of this platform screen.
 

Protected Attributes

QScopedPointer< QPlatformScreenPrivated_ptr
 

Friends

class QScreen
 

Detailed Description

The QPlatformScreen class provides an abstraction for visual displays.

Since
4.8

\preliminary

Many window systems has support for retrieving information on the attached displays. To be able to query the display QPA uses QPlatformScreen. Qt its self is most dependent on the physicalSize() function, since this is the function it uses to calculate the dpi to use when converting point sizes to pixels sizes. However, this is unfortunate on some systems, as the native system fakes its dpi size.

Definition at line 43 of file qplatformscreen.h.

Member Enumeration Documentation

◆ PowerState

Enumerator
PowerStateOn 
PowerStateStandby 
PowerStateSuspend 
PowerStateOff 

Definition at line 59 of file qplatformscreen.h.

◆ SubpixelAntialiasingType

Enumerator
Subpixel_None 
Subpixel_RGB 
Subpixel_BGR 
Subpixel_VRGB 
Subpixel_VBGR 

Definition at line 51 of file qplatformscreen.h.

Constructor & Destructor Documentation

◆ QPlatformScreen()

QT_BEGIN_NAMESPACE QPlatformScreen::QPlatformScreen ( )

Definition at line 18 of file qplatformscreen.cpp.

References d.

◆ ~QPlatformScreen()

QPlatformScreen::~QPlatformScreen ( )
virtual

Definition at line 25 of file qplatformscreen.cpp.

References d, and Q_ASSERT_X.

Member Function Documentation

◆ angleBetween()

int QPlatformScreen::angleBetween ( Qt::ScreenOrientation a,
Qt::ScreenOrientation b )
static

Definition at line 365 of file qplatformscreen.cpp.

References log2(), Qt::PrimaryOrientation, and qWarning.

Referenced by QScreen::angleBetween(), and transformBetween().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ availableGeometry()

QRect QPlatformScreen::availableGeometry ( ) const
inlinevirtual

Reimplement in subclass to return the pixel geometry of the available space This normally is the desktop screen minus the task manager, global menubar etc.

Reimplemented in QPlatformPlaceholderScreen, QAndroidPlatformScreen, QCocoaScreen, QIOSScreen, QQnxScreen, QWindowsScreen, and QXcbScreen.

Definition at line 79 of file qplatformscreen.h.

Referenced by calcPosition(), QAndroidPlatformOpenGLWindow::checkNativeSurface(), QEglFSWindow::geometry(), QPlatformWindow::initialGeometry(), resizeMaximizedWindows(), QAndroidPlatformWindow::sendExpose(), QEglFSWindow::setGeometry(), QWasmWindow::setGeometry(), QFbScreen::setGeometry(), QWasmScreen::setGeometry(), QAndroidPlatformOpenGLWindow::setGeometry(), QAndroidPlatformVulkanWindow::setGeometry(), QFbWindow::setVisible(), QAndroidPlatformWindow::setVisible(), and QScreenPrivate::updateGeometry().

+ Here is the caller graph for this function:

◆ colorSpace()

virtual QColorSpace QPlatformScreen::colorSpace ( ) const
inlinevirtual

Reimplemented in QCocoaScreen, and QXcbScreen.

Definition at line 83 of file qplatformscreen.h.

References QColorSpace::SRgb.

◆ currentMode()

int QPlatformScreen::currentMode ( ) const
virtual

Reimplement this function in subclass to return the index of the current mode from the modes list.

The default implementation returns 0.

See also
QPlatformScreen::modes
Since
5.9

Reimplemented in QAndroidPlatformScreen, and QEglFSKmsScreen.

Definition at line 511 of file qplatformscreen.cpp.

◆ cursor()

QPlatformCursor * QPlatformScreen::cursor ( ) const
virtual

Reimplement this function in subclass to return the cursor of the screen.

The default implementation returns \nullptr.

Reimplemented in QFbScreen, QCocoaScreen, QDirectFbScreen, QEglFSScreen, QEglFSKmsGbmScreen, QEglFSKmsEglDeviceScreen, QHaikuScreen, QOffscreenScreen, QQnxScreen, QVncScreen, QWasmScreen, QWindowsScreen, and QXcbScreen.

Definition at line 309 of file qplatformscreen.cpp.

Referenced by QWindowPrivate::applyCursor(), applyCursor(), applyOverrideCursor(), clearOverrideCursor(), QWindowsOleDropSource::createCursors(), QCursor::pos(), QGuiApplicationPrivate::processMouseEvent(), QCursor::setPos(), and unsetCursor().

+ Here is the caller graph for this function:

◆ depth()

◆ devicePixelRatio()

qreal QPlatformScreen::devicePixelRatio ( ) const
virtual

Reimplement this function in subclass to return the device pixel ratio for the screen.

This is the ratio between physical pixels and the device-independent pixels of the windowing system. The default implementation returns 1.0.

See also
QPlatformWindow::devicePixelRatio()

Reimplemented in QCocoaScreen, QIOSScreen, QOffscreenScreen, QWasmScreen, QWindowsScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 183 of file qplatformscreen.cpp.

Referenced by QWasmWindow::devicePixelRatio(), and QWasmWindow::setWindowIcon().

+ Here is the caller graph for this function:

◆ format()

QImage::Format QPlatformScreen::format ( ) const
pure virtual

Reimplement in subclass to return the image format which corresponds to the screen format.

Implemented in QPlatformPlaceholderScreen, QFbScreen, QAndroidPlatformScreen, QCocoaScreen, QDirectFbScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QHaikuScreen, QIOSScreen, QMinimalScreen, QMinimalEglScreen, QOffscreenScreen, QQnxScreen, QVkKhrDisplayScreen, QWasmScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Referenced by QMinimalBackingStore::resize(), QOffscreenBackingStore::resize(), QVkKhrDisplayBackingStore::resize(), and QRasterPlatformPixmap::systemNativeFormat().

+ Here is the caller graph for this function:

◆ geometry()

◆ grabWindow()

QPixmap QPlatformScreen::grabWindow ( WId window,
int x,
int y,
int width,
int height ) const
virtual

This function is called when Qt needs to be able to grab the content of a window.

Returns the content of the window specified with the WId handle within the boundaries of QRect(x,y,width,height).

Reimplemented in QBsdFbScreen, QEglFSScreen, QIntegrityFbScreen, QLinuxFbDrmScreen, QLinuxFbScreen, QVncScreen, QWindowsScreen, QCocoaScreen, QHaikuScreen, QIOSScreen, QOffscreenScreen, QQnxScreen, and QXcbScreen.

Definition at line 38 of file qplatformscreen.cpp.

References Q_UNUSED, and window().

Referenced by QScreen::grabWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPlaceholder()

virtual bool QPlatformScreen::isPlaceholder ( ) const
inlinevirtual

Reimplemented in QPlatformPlaceholderScreen.

Definition at line 74 of file qplatformscreen.h.

Referenced by QtWaylandClient::QWaylandNativeInterface::nativeResourceForScreen(), and QtWaylandClient::QWaylandScreen::waylandScreenFromWindow().

+ Here is the caller graph for this function:

◆ logicalBaseDpi()

QDpi QPlatformScreen::logicalBaseDpi ( ) const
virtual

Reimplement to return the base logical DPI for the platform.

This DPI value should correspond to a standard-DPI (1x) display. The default implementation returns 96.

QtGui will use this value (together with logicalDpi) to compute the scale factor when high-DPI scaling is enabled, as follows: factor = logicalDPI / baseDPI

Reimplemented in QAndroidPlatformScreen, QCocoaScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QIOSScreen, QOffscreenScreen, QWindowsScreen, and QXcbScreen.

Definition at line 170 of file qplatformscreen.cpp.

Referenced by logicalDpi(), and QWindowsCursor::size().

+ Here is the caller graph for this function:

◆ logicalDpi()

QDpi QPlatformScreen::logicalDpi ( ) const
virtual

Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.

The logical dots per inch metrics are used by Qt to scale the user interface.

The default implementation returns logicalBaseDpi(), which results in a UI scale factor of 1.0.

See also
physicalSize

Reimplemented in QAndroidPlatformScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QOffscreenScreen, QWasmScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 148 of file qplatformscreen.cpp.

References logicalBaseDpi().

Referenced by QtWaylandClient::QWaylandScreen::logicalDpi(), QHighDpiScaling::logicalDpi(), QQC2::QWindowsStylePrivate::nativeMetricScaleFactor(), screenCursorSize(), and QWindowsCursor::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manufacturer()

QString QPlatformScreen::manufacturer ( ) const
virtual

Reimplement this function in subclass to return the manufacturer of this screen.

The default implementation returns an empty string.

Since
5.9

Reimplemented in QEglFSKmsScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 240 of file qplatformscreen.cpp.

◆ mapBetween()

QRect QPlatformScreen::mapBetween ( Qt::ScreenOrientation a,
Qt::ScreenOrientation b,
const QRect & rect )
static

Definition at line 418 of file qplatformscreen.cpp.

References Qt::InvertedPortraitOrientation, Qt::PortraitOrientation, Qt::PrimaryOrientation, qWarning, and rect.

Referenced by QScreen::mapBetween(), and QIOSScreen::updateProperties().

+ Here is the caller graph for this function:

◆ model()

QString QPlatformScreen::model ( ) const
virtual

Reimplement this function in subclass to return the model of this screen.

The default implementation returns an empty string.

Since
5.9

Reimplemented in QEglFSKmsScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 253 of file qplatformscreen.cpp.

Referenced by QIOSScreen::name().

+ Here is the caller graph for this function:

◆ modes()

QList< QPlatformScreen::Mode > QPlatformScreen::modes ( ) const
virtual

Reimplement this function in subclass to return the list of modes for this screen.

The default implementation returns a list with only one mode from the current screen size and refresh rate.

See also
QPlatformScreen::geometry
QPlatformScreen::refreshRate
Since
5.9

Reimplemented in QAndroidPlatformScreen, and QEglFSKmsScreen.

Definition at line 494 of file qplatformscreen.cpp.

References QList< T >::append(), geometry(), list, and refreshRate().

+ Here is the call graph for this function:

◆ name()

◆ nativeOrientation()

Qt::ScreenOrientation QPlatformScreen::nativeOrientation ( ) const
virtual

Reimplement this function in subclass to return the native orientation of the screen, e.g.

the orientation where the logo sticker of the device appears the right way up.

The default implementation returns Qt::PrimaryOrientation.

Reimplemented in QAndroidPlatformScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QIOSScreen, and QQnxScreen.

Definition at line 206 of file qplatformscreen.cpp.

References Qt::PrimaryOrientation.

◆ orientation()

Qt::ScreenOrientation QPlatformScreen::orientation ( ) const
virtual

Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.

The default implementation returns Qt::PrimaryOrientation.

Reimplemented in QAndroidPlatformScreen, QCocoaScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QIOSScreen, QQnxScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 218 of file qplatformscreen.cpp.

References Qt::PrimaryOrientation.

Referenced by QCocoaScreen::orientation().

+ Here is the caller graph for this function:

◆ overrideDpi()

QPair< qreal, qreal > QPlatformScreen::overrideDpi ( const QDpi & in)
static

Definition at line 155 of file qplatformscreen.cpp.

References overrideDpi(), and qEnvironmentVariableIntValue().

Referenced by QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(), QHighDpiScaling::logicalDpi(), and overrideDpi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ physicalSize()

QSizeF QPlatformScreen::physicalSize ( ) const
virtual

Reimplement this function in subclass to return the physical size of the screen, in millimeters.

The physical size represents the actual physical dimensions of the display.

The default implementation takes the pixel size of the screen, considers a resolution of 100 dots per inch, and returns the calculated physical size. A device with a screen that has different resolutions will need to be supported by a suitable reimplementation of this function.

See also
logcalDpi

Reimplemented in QFbScreen, QAndroidPlatformScreen, QCocoaScreen, QDirectFbScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QIOSScreen, QQnxScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 131 of file qplatformscreen.cpp.

References geometry().

Referenced by QtWaylandClient::QWaylandScreen::physicalSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platformScreenForWindow()

QPlatformScreen * QPlatformScreen::platformScreenForWindow ( const QWindow * window)
static

Definition at line 223 of file qplatformscreen.cpp.

References window().

Referenced by QtWaylandClient::QWaylandScreen::waylandScreenFromWindow(), and windows().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ powerState()

QPlatformScreen::PowerState QPlatformScreen::powerState ( ) const
virtual

Returns the current power state.

The default implementation always returns PowerStateOn.

Reimplemented in QEglFSKmsScreen.

Definition at line 469 of file qplatformscreen.cpp.

References PowerStateOn.

◆ preferredMode()

int QPlatformScreen::preferredMode ( ) const
virtual

Reimplement this function in subclass to return the preferred mode index from the modes list.

The default implementation returns 0.

See also
QPlatformScreen::modes
Since
5.9

Reimplemented in QAndroidPlatformScreen, and QEglFSKmsScreen.

Definition at line 526 of file qplatformscreen.cpp.

◆ refreshRate()

qreal QPlatformScreen::refreshRate ( ) const
virtual

Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.

The default returns 60, a sensible default for modern displays.

Reimplemented in QAndroidPlatformScreen, QCocoaScreen, QEglFSScreen, QEglFSEmulatorScreen, QEglFSKmsScreen, QIOSScreen, QQnxScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 194 of file qplatformscreen.cpp.

Referenced by modes().

+ Here is the caller graph for this function:

◆ resizeMaximizedWindows()

void QPlatformScreen::resizeMaximizedWindows ( )
protected

Convenience method to resize all the maximized and fullscreen windows of this platform screen.

Definition at line 318 of file qplatformscreen.cpp.

References availableGeometry(), QScreen::availableGeometry, geometry(), QScreen::geometry, QPlatformIntegration::MaximizeUsingFullscreenGeometry, Qt::MaximizeUsingFullscreenGeometryHint, QGuiApplicationPrivate::platformIntegration(), screen(), Qt::WindowFullScreen, Qt::WindowMaximized, and windows().

Referenced by QWasmScreen::resizeMaximizedWindows(), QAndroidPlatformScreen::setAvailableGeometry(), and QFbScreen::setGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ screen()

QScreen * QPlatformScreen::screen ( ) const

Definition at line 113 of file qplatformscreen.cpp.

References d.

Referenced by QIOSScreen::QIOSScreen(), QQnxScreen::QQnxScreen(), QCocoaScreen::~QCocoaScreen(), QWasmScreen::canvasResizeObserverCallback(), QWasmScreen::clipPoint(), QKmsDevice::createScreens(), QCocoaScreen::deliverUpdateRequests(), QCocoaScreen::get(), QCocoaScreen::get(), QWasmScreen::get(), QWasmScreen::get(), QHaikuScreen::grabWindow(), QIOSScreen::grabWindow(), QWindowsScreen::handleChanges(), QWindowSystemInterface::handleScreenRemoved(), QXcbWindow::hide(), QCocoaScreen::mapFromNative(), QCocoaScreen::mapFromNative(), QCocoaScreen::mapToNative(), QCocoaScreen::mapToNative(), QCocoaScreen::nativeScreenForDisplayId(), QEglFSKmsGbmScreen::nonThreadedPageFlipHandler(), QCursor::pos(), resizeMaximizedWindows(), QWasmScreen::resizeMaximizedWindows(), screenForPosition(), QAndroidPlatformScreen::setAvailableGeometry(), QFbScreen::setGeometry(), QWasmScreen::setGeometry(), QAndroidPlatformScreen::setOrientation(), QAndroidPlatformScreen::setRefreshRate(), QQnxScreen::setRotation(), QAndroidPlatformScreen::setSize(), QAndroidPlatformScreen::setSizeParameters(), QVkKhrDisplayScreen::setVk(), QXcbDrag::startDrag(), QAndroidPlatformTheme::themeHint(), QXcbScreen::updateAvailableGeometry(), QXcbScreen::updateGeometry(), QtWaylandClient::QWaylandScreen::updateOutputProperties(), QIOSScreen::updateProperties(), QXcbScreen::updateRefreshRate(), QtWaylandClient::QWaylandScreen::updateXdgOutputProperties(), QWindowsScreen::virtualGeometry(), QScreen::virtualSiblings(), QPlatformPlaceholderScreen::virtualSiblings(), QCocoaScreen::virtualSiblings(), QOffscreenScreen::virtualSiblings(), QWindowsScreen::virtualSiblings(), QtWaylandClient::QWaylandScreen::virtualSiblings(), and QEglFSKmsGbmScreen::waitForFlipWithEventReader().

◆ screenForPosition()

const QPlatformScreen * QPlatformScreen::screenForPosition ( const QPoint & point) const

Find the sibling screen corresponding to globalPos.

Returns this screen if no suitable screen is found at the position.

Definition at line 86 of file qplatformscreen.cpp.

References contains(), QRect::contains(), geometry(), QScreen::geometry, screen(), and virtualSiblings().

Referenced by QCursor::pos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialNumber()

QString QPlatformScreen::serialNumber ( ) const
virtual

Reimplement this function in subclass to return the serial number of this screen.

The default implementation returns an empty string.

Since
5.9

Reimplemented in QEglFSKmsScreen, QWindowsScreen, and QXcbScreen.

Definition at line 266 of file qplatformscreen.cpp.

◆ setPowerState()

void QPlatformScreen::setPowerState ( PowerState state)
virtual

Sets the power state for this screen.

Reimplemented in QEglFSKmsScreen.

Definition at line 477 of file qplatformscreen.cpp.

References Q_UNUSED, and state.

Referenced by QVncServer::discardClient(), and QVncScreen::initialize().

+ Here is the caller graph for this function:

◆ subpixelAntialiasingTypeHint()

QPlatformScreen::SubpixelAntialiasingType QPlatformScreen::subpixelAntialiasingTypeHint ( ) const
virtual

Returns a hint about this screen's subpixel layout structure.

The default implementation queries the {QT_SUBPIXEL_AA_TYPE} env variable. This is just a hint because most platforms don't have a way to retrieve the correct value from hardware and instead rely on font configurations.

Reimplemented in QCocoaScreen, QEglFSKmsScreen, QWindowsScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 444 of file qplatformscreen.cpp.

References qgetenv(), Subpixel_BGR, Subpixel_None, Subpixel_RGB, Subpixel_VBGR, and Subpixel_VRGB.

Referenced by subpixelAntialiasingTypeHint(), QCocoaScreen::subpixelAntialiasingTypeHint(), QWindowsScreen::subpixelAntialiasingTypeHint(), and QtWaylandClient::QWaylandScreen::subpixelAntialiasingTypeHint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ topLevelAt()

QWindow * QPlatformScreen::topLevelAt ( const QPoint & pos) const
virtual

Return the given top level window for a given position.

Default implementation retrieves a list of all top level windows and finds the first window which contains point pos

Reimplemented in QFbScreen, QAndroidPlatformScreen, QWasmScreen, QCocoaScreen, QEglFSScreen, QQnxScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 54 of file qplatformscreen.cpp.

References QList< T >::crbegin(), QList< T >::crend(), it, list, pos, QHighDpi::toNativePixels(), and QGuiApplication::topLevelWindows().

Referenced by QXcbWindow::hide(), QEglFSScreen::topLevelAt(), and QtWaylandClient::QWaylandScreen::topLevelAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transformBetween()

QTransform QPlatformScreen::transformBetween ( Qt::ScreenOrientation a,
Qt::ScreenOrientation b,
const QRect & target )
static

Definition at line 387 of file qplatformscreen.cpp.

References angleBetween(), Qt::PrimaryOrientation, Q_ASSERT, qWarning, and QTransform::translate().

Referenced by QScreen::transformBetween().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ virtualSiblings()

QList< QPlatformScreen * > QPlatformScreen::virtualSiblings ( ) const
virtual

Returns a list of all the platform screens that are part of the same virtual desktop.

Screens part of the same virtual desktop share a common coordinate system, and windows can be freely moved between them.

Reimplemented in QPlatformPlaceholderScreen, QCocoaScreen, QEglFSKmsScreen, QOffscreenScreen, QWindowsScreen, QXcbScreen, and QtWaylandClient::QWaylandScreen.

Definition at line 106 of file qplatformscreen.cpp.

References list.

Referenced by screenForPosition().

+ Here is the caller graph for this function:

◆ windows()

QWindowList QPlatformScreen::windows ( ) const

Return all windows residing on this screen.

Definition at line 70 of file qplatformscreen.cpp.

References QGuiApplication::allWindows(), QList< T >::append(), platformScreenForWindow(), window(), and windows().

Referenced by QWasmScreen::allWindows(), QCocoaScreen::deliverUpdateRequests(), QEglFSScreen::grabWindow(), QEglFSScreen::handleCursorMove(), resizeMaximizedWindows(), QAndroidPlatformScreen::setAvailableGeometry(), QEglFSScreen::topLevelAt(), and windows().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QScreen

friend class QScreen
friend

Definition at line 136 of file qplatformscreen.h.

Member Data Documentation

◆ d_ptr

QScopedPointer<QPlatformScreenPrivate> QPlatformScreen::d_ptr
protected

Definition at line 133 of file qplatformscreen.h.


The documentation for this class was generated from the following files: