diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-10-25 15:16:46 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-26 01:52:10 +0200 |
commit | cca9522e7ca0c040ae354b20f09983005ef955bd (patch) | |
tree | c3b728631f0d167c4c57041cb19b7d90df40a0d1 /src/quick/items/qquickscreen_p.h | |
parent | b3bff5bb3c8ee0e1c45d20d04b1c3c0236aa9d38 (diff) |
Screen attached property: expose pixelDensity property
Because logicalPixelDensity is different than physical density on
multiple platforms, having the actual density is critical to be able
to design resolution-independent controls.
Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/quick/items/qquickscreen_p.h')
-rw-r--r-- | src/quick/items/qquickscreen_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h index 0f1e79b1a2..6f837eea14 100644 --- a/src/quick/items/qquickscreen_p.h +++ b/src/quick/items/qquickscreen_p.h @@ -64,6 +64,7 @@ class Q_AUTOTEST_EXPORT QQuickScreenAttached : public QObject Q_PROPERTY(int desktopAvailableWidth READ desktopAvailableWidth NOTIFY desktopGeometryChanged REVISION 1) Q_PROPERTY(int desktopAvailableHeight READ desktopAvailableHeight NOTIFY desktopGeometryChanged REVISION 1) Q_PROPERTY(qreal logicalPixelDensity READ logicalPixelDensity NOTIFY logicalPixelDensityChanged REVISION 1) + Q_PROPERTY(qreal pixelDensity READ pixelDensity NOTIFY pixelDensityChanged) Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged) Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged) @@ -76,6 +77,7 @@ public: int desktopAvailableWidth() const; int desktopAvailableHeight() const; qreal logicalPixelDensity() const; + qreal pixelDensity() const; Qt::ScreenOrientation primaryOrientation() const; Qt::ScreenOrientation orientation() const; @@ -90,6 +92,7 @@ Q_SIGNALS: void heightChanged(); Q_REVISION(1) void desktopGeometryChanged(); Q_REVISION(1) void logicalPixelDensityChanged(); + Q_REVISION(2) void pixelDensityChanged(); void primaryOrientationChanged(); void orientationChanged(); |