[][src]Struct qt_gui::QScreen

#[repr(C)]pub struct QScreen { /* fields omitted */ }

The QScreen class is used to query screen properties.

C++ class: QScreen.

C++ documentation:

The QScreen class is used to query screen properties.

A note on logical vs physical dots per inch: physical DPI is based on the actual physical pixel sizes when available, and is useful for print preview and other cases where it's desirable to know the exact physical dimensions of screen displayed contents.

Logical dots per inch are used to convert font and user interface elements from point sizes to pixel sizes, and might be different from the physical dots per inch. The logical dots per inch are sometimes user-settable in the desktop environment's settings panel, to let the user globally control UI and font sizes in different applications.

Methods

impl QScreen[src]

pub fn geometry_changed(&self) -> Signal<(*const QRect,)>[src]

Returns a built-in Qt signal QScreen::geometryChanged that can be passed to qt_core::Signal::connect.

pub fn available_geometry_changed(&self) -> Signal<(*const QRect,)>[src]

Returns a built-in Qt signal QScreen::availableGeometryChanged that can be passed to qt_core::Signal::connect.

pub fn physical_size_changed(&self) -> Signal<(*const QSizeF,)>[src]

This property holds the screen's physical size (in millimeters)

Returns a built-in Qt signal QScreen::physicalSizeChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the screen's physical size (in millimeters)

The physical size represents the actual physical dimensions of the screen's display.

Depending on what information the underlying system provides the value might not be entirely accurate.

Access functions:

QSizeF physicalSize() const

Notifier signal:

void physicalSizeChanged(const QSizeF &size)

pub fn physical_dots_per_inch_changed(&self) -> Signal<(c_double,)>[src]

Returns a built-in Qt signal QScreen::physicalDotsPerInchChanged that can be passed to qt_core::Signal::connect.

pub fn logical_dots_per_inch_changed(&self) -> Signal<(c_double,)>[src]

Returns a built-in Qt signal QScreen::logicalDotsPerInchChanged that can be passed to qt_core::Signal::connect.

pub fn virtual_geometry_changed(&self) -> Signal<(*const QRect,)>[src]

Returns a built-in Qt signal QScreen::virtualGeometryChanged that can be passed to qt_core::Signal::connect.

pub fn primary_orientation_changed(&self) -> Signal<(ScreenOrientation,)>[src]

This signal is emitted when the primary orientation of the screen changes with orientation as an argument.

Returns a built-in Qt signal QScreen::primaryOrientationChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the primary orientation of the screen changes with orientation as an argument.

Note: Notifier signal for property primaryOrientation.

See also primaryOrientation().

pub fn orientation_changed(&self) -> Signal<(ScreenOrientation,)>[src]

This signal is emitted when the orientation of the screen changes with orientation as an argument.

Returns a built-in Qt signal QScreen::orientationChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the orientation of the screen changes with orientation as an argument.

Note: Notifier signal for property orientation.

See also orientation().

pub fn refresh_rate_changed(&self) -> Signal<(c_double,)>[src]

This property holds the approximate vertical refresh rate of the screen in Hz

Returns a built-in Qt signal QScreen::refreshRateChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the approximate vertical refresh rate of the screen in Hz

Access functions:

qreal refreshRate() const

Notifier signal:

void refreshRateChanged(qreal refreshRate)

pub unsafe fn angle_between(
    &self,
    a: ScreenOrientation,
    b: ScreenOrientation
) -> c_int
[src]

Convenience function to compute the angle of rotation to get from rotation a to rotation b.

Calls C++ function: int QScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) const.

C++ documentation:

Convenience function to compute the angle of rotation to get from rotation a to rotation b.

The result will be 0, 90, 180, or 270.

Qt::PrimaryOrientation is interpreted as the screen's primaryOrientation().

pub unsafe fn available_geometry(&self) -> CppBox<QRect>[src]

This property holds the screen's available geometry in pixels

Calls C++ function: QRect QScreen::availableGeometry() const.

C++ documentation:

This property holds the screen's available geometry in pixels

The available geometry is the geometry excluding window manager reserved areas such as task bars and system menus.

Access functions:

QRect availableGeometry() const

Notifier signal:

void availableGeometryChanged(const QRect &geometry)

pub unsafe fn available_size(&self) -> CppBox<QSize>[src]

This property holds the screen's available size in pixels

Calls C++ function: QSize QScreen::availableSize() const.

C++ documentation:

This property holds the screen's available size in pixels

The available size is the size excluding window manager reserved areas such as task bars and system menus.

Access functions:

QSize availableSize() const

Notifier signal:

void availableGeometryChanged(const QRect &geometry)

pub unsafe fn available_virtual_geometry(&self) -> CppBox<QRect>[src]

This property holds the available geometry of the virtual desktop to which this screen belongs

Calls C++ function: QRect QScreen::availableVirtualGeometry() const.

C++ documentation:

This property holds the available geometry of the virtual desktop to which this screen belongs

Returns the available geometry of the virtual desktop corresponding to this screen.

This is the union of the virtual siblings' individual available geometries.

Access functions:

QRect availableVirtualGeometry() const

Notifier signal:

void virtualGeometryChanged(const QRect &rect)

See also availableGeometry() and virtualSiblings().

pub unsafe fn available_virtual_size(&self) -> CppBox<QSize>[src]

This property holds the available size of the virtual desktop to which this screen belongs

Calls C++ function: QSize QScreen::availableVirtualSize() const.

C++ documentation:

This property holds the available size of the virtual desktop to which this screen belongs

Returns the available pixel size of the virtual desktop corresponding to this screen.

This is the combined size of the virtual siblings' individual available geometries.

Access functions:

QSize availableVirtualSize() const

Notifier signal:

void virtualGeometryChanged(const QRect &rect)

See also availableSize() and virtualSiblings().

pub unsafe fn depth(&self) -> c_int[src]

This property holds the color depth of the screen

Calls C++ function: int QScreen::depth() const.

C++ documentation:

This property holds the color depth of the screen

Access functions:

int depth() const

pub unsafe fn device_pixel_ratio(&self) -> c_double[src]

This property holds the screen's ratio between physical pixels and device-independent pixels

Calls C++ function: double QScreen::devicePixelRatio() const.

C++ documentation:

This property holds the screen's ratio between physical pixels and device-independent pixels

Returns the ratio between physical pixels and device-independent pixels for the screen.

Common values are 1.0 on normal displays and 2.0 on "retina" displays. Higher values are also possible.

This property was introduced in Qt 5.5.

Access functions:

qreal devicePixelRatio() const

Notifier signal:

void physicalDotsPerInchChanged(qreal dpi)

See also QWindow::devicePixelRatio() and QGuiApplication::devicePixelRatio().

pub unsafe fn geometry(&self) -> CppBox<QRect>[src]

This property holds the screen's geometry in pixels

Calls C++ function: QRect QScreen::geometry() const.

C++ documentation:

This property holds the screen's geometry in pixels

As an example this might return QRect(0, 0, 1280, 1024), or in a virtual desktop setting QRect(1280, 0, 1280, 1024).

Access functions:

QRect geometry() const

Notifier signal:

void geometryChanged(const QRect &geometry)

pub unsafe fn grab_window_5a(
    &self,
    window: c_ulonglong,
    x: c_int,
    y: c_int,
    w: c_int,
    h: c_int
) -> CppBox<QPixmap>
[src]

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

Calls C++ function: QPixmap QScreen::grabWindow(unsigned long long window, int x = …, int y = …, int w = …, int h = …).

C++ documentation:

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

The arguments (x, y) specify the offset in the window, whereas (width, height) specify the area to be copied. If width is negative, the function copies everything to the right border of the window. If height is negative, the function copies everything to the bottom of the window.

The window system identifier (WId) can be retrieved using the QWidget::winId() function. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on.

Warning: Grabbing windows that are not part of the application is not supported on systems such as iOS, where sandboxing/security prevents reading pixels of windows not owned by the application.

The grabWindow() function grabs pixels from the screen, not from the window, i.e. if there is another window partially or entirely over the one you grab, you get pixels from the overlying window, too. The mouse cursor is generally not grabbed.

Note on X11 that if the given window doesn't have the same depth as the root window, and another window partially or entirely obscures the one you grab, you will not get pixels from the overlying window. The contents of the obscured areas in the pixmap will be undefined and uninitialized.

On Windows Vista and above grabbing a layered window, which is created by setting the Qt::WA_TranslucentBackground attribute, will not work. Instead grabbing the desktop widget should work.

Warning: In general, grabbing an area outside the screen is not safe. This depends on the underlying window system.

pub unsafe fn grab_window_4a(
    &self,
    window: c_ulonglong,
    x: c_int,
    y: c_int,
    w: c_int
) -> CppBox<QPixmap>
[src]

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

Calls C++ function: QPixmap QScreen::grabWindow(unsigned long long window, int x = …, int y = …, int w = …).

C++ documentation:

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

The arguments (x, y) specify the offset in the window, whereas (width, height) specify the area to be copied. If width is negative, the function copies everything to the right border of the window. If height is negative, the function copies everything to the bottom of the window.

The window system identifier (WId) can be retrieved using the QWidget::winId() function. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on.

Warning: Grabbing windows that are not part of the application is not supported on systems such as iOS, where sandboxing/security prevents reading pixels of windows not owned by the application.

The grabWindow() function grabs pixels from the screen, not from the window, i.e. if there is another window partially or entirely over the one you grab, you get pixels from the overlying window, too. The mouse cursor is generally not grabbed.

Note on X11 that if the given window doesn't have the same depth as the root window, and another window partially or entirely obscures the one you grab, you will not get pixels from the overlying window. The contents of the obscured areas in the pixmap will be undefined and uninitialized.

On Windows Vista and above grabbing a layered window, which is created by setting the Qt::WA_TranslucentBackground attribute, will not work. Instead grabbing the desktop widget should work.

Warning: In general, grabbing an area outside the screen is not safe. This depends on the underlying window system.

pub unsafe fn grab_window_3a(
    &self,
    window: c_ulonglong,
    x: c_int,
    y: c_int
) -> CppBox<QPixmap>
[src]

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

Calls C++ function: QPixmap QScreen::grabWindow(unsigned long long window, int x = …, int y = …).

C++ documentation:

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

The arguments (x, y) specify the offset in the window, whereas (width, height) specify the area to be copied. If width is negative, the function copies everything to the right border of the window. If height is negative, the function copies everything to the bottom of the window.

The window system identifier (WId) can be retrieved using the QWidget::winId() function. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on.

Warning: Grabbing windows that are not part of the application is not supported on systems such as iOS, where sandboxing/security prevents reading pixels of windows not owned by the application.

The grabWindow() function grabs pixels from the screen, not from the window, i.e. if there is another window partially or entirely over the one you grab, you get pixels from the overlying window, too. The mouse cursor is generally not grabbed.

Note on X11 that if the given window doesn't have the same depth as the root window, and another window partially or entirely obscures the one you grab, you will not get pixels from the overlying window. The contents of the obscured areas in the pixmap will be undefined and uninitialized.

On Windows Vista and above grabbing a layered window, which is created by setting the Qt::WA_TranslucentBackground attribute, will not work. Instead grabbing the desktop widget should work.

Warning: In general, grabbing an area outside the screen is not safe. This depends on the underlying window system.

pub unsafe fn grab_window_2a(
    &self,
    window: c_ulonglong,
    x: c_int
) -> CppBox<QPixmap>
[src]

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

Calls C++ function: QPixmap QScreen::grabWindow(unsigned long long window, int x = …).

C++ documentation:

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

The arguments (x, y) specify the offset in the window, whereas (width, height) specify the area to be copied. If width is negative, the function copies everything to the right border of the window. If height is negative, the function copies everything to the bottom of the window.

The window system identifier (WId) can be retrieved using the QWidget::winId() function. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on.

Warning: Grabbing windows that are not part of the application is not supported on systems such as iOS, where sandboxing/security prevents reading pixels of windows not owned by the application.

The grabWindow() function grabs pixels from the screen, not from the window, i.e. if there is another window partially or entirely over the one you grab, you get pixels from the overlying window, too. The mouse cursor is generally not grabbed.

Note on X11 that if the given window doesn't have the same depth as the root window, and another window partially or entirely obscures the one you grab, you will not get pixels from the overlying window. The contents of the obscured areas in the pixmap will be undefined and uninitialized.

On Windows Vista and above grabbing a layered window, which is created by setting the Qt::WA_TranslucentBackground attribute, will not work. Instead grabbing the desktop widget should work.

Warning: In general, grabbing an area outside the screen is not safe. This depends on the underlying window system.

pub unsafe fn grab_window_1a(&self, window: c_ulonglong) -> CppBox<QPixmap>[src]

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

Calls C++ function: QPixmap QScreen::grabWindow(unsigned long long window).

C++ documentation:

Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

The arguments (x, y) specify the offset in the window, whereas (width, height) specify the area to be copied. If width is negative, the function copies everything to the right border of the window. If height is negative, the function copies everything to the bottom of the window.

The window system identifier (WId) can be retrieved using the QWidget::winId() function. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on.

Warning: Grabbing windows that are not part of the application is not supported on systems such as iOS, where sandboxing/security prevents reading pixels of windows not owned by the application.

The grabWindow() function grabs pixels from the screen, not from the window, i.e. if there is another window partially or entirely over the one you grab, you get pixels from the overlying window, too. The mouse cursor is generally not grabbed.

Note on X11 that if the given window doesn't have the same depth as the root window, and another window partially or entirely obscures the one you grab, you will not get pixels from the overlying window. The contents of the obscured areas in the pixmap will be undefined and uninitialized.

On Windows Vista and above grabbing a layered window, which is created by setting the Qt::WA_TranslucentBackground attribute, will not work. Instead grabbing the desktop widget should work.

Warning: In general, grabbing an area outside the screen is not safe. This depends on the underlying window system.

pub unsafe fn is_landscape(&self, orientation: ScreenOrientation) -> bool[src]

Convenience function that returns true if o is either landscape or inverted landscape; otherwise returns false.

Calls C++ function: bool QScreen::isLandscape(Qt::ScreenOrientation orientation) const.

C++ documentation:

Convenience function that returns true if o is either landscape or inverted landscape; otherwise returns false.

Qt::PrimaryOrientation is interpreted as the screen's primaryOrientation().

pub unsafe fn is_portrait(&self, orientation: ScreenOrientation) -> bool[src]

Convenience function that returns true if o is either portrait or inverted portrait; otherwise returns false.

Calls C++ function: bool QScreen::isPortrait(Qt::ScreenOrientation orientation) const.

C++ documentation:

Convenience function that returns true if o is either portrait or inverted portrait; otherwise returns false.

Qt::PrimaryOrientation is interpreted as the screen's primaryOrientation().

pub unsafe fn logical_dots_per_inch(&self) -> c_double[src]

This property holds the number of logical dots or pixels per inch

Calls C++ function: double QScreen::logicalDotsPerInch() const.

C++ documentation:

This property holds the number of logical dots or pixels per inch

This value can be used to convert font point sizes to pixel sizes.

This is a convenience property that's simply the average of the logicalDotsPerInchX and logicalDotsPerInchY properties.

Access functions:

qreal logicalDotsPerInch() const

Notifier signal:

void logicalDotsPerInchChanged(qreal dpi)

See also logicalDotsPerInchX() and logicalDotsPerInchY().

pub unsafe fn logical_dots_per_inch_x(&self) -> c_double[src]

This property holds the number of logical dots or pixels per inch in the horizontal direction

Calls C++ function: double QScreen::logicalDotsPerInchX() const.

C++ documentation:

This property holds the number of logical dots or pixels per inch in the horizontal direction

This value is used to convert font point sizes to pixel sizes.

Access functions:

qreal logicalDotsPerInchX() const

Notifier signal:

void logicalDotsPerInchChanged(qreal dpi)

See also logicalDotsPerInchY().

pub unsafe fn logical_dots_per_inch_y(&self) -> c_double[src]

This property holds the number of logical dots or pixels per inch in the vertical direction

Calls C++ function: double QScreen::logicalDotsPerInchY() const.

C++ documentation:

This property holds the number of logical dots or pixels per inch in the vertical direction

This value is used to convert font point sizes to pixel sizes.

Access functions:

qreal logicalDotsPerInchY() const

Notifier signal:

void logicalDotsPerInchChanged(qreal dpi)

See also logicalDotsPerInchX().

pub unsafe fn manufacturer(&self) -> CppBox<QString>[src]

This property holds the manufacturer of the screen

Calls C++ function: QString QScreen::manufacturer() const.

C++ documentation:

This property holds the manufacturer of the screen

This property was introduced in Qt 5.9.

Access functions:

QString manufacturer() const

pub unsafe fn map_between(
    &self,
    a: ScreenOrientation,
    b: ScreenOrientation,
    rect: impl CastInto<Ref<QRect>>
) -> CppBox<QRect>
[src]

Maps the rect between two screen orientations.

Calls C++ function: QRect QScreen::mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect& rect) const.

C++ documentation:

Maps the rect between two screen orientations.

This will flip the x and y dimensions of the rectangle rect if the orientation a is Qt::PortraitOrientation or Qt::InvertedPortraitOrientation and orientation b is Qt::LandscapeOrientation or Qt::InvertedLandscapeOrientation, or vice versa.

Qt::PrimaryOrientation is interpreted as the screen's primaryOrientation().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QScreen::metaObject() const.

pub unsafe fn model(&self) -> CppBox<QString>[src]

This property holds the model of the screen

Calls C++ function: QString QScreen::model() const.

C++ documentation:

This property holds the model of the screen

This property was introduced in Qt 5.9.

Access functions:

QString model() const

pub unsafe fn name(&self) -> CppBox<QString>[src]

This property holds a user presentable string representing the screen

Calls C++ function: QString QScreen::name() const.

C++ documentation:

This property holds a user presentable string representing the screen

For example, on X11 these correspond to the XRandr screen names, typically "VGA1", "HDMI1", etc.

Access functions:

QString name() const

pub unsafe fn native_orientation(&self) -> ScreenOrientation[src]

This property holds the native screen orientation

Calls C++ function: Qt::ScreenOrientation QScreen::nativeOrientation() const.

C++ documentation:

This property holds the native screen orientation

The native orientation of the screen is the orientation where the logo sticker of the device appears the right way up, or Qt::PrimaryOrientation if the platform does not support this functionality.

The native orientation is a property of the hardware, and does not change.

This property was introduced in Qt 5.2.

Access functions:

Qt::ScreenOrientation nativeOrientation() const

pub unsafe fn orientation(&self) -> ScreenOrientation[src]

This property holds the screen orientation

Calls C++ function: Qt::ScreenOrientation QScreen::orientation() const.

C++ documentation:

This property holds the screen orientation

The screen orientation represents the physical orientation of the display. For example, the screen orientation of a mobile device will change based on how it is being held. A change to the orientation might or might not trigger a change to the primary orientation of the screen.

Changes to this property will be filtered by orientationUpdateMask(), so in order to receive orientation updates the application must first call setOrientationUpdateMask() with a mask of the orientations it wants to receive.

Qt::PrimaryOrientation is never returned.

Access functions:

Qt::ScreenOrientation orientation() const

Notifier signal:

void orientationChanged(Qt::ScreenOrientation orientation)

See also primaryOrientation().

pub unsafe fn orientation_update_mask(&self) -> QFlags<ScreenOrientation>[src]

Returns the currently set orientation update mask.

Calls C++ function: QFlags<Qt::ScreenOrientation> QScreen::orientationUpdateMask() const.

C++ documentation:

Returns the currently set orientation update mask.

See also setOrientationUpdateMask().

pub unsafe fn physical_dots_per_inch(&self) -> c_double[src]

This property holds the number of physical dots or pixels per inch

Calls C++ function: double QScreen::physicalDotsPerInch() const.

C++ documentation:

This property holds the number of physical dots or pixels per inch

This value represents the pixel density on the screen's display. Depending on what information the underlying system provides the value might not be entirely accurate.

This is a convenience property that's simply the average of the physicalDotsPerInchX and physicalDotsPerInchY properties.

Access functions:

qreal physicalDotsPerInch() const

Notifier signal:

void physicalDotsPerInchChanged(qreal dpi)

See also physicalDotsPerInchX() and physicalDotsPerInchY().

pub unsafe fn physical_dots_per_inch_x(&self) -> c_double[src]

This property holds the number of physical dots or pixels per inch in the horizontal direction

Calls C++ function: double QScreen::physicalDotsPerInchX() const.

C++ documentation:

This property holds the number of physical dots or pixels per inch in the horizontal direction

This value represents the actual horizontal pixel density on the screen's display. Depending on what information the underlying system provides the value might not be entirely accurate.

Access functions:

qreal physicalDotsPerInchX() const

Notifier signal:

void physicalDotsPerInchChanged(qreal dpi)

See also physicalDotsPerInchY().

pub unsafe fn physical_dots_per_inch_y(&self) -> c_double[src]

This property holds the number of physical dots or pixels per inch in the vertical direction

Calls C++ function: double QScreen::physicalDotsPerInchY() const.

C++ documentation:

This property holds the number of physical dots or pixels per inch in the vertical direction

This value represents the actual vertical pixel density on the screen's display. Depending on what information the underlying system provides the value might not be entirely accurate.

Access functions:

qreal physicalDotsPerInchY() const

Notifier signal:

void physicalDotsPerInchChanged(qreal dpi)

See also physicalDotsPerInchX().

pub unsafe fn physical_size(&self) -> CppBox<QSizeF>[src]

This property holds the screen's physical size (in millimeters)

Calls C++ function: QSizeF QScreen::physicalSize() const.

C++ documentation:

This property holds the screen's physical size (in millimeters)

The physical size represents the actual physical dimensions of the screen's display.

Depending on what information the underlying system provides the value might not be entirely accurate.

Access functions:

QSizeF physicalSize() const

Notifier signal:

void physicalSizeChanged(const QSizeF &size)

pub unsafe fn primary_orientation(&self) -> ScreenOrientation[src]

This property holds the primary screen orientation

Calls C++ function: Qt::ScreenOrientation QScreen::primaryOrientation() const.

C++ documentation:

This property holds the primary screen orientation

The primary screen orientation is Qt::LandscapeOrientation if the screen geometry's width is greater than or equal to its height, or Qt::PortraitOrientation otherwise. This property might change when the screen orientation was changed (i.e. when the display is rotated). The behavior is however platform dependent and can often be specified in an application manifest file.

Access functions:

Qt::ScreenOrientation primaryOrientation() const

Notifier signal:

void primaryOrientationChanged(Qt::ScreenOrientation orientation)

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QScreen::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QScreen::qt_metacast(const char* arg1).

pub unsafe fn refresh_rate(&self) -> c_double[src]

This property holds the approximate vertical refresh rate of the screen in Hz

Calls C++ function: double QScreen::refreshRate() const.

C++ documentation:

This property holds the approximate vertical refresh rate of the screen in Hz

Access functions:

qreal refreshRate() const

Notifier signal:

void refreshRateChanged(qreal refreshRate)

pub unsafe fn serial_number(&self) -> CppBox<QString>[src]

This property holds the serial number of the screen

Calls C++ function: QString QScreen::serialNumber() const.

C++ documentation:

This property holds the serial number of the screen

This property was introduced in Qt 5.9.

Access functions:

QString serialNumber() const

pub unsafe fn set_orientation_update_mask(
    &self,
    mask: QFlags<ScreenOrientation>
)
[src]

Sets the orientations that the application is interested in receiving updates for in conjunction with this screen.

Calls C++ function: void QScreen::setOrientationUpdateMask(QFlags<Qt::ScreenOrientation> mask).

C++ documentation:

Sets the orientations that the application is interested in receiving updates for in conjunction with this screen.

For example, to receive orientation() updates and thus have orientationChanged() signals being emitted for LandscapeOrientation and InvertedLandscapeOrientation, call setOrientationUpdateMask() with mask set to Qt::LandscapeOrientation | Qt::InvertedLandscapeOrientation.

The default, 0, means no orientationChanged() signals are fired.

See also orientationUpdateMask().

pub unsafe fn size(&self) -> CppBox<QSize>[src]

This property holds the pixel resolution of the screen

Calls C++ function: QSize QScreen::size() const.

C++ documentation:

This property holds the pixel resolution of the screen

Access functions:

QSize size() const

Notifier signal:

void geometryChanged(const QRect &geometry)

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QScreen::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QScreen::trUtf8(const char* s, const char* c, int n).

pub unsafe fn transform_between(
    &self,
    a: ScreenOrientation,
    b: ScreenOrientation,
    target: impl CastInto<Ref<QRect>>
) -> CppBox<QTransform>
[src]

Convenience function to compute a transform that maps from the coordinate system defined by orientation a into the coordinate system defined by orientation b and target dimensions target.

Calls C++ function: QTransform QScreen::transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect& target) const.

C++ documentation:

Convenience function to compute a transform that maps from the coordinate system defined by orientation a into the coordinate system defined by orientation b and target dimensions target.

Example, a is Qt::Landscape, b is Qt::Portrait, and target is QRect(0, 0, w, h) the resulting transform will be such that the point QPoint(0, 0) is mapped to QPoint(0, w), and QPoint(h, w) is mapped to QPoint(0, h). Thus, the landscape coordinate system QRect(0, 0, h, w) is mapped (with a 90 degree rotation) into the portrait coordinate system QRect(0, 0, w, h).

Qt::PrimaryOrientation is interpreted as the screen's primaryOrientation().

pub unsafe fn virtual_geometry(&self) -> CppBox<QRect>[src]

This property holds the pixel geometry of the virtual desktop to which this screen belongs

Calls C++ function: QRect QScreen::virtualGeometry() const.

C++ documentation:

This property holds the pixel geometry of the virtual desktop to which this screen belongs

Returns the pixel geometry of the virtual desktop corresponding to this screen.

This is the union of the virtual siblings' individual geometries.

Access functions:

QRect virtualGeometry() const

Notifier signal:

void virtualGeometryChanged(const QRect &rect)

See also virtualSiblings().

pub unsafe fn virtual_siblings(&self) -> CppBox<QListOfQScreen>[src]

Get the screen's virtual siblings.

Calls C++ function: QList<QScreen*> QScreen::virtualSiblings() const.

C++ documentation:

Get the screen's virtual siblings.

The virtual siblings are the screen instances sharing the same virtual desktop. They share a common coordinate system, and windows can freely be moved or positioned across them without having to be re-created.

pub unsafe fn virtual_size(&self) -> CppBox<QSize>[src]

This property holds the pixel size of the virtual desktop to which this screen belongs

Calls C++ function: QSize QScreen::virtualSize() const.

C++ documentation:

This property holds the pixel size of the virtual desktop to which this screen belongs

Returns the pixel size of the virtual desktop corresponding to this screen.

This is the combined size of the virtual siblings' individual geometries.

Access functions:

QSize virtualSize() const

Notifier signal:

void virtualGeometryChanged(const QRect &rect)

See also virtualSiblings().

Trait Implementations

impl CppDeletable for QScreen[src]

unsafe fn delete(&self)[src]

Destroys the screen.

Calls C++ function: virtual [destructor] void QScreen::~QScreen().

C++ documentation:

Destroys the screen.

impl Deref for QScreen[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QScreen* ptr).

impl DynamicCast<QScreen> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QScreen>[src]

Calls C++ function: QScreen* dynamic_cast<QScreen*>(QObject* ptr).

impl Size for QScreen[src]

unsafe fn size(&self) -> usize[src]

This property holds the pixel resolution of the screen

Calls C++ function: QSize QScreen::size() const.

C++ documentation:

This property holds the pixel resolution of the screen

Access functions:

QSize size() const

Notifier signal:

void geometryChanged(const QRect &geometry)

impl StaticDowncast<QScreen> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QScreen>[src]

Calls C++ function: QScreen* static_cast<QScreen*>(QObject* ptr).

impl StaticUpcast<QObject> for QScreen[src]

unsafe fn static_upcast(ptr: Ptr<QScreen>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QScreen* ptr).

Auto Trait Implementations

impl RefUnwindSafe for QScreen

impl Send for QScreen

impl Sync for QScreen

impl Unpin for QScreen

impl UnwindSafe for QScreen

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.