QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
A utility class for dynamic handling of changes to screen properties. More...
#include <qgsscreenhelper.h>
Signals | |
void | availableGeometryChanged (const QRect &geometry) |
Emitted whenever the available geometry of the screen associated with the widget is changed. | |
void | screenDpiChanged (double dpi) |
Emitted whenever the screen dpi associated with the widget is changed. | |
Public Member Functions | |
QgsScreenHelper (QWidget *parent) | |
Constructor for QgsScreenHelper for the specified parent widget. | |
QRect | availableGeometry () const |
Returns the current screen available geometry in pixels. | |
QScreen * | screen () |
Returns the screen that the parent widget appears on, or nullptr . | |
double | screenDpi () const |
Returns the current screen DPI for the screen that the parent widget appears on. | |
QWindow * | windowHandle () |
Returns the window handle for the window the parent widget is associated with, or nullptr . | |
Protected Member Functions | |
bool | eventFilter (QObject *watched, QEvent *event) override |
A utility class for dynamic handling of changes to screen properties.
Definition at line 35 of file qgsscreenhelper.h.
QgsScreenHelper::QgsScreenHelper | ( | QWidget * | parent | ) |
Constructor for QgsScreenHelper for the specified parent widget.
Definition at line 24 of file qgsscreenhelper.cpp.
|
inline |
Returns the current screen available geometry in pixels.
The available geometry is the geometry excluding window manager reserved areas such as task bars and system menus.
Definition at line 70 of file qgsscreenhelper.h.
|
signal |
Emitted whenever the available geometry of the screen associated with the widget is changed.
|
overrideprotected |
Definition at line 48 of file qgsscreenhelper.cpp.
QScreen * QgsScreenHelper::screen | ( | ) |
Returns the screen that the parent widget appears on, or nullptr
.
Definition at line 31 of file qgsscreenhelper.cpp.
|
inline |
Returns the current screen DPI for the screen that the parent widget appears on.
Definition at line 61 of file qgsscreenhelper.h.
|
signal |
Emitted whenever the screen dpi associated with the widget is changed.
QWindow * QgsScreenHelper::windowHandle | ( | ) |
Returns the window handle for the window the parent widget is associated with, or nullptr
.
Definition at line 40 of file qgsscreenhelper.cpp.