![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qxcbscreen.h>
Public Member Functions | |
QXcbScreen (QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop, xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *outputInfo) | |
QXcbScreen (QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop, xcb_randr_monitor_info_t *monitorInfo, xcb_timestamp_t timestamp=XCB_NONE) | |
~QXcbScreen () | |
QString | getOutputName (xcb_randr_get_output_info_reply_t *outputInfo) |
QString | getName (xcb_randr_monitor_info_t *monitorInfo) |
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. | |
QWindow * | topLevelAt (const QPoint &point) const override |
Return the given top level window for a given position. | |
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. | |
QString | serialNumber () const override |
Reimplement this function in subclass to return the serial number of this screen. | |
QRect | geometry () const override |
Reimplement in subclass to return the pixel geometry of the screen. | |
QRect | availableGeometry () const override |
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. | |
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. | |
QColorSpace | colorSpace () const override |
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. | |
QDpi | logicalBaseDpi () const override |
Reimplement to return the base logical DPI for the platform. | |
QPlatformCursor * | cursor () const override |
Reimplement this function in subclass to return the cursor of the screen. | |
qreal | refreshRate () const override |
Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz. | |
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. | |
QList< QPlatformScreen * > | virtualSiblings () const override |
Returns a list of all the platform screens that are part of the same virtual desktop. | |
QXcbVirtualDesktop * | virtualDesktop () const |
void | setPrimary (bool primary) |
bool | isPrimary () const |
int | screenNumber () const |
int | virtualDesktopNumber () const override |
xcb_screen_t * | screen () const |
xcb_window_t | root () const |
xcb_randr_output_t | output () const |
xcb_randr_crtc_t | crtc () const |
xcb_randr_mode_t | mode () const |
QList< xcb_randr_output_t > | outputs () const |
QList< xcb_randr_crtc_t > | crtcs () const |
void | setOutput (xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *outputInfo) |
void | setCrtc (xcb_randr_crtc_t crtc) |
void | setMonitor (xcb_randr_monitor_info_t *monitorInfo, xcb_timestamp_t timestamp=XCB_NONE) |
QString | defaultName () |
bool | isPrimaryInXScreen () |
void | windowShown (QXcbWindow *window) |
QString | windowManagerName () const |
QSurfaceFormat | surfaceFormatFor (const QSurfaceFormat &format) const |
const xcb_visualtype_t * | visualForFormat (const QSurfaceFormat &format) const |
const xcb_visualtype_t * | visualForId (xcb_visualid_t visualid) const |
xcb_colormap_t | colormapForVisual (xcb_visualid_t visualid) const |
quint8 | depthOfVisual (xcb_visualid_t visualid) const |
QString | name () const override |
void | updateGeometry (const QRect &geometry, uint8_t rotation) |
void | updateGeometry (xcb_timestamp_t timestamp=XCB_TIME_CURRENT_TIME) |
void | updateAvailableGeometry () |
void | updateRefreshRate (xcb_randr_mode_t mode) |
QFontEngine::HintStyle | hintStyle () const |
QFontEngine::SubpixelAntialiasingType | subpixelType () const |
int | antialiasingEnabled () const |
QXcbXSettings * | xSettings () const |
Public Member Functions inherited from QXcbObject | |
QXcbObject (QXcbConnection *connection=nullptr) | |
void | setConnection (QXcbConnection *connection) |
QXcbConnection * | connection () const |
xcb_atom_t | atom (QXcbAtom::Atom atom) const |
xcb_connection_t * | xcb_connection () const |
Public Member Functions inherited from QPlatformScreen | |
QPlatformScreen () | |
virtual | ~QPlatformScreen () |
virtual bool | isPlaceholder () const |
virtual qreal | devicePixelRatio () const |
Reimplement this function in subclass to return the device pixel ratio for the screen. | |
virtual Qt::ScreenOrientation | nativeOrientation () const |
Reimplement this function in subclass to return the native orientation of the screen, e.g. | |
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 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< 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. |
Friends | |
class | QXcbConnection |
class | QXcbVirtualDesktop |
Definition at line 111 of file qxcbscreen.h.
QXcbScreen::QXcbScreen | ( | QXcbConnection * | connection, |
QXcbVirtualDesktop * | virtualDesktop, | ||
xcb_randr_output_t | outputId, | ||
xcb_randr_get_output_info_reply_t * | outputInfo ) |
Definition at line 491 of file qxcbscreen.cpp.
QXcbScreen::QXcbScreen | ( | QXcbConnection * | connection, |
QXcbVirtualDesktop * | virtualDesktop, | ||
xcb_randr_monitor_info_t * | monitorInfo, | ||
xcb_timestamp_t | timestamp = XCB_NONE ) |
Definition at line 579 of file qxcbscreen.cpp.
QXcbScreen::~QXcbScreen | ( | ) |
Definition at line 713 of file qxcbscreen.cpp.
|
inline |
Definition at line 187 of file qxcbscreen.h.
|
overridevirtual |
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 from QPlatformScreen.
Definition at line 838 of file qxcbscreen.cpp.
|
inline |
Definition at line 175 of file qxcbscreen.h.
|
inlineoverridevirtual |
Reimplemented from QPlatformScreen.
Definition at line 136 of file qxcbscreen.h.
|
inline |
Definition at line 155 of file qxcbscreen.h.
|
inline |
Definition at line 159 of file qxcbscreen.h.
|
overridevirtual |
Reimplement this function in subclass to return the cursor of the screen.
The default implementation returns \nullptr.
Reimplemented from QPlatformScreen.
Definition at line 879 of file qxcbscreen.cpp.
QString QXcbScreen::defaultName | ( | ) |
Definition at line 690 of file qxcbscreen.cpp.
|
inlineoverridevirtual |
Reimplement in subclass to return current depth of the screen.
Implements QPlatformScreen.
Definition at line 134 of file qxcbscreen.h.
|
inline |
Definition at line 176 of file qxcbscreen.h.
|
overridevirtual |
Reimplement in subclass to return the image format which corresponds to the screen format.
Implements QPlatformScreen.
Definition at line 846 of file qxcbscreen.cpp.
|
inlineoverridevirtual |
Reimplement in subclass to return the pixel geometry of the screen.
Implements QPlatformScreen.
Definition at line 132 of file qxcbscreen.h.
QString QXcbScreen::getName | ( | xcb_randr_monitor_info_t * | monitorInfo | ) |
Definition at line 729 of file qxcbscreen.cpp.
QString QXcbScreen::getOutputName | ( | xcb_randr_get_output_info_reply_t * | outputInfo | ) |
Definition at line 717 of file qxcbscreen.cpp.
|
overridevirtual |
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 from QPlatformScreen.
Definition at line 996 of file qxcbscreen.cpp.
|
inline |
Definition at line 185 of file qxcbscreen.h.
|
inline |
Definition at line 147 of file qxcbscreen.h.
bool QXcbScreen::isPrimaryInXScreen | ( | ) |
Definition at line 702 of file qxcbscreen.cpp.
|
inlineoverridevirtual |
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 from QPlatformScreen.
Definition at line 139 of file qxcbscreen.h.
|
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 865 of file qxcbscreen.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 746 of file qxcbscreen.cpp.
|
inline |
Definition at line 156 of file qxcbscreen.h.
|
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 751 of file qxcbscreen.cpp.
|
inlineoverridevirtual |
Reimplemented from QPlatformScreen.
Definition at line 178 of file qxcbscreen.h.
|
inlineoverridevirtual |
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 142 of file qxcbscreen.h.
|
inline |
Definition at line 154 of file qxcbscreen.h.
|
inline |
Definition at line 158 of file qxcbscreen.h.
|
inlineoverridevirtual |
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 137 of file qxcbscreen.h.
|
inlineoverridevirtual |
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 141 of file qxcbscreen.h.
|
inline |
Definition at line 153 of file qxcbscreen.h.
|
inline |
Definition at line 152 of file qxcbscreen.h.
|
inline |
Definition at line 149 of file qxcbscreen.h.
|
overridevirtual |
Reimplement this function in subclass to return the serial number of this screen.
The default implementation returns an empty string.
Reimplemented from QPlatformScreen.
Definition at line 756 of file qxcbscreen.cpp.
|
inline |
Definition at line 163 of file qxcbscreen.h.
void QXcbScreen::setMonitor | ( | xcb_randr_monitor_info_t * | monitorInfo, |
xcb_timestamp_t | timestamp = XCB_NONE ) |
Definition at line 589 of file qxcbscreen.cpp.
void QXcbScreen::setOutput | ( | xcb_randr_output_t | outputId, |
xcb_randr_get_output_info_reply_t * | outputInfo ) |
Definition at line 884 of file qxcbscreen.cpp.
|
inline |
Definition at line 146 of file qxcbscreen.h.
|
inline |
Definition at line 186 of file qxcbscreen.h.
QSurfaceFormat QXcbScreen::surfaceFormatFor | ( | const QSurfaceFormat & | format | ) | const |
Definition at line 802 of file qxcbscreen.cpp.
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 from QPlatformScreen.
Definition at line 761 of file qxcbscreen.cpp.
void QXcbScreen::updateAvailableGeometry | ( | ) |
Definition at line 946 of file qxcbscreen.cpp.
Definition at line 906 of file qxcbscreen.cpp.
void QXcbScreen::updateGeometry | ( | xcb_timestamp_t | timestamp = XCB_TIME_CURRENT_TIME | ) |
Definition at line 895 of file qxcbscreen.cpp.
void QXcbScreen::updateRefreshRate | ( | xcb_randr_mode_t | mode | ) |
Definition at line 955 of file qxcbscreen.cpp.
|
inline |
Definition at line 144 of file qxcbscreen.h.
|
inlineoverride |
Definition at line 150 of file qxcbscreen.h.
|
inlineoverridevirtual |
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 143 of file qxcbscreen.h.
|
inline |
Definition at line 173 of file qxcbscreen.h.
const xcb_visualtype_t * QXcbScreen::visualForId | ( | xcb_visualid_t | visualid | ) | const |
Definition at line 807 of file qxcbscreen.cpp.
|
inline |
Definition at line 169 of file qxcbscreen.h.
void QXcbScreen::windowShown | ( | QXcbWindow * | window | ) |
Definition at line 793 of file qxcbscreen.cpp.
QXcbXSettings * QXcbScreen::xSettings | ( | ) | const |
Definition at line 1069 of file qxcbscreen.cpp.
|
friend |
Definition at line 222 of file qxcbscreen.h.
|
friend |
Definition at line 223 of file qxcbscreen.h.