path: root/src/gui/kernel/qplatformscreen_qpa.h
diff options
authorSamuel Rødal <>2011-09-30 14:25:43 +0200
committerQt by Nokia <>2011-10-06 09:36:39 +0200
commit7d2cfbe5aa1e67d12010a66481625c9d40f0c174 (patch)
tree26734132827c40ba425d79481c2c4193bac5c5ea /src/gui/kernel/qplatformscreen_qpa.h
parent29948e666583a26966ddb97faf4808099824b80d (diff)
Improved logical and physical DPI APIs.
Made physicalSize() return QSizeF instead, to prevent rounding errors. Added logicalSize() as the base to compute font pixel sizes instead, and added convenience functions in QScreen to access the logical and physical sizes and DPI metrics. Task-number: QTBUG-21736 Task-number: QTBUG-21737 Change-Id: Ic705dc98eb3632617659e65a0c9a552673dc0c65 Reviewed-on: Reviewed-by: Qt Sanity Bot <> Reviewed-by: Friedemann Kleint <>
Diffstat (limited to 'src/gui/kernel/qplatformscreen_qpa.h')
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformscreen_qpa.h b/src/gui/kernel/qplatformscreen_qpa.h
index 7c20fba0ba..6917d5eca5 100644
--- a/src/gui/kernel/qplatformscreen_qpa.h
+++ b/src/gui/kernel/qplatformscreen_qpa.h
@@ -67,6 +67,8 @@ class QPlatformWindow;
class QScreen;
class QSurfaceFormat;
+typedef QPair<qreal, qreal> QDpi;
class Q_GUI_EXPORT QPlatformScreenPageFlipper : public QObject
@@ -93,7 +95,9 @@ public:
virtual int depth() const = 0;
virtual QImage::Format format() const = 0;
- virtual QSize physicalSize() const;
+ virtual QSizeF physicalSize() const;
+ virtual QDpi logicalDpi() const;
virtual QWindow *topLevelAt(const QPoint &point) const;
virtual QList<QPlatformScreen *> virtualSiblings() const;