From 92252bcb93b2e8ba8cefeadf8cc0330c8ff1c47b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 15 Nov 2012 13:06:22 +0100 Subject: iOS: let QIOSScreen start/stop listening for device orientation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From the qpa docs, we only need to listen for device orientation if orientationUpdateMask is non-zero Change-Id: Id5e828cdff9a08794c8a029e11763cc037e1b959 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosscreen.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforms/ios/qiosscreen.h') diff --git a/src/plugins/platforms/ios/qiosscreen.h b/src/plugins/platforms/ios/qiosscreen.h index f17f1c1d70..ed21e54f4a 100644 --- a/src/plugins/platforms/ios/qiosscreen.h +++ b/src/plugins/platforms/ios/qiosscreen.h @@ -45,6 +45,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -52,6 +53,7 @@ class QIOSScreen : public QPlatformScreen { public: QIOSScreen(unsigned int screenIndex); + ~QIOSScreen(); enum ScreenIndex { MainScreen = 0 }; @@ -61,6 +63,10 @@ public: QImage::Format format() const; QSizeF physicalSize() const; + Qt::ScreenOrientation nativeOrientation() const; + Qt::ScreenOrientation orientation() const; + void setOrientationUpdateMask(Qt::ScreenOrientations mask); + UIScreen *uiScreen() const; private: @@ -68,6 +74,7 @@ private: QRect m_geometry; int m_depth; QSizeF m_physicalSize; + QIOSOrientationListener *m_orientationListener; }; QT_END_NAMESPACE -- cgit v1.2.3