![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qwaylandscreen_p.h>
Public Member Functions | |
QWaylandScreen (QWaylandDisplay *waylandDisplay, int version, uint32_t id) | |
~QWaylandScreen () override | |
void | maybeInitialize () |
void | initXdgOutput (QWaylandXdgOutputManagerV1 *xdgOutputManager) |
QWaylandDisplay * | display () const |
QString | manufacturer () const override |
Reimplement this function in subclass to return the manufacturer of this screen. | |
QString | model () const override |
Reimplement this function in subclass to return the model of this screen. | |
QRect | geometry () const override |
Reimplement in subclass to return the pixel geometry of the screen. | |
int | depth () const override |
Reimplement in subclass to return current depth 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. | |
QDpi | logicalDpi () const override |
Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen. | |
QList< QPlatformScreen * > | virtualSiblings () const override |
Returns a list of all the platform screens that are part of the same virtual desktop. | |
Qt::ScreenOrientation | orientation () const override |
Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation. | |
int | scale () const |
qreal | devicePixelRatio () const override |
Reimplement this function in subclass to return the device pixel ratio for the screen. | |
qreal | refreshRate () const override |
Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz. | |
QString | name () const override |
SubpixelAntialiasingType | subpixelAntialiasingTypeHint () const override |
Returns a hint about this screen's subpixel layout structure. | |
uint32_t | outputId () const |
::wl_output * | output () const override |
Qt::ScreenOrientation | toScreenOrientation (int wlTransform, Qt::ScreenOrientation fallback) const |
Public Member Functions inherited from QPlatformScreen | |
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 | 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 QColorSpace | colorSpace () const |
virtual QDpi | logicalBaseDpi () const |
Reimplement to return the base logical DPI for the platform. | |
virtual Qt::ScreenOrientation | nativeOrientation () const |
Reimplement this function in subclass to return the native orientation of the screen, e.g. | |
virtual QWindow * | topLevelAt (const QPoint &point) const |
Return the given top level window for a given position. | |
QWindowList | windows () const |
Return all windows residing on this screen. | |
const QPlatformScreen * | screenForPosition (const QPoint &point) const |
Find the sibling screen corresponding to globalPos. | |
QScreen * | screen () const |
virtual QString | serialNumber () const |
Reimplement this function in subclass to return the serial number of this screen. | |
virtual QPlatformCursor * | cursor () const |
Reimplement this function in subclass to return the cursor of the screen. | |
virtual PowerState | powerState () const |
Returns the current power state. | |
virtual void | setPowerState (PowerState state) |
Sets the power state for this screen. | |
virtual QList< Mode > | modes () 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 QWaylandScreen * | waylandScreenFromWindow (QWindow *window) |
static QWaylandScreen * | fromWlOutput (::wl_output *output) |
Static Public Member Functions inherited from QPlatformScreen | |
static QPlatformScreen * | platformScreenForWindow (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 Types | |
enum | Event : uint { XdgOutputDoneEvent = 0x1 , OutputDoneEvent = 0x2 , XdgOutputNameEvent = 0x4 , OutputNameEvent = 0x8 } |
Protected Member Functions | |
uint | requiredEvents () const |
void | output_mode (uint32_t flags, int width, int height, int refresh) override |
void | output_geometry (int32_t x, int32_t y, int32_t width, int32_t height, int subpixel, const QString &make, const QString &model, int32_t transform) override |
void | output_scale (int32_t factor) override |
void | output_done () override |
void | output_name (const QString &name) override |
void | updateOutputProperties () |
void | zxdg_output_v1_logical_position (int32_t x, int32_t y) override |
void | zxdg_output_v1_logical_size (int32_t width, int32_t height) override |
void | zxdg_output_v1_done () override |
void | zxdg_output_v1_name (const QString &name) override |
void | updateXdgOutputProperties () |
Protected Member Functions inherited from QPlatformScreen | |
void | resizeMaximizedWindows () |
Convenience method to resize all the maximized and fullscreen windows of this platform screen. |
Protected Attributes | |
int | m_outputId |
QWaylandDisplay * | mWaylandDisplay = nullptr |
QString | mManufacturer |
QString | mModel |
QRect | mGeometry |
QRect | mXdgGeometry |
int | mScale = 1 |
int | mDepth = 32 |
int | mRefreshRate = 60000 |
int | mSubpixel = -1 |
int | mTransform = -1 |
QImage::Format | mFormat = QImage::Format_ARGB32_Premultiplied |
QSize | mPhysicalSize |
QString | mOutputName |
Qt::ScreenOrientation | m_orientation = Qt::PrimaryOrientation |
uint | mProcessedEvents = 0 |
bool | mInitialized = false |
Protected Attributes inherited from QPlatformScreen | |
QScopedPointer< QPlatformScreenPrivate > | d_ptr |
Additional Inherited Members | |
Public Types inherited from QPlatformScreen | |
enum | SubpixelAntialiasingType { Subpixel_None , Subpixel_RGB , Subpixel_BGR , Subpixel_VRGB , Subpixel_VBGR } |
enum | PowerState { PowerStateOn , PowerStateStandby , PowerStateSuspend , PowerStateOff } |
Definition at line 39 of file qwaylandscreen_p.h.
|
protected |
Enumerator | |
---|---|
XdgOutputDoneEvent | |
OutputDoneEvent | |
XdgOutputNameEvent | |
OutputNameEvent |
Definition at line 92 of file qwaylandscreen_p.h.
QtWaylandClient::QWaylandScreen::QWaylandScreen | ( | QWaylandDisplay * | waylandDisplay, |
int | version, | ||
uint32_t | id ) |
Definition at line 30 of file qwaylandscreen.cpp.
|
override |
Definition at line 48 of file qwaylandscreen.cpp.
|
overridevirtual |
Reimplement in subclass to return current depth of the screen.
Implements QPlatformScreen.
Definition at line 131 of file qwaylandscreen.cpp.
|
overridevirtual |
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.
Reimplemented from QPlatformScreen.
Definition at line 191 of file qwaylandscreen.cpp.
QWaylandDisplay * QtWaylandClient::QWaylandScreen::display | ( | ) | const |
Definition at line 98 of file qwaylandscreen.cpp.
|
overridevirtual |
Reimplement in subclass to return the image format which corresponds to the screen format.
Implements QPlatformScreen.
Definition at line 136 of file qwaylandscreen.cpp.
|
static |
Definition at line 242 of file qwaylandscreen.cpp.
|
overridevirtual |
Reimplement in subclass to return the pixel geometry of the screen.
Implements QPlatformScreen.
Definition at line 113 of file qwaylandscreen.cpp.
void QtWaylandClient::QWaylandScreen::initXdgOutput | ( | QWaylandXdgOutputManagerV1 * | xdgOutputManager | ) |
Definition at line 89 of file qwaylandscreen.cpp.
|
overridevirtual |
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.
Reimplemented from QPlatformScreen.
Definition at line 149 of file qwaylandscreen.cpp.
|
overridevirtual |
Reimplement this function in subclass to return the manufacturer of this screen.
The default implementation returns an empty string.
Reimplemented from QPlatformScreen.
Definition at line 103 of file qwaylandscreen.cpp.
void QtWaylandClient::QWaylandScreen::maybeInitialize | ( | ) |
Definition at line 73 of file qwaylandscreen.cpp.
|
overridevirtual |
Reimplement this function in subclass to return the model of this screen.
The default implementation returns an empty string.
Reimplemented from QPlatformScreen.
Definition at line 108 of file qwaylandscreen.cpp.
|
inlineoverridevirtual |
Reimplemented from QPlatformScreen.
Definition at line 71 of file qwaylandscreen_p.h.
|
overridevirtual |
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 from QPlatformScreen.
Definition at line 181 of file qwaylandscreen.cpp.
|
inlineoverride |
Definition at line 80 of file qwaylandscreen_p.h.
|
overrideprotected |
Definition at line 313 of file qwaylandscreen.cpp.
|
overrideprotected |
Definition at line 291 of file qwaylandscreen.cpp.
|
overrideprotected |
Definition at line 278 of file qwaylandscreen.cpp.
Definition at line 326 of file qwaylandscreen.cpp.
|
overrideprotected |
Definition at line 308 of file qwaylandscreen.cpp.
|
inline |
Definition at line 79 of file qwaylandscreen_p.h.
|
overridevirtual |
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.
Reimplemented from QPlatformScreen.
Definition at line 141 of file qwaylandscreen.cpp.
|
overridevirtual |
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 from QPlatformScreen.
Definition at line 196 of file qwaylandscreen.cpp.
|
protected |
Definition at line 58 of file qwaylandscreen.cpp.
int QtWaylandClient::QWaylandScreen::scale | ( | ) | const |
Definition at line 186 of file qwaylandscreen.cpp.
|
overridevirtual |
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 from QPlatformScreen.
Definition at line 208 of file qwaylandscreen.cpp.
Qt::ScreenOrientation QtWaylandClient::QWaylandScreen::toScreenOrientation | ( | int | wlTransform, |
Qt::ScreenOrientation | fallback ) const |
Definition at line 249 of file qwaylandscreen.cpp.
|
protected |
Definition at line 344 of file qwaylandscreen.cpp.
|
protected |
Definition at line 405 of file qwaylandscreen.cpp.
|
overridevirtual |
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 from QPlatformScreen.
Definition at line 162 of file qwaylandscreen.cpp.
|
static |
Definition at line 234 of file qwaylandscreen.cpp.
|
overrideprotected |
Definition at line 374 of file qwaylandscreen.cpp.
|
overrideprotected |
Definition at line 364 of file qwaylandscreen.cpp.
|
overrideprotected |
Definition at line 369 of file qwaylandscreen.cpp.
Definition at line 386 of file qwaylandscreen.cpp.
|
protected |
Definition at line 133 of file qwaylandscreen_p.h.
|
protected |
Definition at line 119 of file qwaylandscreen_p.h.
|
protected |
Definition at line 126 of file qwaylandscreen_p.h.
|
protected |
Definition at line 130 of file qwaylandscreen_p.h.
|
protected |
Definition at line 123 of file qwaylandscreen_p.h.
|
protected |
Definition at line 135 of file qwaylandscreen_p.h.
|
protected |
Definition at line 121 of file qwaylandscreen_p.h.
|
protected |
Definition at line 122 of file qwaylandscreen_p.h.
|
protected |
Definition at line 132 of file qwaylandscreen_p.h.
|
protected |
Definition at line 131 of file qwaylandscreen_p.h.
|
protected |
Definition at line 134 of file qwaylandscreen_p.h.
|
protected |
Definition at line 127 of file qwaylandscreen_p.h.
|
protected |
Definition at line 125 of file qwaylandscreen_p.h.
|
protected |
Definition at line 128 of file qwaylandscreen_p.h.
|
protected |
Definition at line 129 of file qwaylandscreen_p.h.
|
protected |
Definition at line 120 of file qwaylandscreen_p.h.
|
protected |
Definition at line 124 of file qwaylandscreen_p.h.