15#ifndef QGSSCREENHELPER_H
16#define QGSSCREENHELPER_H
53 QWindow *windowHandle();
88 bool eventFilter( QObject *watched, QEvent *event )
override;
92 void updateDevicePixelFromScreen();
93 void updateAvailableGeometryFromScreen();
96 QWidget *mWidget =
nullptr;
98 double mScreenDpi = 96.0;
99 QMetaObject::Connection mScreenDpiChangedConnection;
101 QRect mAvailableGeometry;
102 QMetaObject::Connection mAvailableGeometryChangedConnection;
A utility class for dynamic handling of changes to screen properties.
QRect availableGeometry() const
Returns the current screen available geometry in pixels.
double screenDpi() const
Returns the current screen DPI for the screen that the parent widget appears on.
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.