QGIS API Documentation 3.41.0-Master (181b2f43d8e)
|
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 25 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 49 of file qgsscreenhelper.cpp.
QScreen * QgsScreenHelper::screen | ( | ) |
Returns the screen that the parent widget appears on, or nullptr
.
Definition at line 32 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 41 of file qgsscreenhelper.cpp.