diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-04-26 14:46:05 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-29 11:11:37 +0200 |
commit | f3973cbd077d2d92250958f8bda57fea30827f00 (patch) | |
tree | 13677d6b3a1852f05003e23651dc87595817eabc /src/quick/items/qquickscreen_p.h | |
parent | 8704006b87ada76b3c05420b479491b95ff73a30 (diff) |
Add more geometry properties to the Screen attached property
desktopAvailableHeight is useful for positioning windows, and
logicalPixelDensity is useful for ensuring that touch controls are
a reasonable size even on very high-resolution displays.
Change-Id: Id777caf6cef1df5bc01757605e3085151170760b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/quick/items/qquickscreen_p.h')
-rw-r--r-- | src/quick/items/qquickscreen_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h index 98f38b7154..7ce035a93d 100644 --- a/src/quick/items/qquickscreen_p.h +++ b/src/quick/items/qquickscreen_p.h @@ -58,16 +58,24 @@ class Q_AUTOTEST_EXPORT QQuickScreenAttached : public QObject { Q_OBJECT + Q_PROPERTY(QString name READ name CONSTANT REVISION 1); Q_PROPERTY(int width READ width NOTIFY widthChanged) Q_PROPERTY(int height READ height NOTIFY heightChanged) + 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(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged) Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged) public: QQuickScreenAttached(QObject* attachee); + QString name() const; int width() const; int height() const; + int desktopAvailableWidth() const; + int desktopAvailableHeight() const; + qreal logicalPixelDensity() const; Qt::ScreenOrientation primaryOrientation() const; Qt::ScreenOrientation orientation() const; @@ -79,6 +87,8 @@ public: Q_SIGNALS: void widthChanged(); void heightChanged(); + Q_REVISION(1) void desktopGeometryChanged(); + Q_REVISION(1) void logicalPixelDensityChanged(); void primaryOrientationChanged(); void orientationChanged(); |