QGIS API Documentation 3.41.0-Master (25ec5511245)
|
Stores properties relating to a screen. More...
#include <qgsscreenproperties.h>
Public Member Functions | |
QgsScreenProperties () | |
Constructor for invalid properties. | |
QgsScreenProperties (const QScreen *screen) | |
Constructor for QgsScreenProperties, copying properties from the specified screen. | |
double | devicePixelRatio () const |
Returns the ratio between physical pixels and device-independent pixels for the screen. | |
bool | isValid () const |
Returns true if the properties are valid. | |
bool | operator!= (const QgsScreenProperties &other) const |
bool | operator== (const QgsScreenProperties &other) const |
double | physicalDpi () const |
This property holds the number of physical dots or pixels per inch. | |
void | setDevicePixelRatio (double ratio) |
Sets the ratio between physical pixels and device-independent pixels for the screen. | |
void | setPhysicalDpi (double dpi) |
Sets number of physical dots or pixels per inch. | |
void | updateRenderContextForScreen (QgsRenderContext &context) const |
Updates the settings in a render context to match the screen settings. | |
Stores properties relating to a screen.
This class is designed to be a publicly constructible, copyable store for the properties available from a QScreen object.
Definition at line 35 of file qgsscreenproperties.h.
|
default |
Constructor for invalid properties.
|
explicit |
Constructor for QgsScreenProperties, copying properties from the specified screen.
Definition at line 23 of file qgsscreenproperties.cpp.
|
inline |
Returns the ratio between physical pixels and device-independent pixels for the screen.
This property holds the screen's ratio between physical pixels and device-independent pixels.
Common values are 1.0 on normal displays and 2.0 on "retina" displays. Higher values are also possible.
Definition at line 77 of file qgsscreenproperties.h.
|
inline |
Returns true
if the properties are valid.
Definition at line 66 of file qgsscreenproperties.h.
|
inline |
Definition at line 58 of file qgsscreenproperties.h.
|
inline |
Definition at line 51 of file qgsscreenproperties.h.
|
inline |
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.
Definition at line 101 of file qgsscreenproperties.h.
void QgsScreenProperties::setDevicePixelRatio | ( | double | ratio | ) |
Sets the ratio between physical pixels and device-independent pixels for the screen.
This property holds the screen's ratio between physical pixels and device-independent pixels.
Common values are 1.0 on normal displays and 2.0 on "retina" displays. Higher values are also possible.
Definition at line 33 of file qgsscreenproperties.cpp.
void QgsScreenProperties::setPhysicalDpi | ( | double | dpi | ) |
Sets 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.
Definition at line 39 of file qgsscreenproperties.cpp.
void QgsScreenProperties::updateRenderContextForScreen | ( | QgsRenderContext & | context | ) | const |
Updates the settings in a render context to match the screen settings.
Definition at line 45 of file qgsscreenproperties.cpp.