summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-11-04 23:30:50 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:55:36 +0100
commit05d0f60ebefaeb7721ac572f1253c2c7b2f42dec (patch)
treead17a2dfe7d882b9dcb3db6f3d1f4527c573a966 /src/plugins/platforms/ios/qiosscreen.h
parent44c3ef790e6105b913b514dfda64fd5957df78af (diff)
iOS: Flesh out initial QPlatformScreen implementation
We check the device's model identifier to tweak the screen values based on the precense of older iPhone/iPod touch models, or the iPad Mini. This does not work when running under the simulator, which reports its model identifier as the architecture of the host platform. There doesn't appear to be any APIs to get the simulated device of the simulator, but if this becomes an issue we can always look at the UIDevice model and screen resolution and apply a few heuristics. We do not update the screen geometry on orientation-changes. This matches what UIScreen reports for bounds, but may not be the most intuitive solution from a Qt perspective compared to the way other platform-plugins work. Change-Id: I74783e053601de9ce805f8b52b944c116f9a1e3e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.h')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.h b/src/plugins/platforms/ios/qiosscreen.h
index 98771b9ac2..8af7779f9d 100644
--- a/src/plugins/platforms/ios/qiosscreen.h
+++ b/src/plugins/platforms/ios/qiosscreen.h
@@ -52,24 +52,21 @@ class QIOSScreen : public QPlatformScreen
{
public:
QIOSScreen(unsigned int screenIndex);
- ~QIOSScreen();
enum ScreenIndex { MainScreen = 0 };
- QRect geometry() const { return m_geometry; }
- int depth() const { return m_depth; }
- QImage::Format format() const { return m_format; }
- QSizeF physicalSize() const { return m_physicalSize; }
+ QRect geometry() const;
+ int depth() const;
+ QImage::Format format() const;
+ QSizeF physicalSize() const;
UIScreen *uiScreen() const;
- void updateInterfaceOrientation();
private:
UIScreen *m_uiScreen;
QRect m_geometry;
int m_depth;
- QImage::Format m_format;
- QSize m_physicalSize;
+ QSizeF m_physicalSize;
};
QT_END_NAMESPACE