QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
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. More... | |
void | screenDpiChanged (double dpi) |
Emitted whenever the screen dpi associated with the widget is changed. More... | |
Public Member Functions | |
QgsScreenHelper (QWidget *parent) | |
Constructor for QgsScreenHelper for the specified parent widget. More... | |
QRect | availableGeometry () const |
Returns the current screen available geometry in pixels. More... | |
QScreen * | screen () |
Returns the screen that the parent widget appears on, or nullptr . More... | |
double | screenDpi () const |
Returns the current screen DPI for the screen that the parent widget appears on. More... | |
QWindow * | windowHandle () |
Returns the window handle for the window the parent widget is associated with, or nullptr . More... | |
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.