summaryrefslogtreecommitdiffstats
path: root/tools/qml/deviceorientation_maemo.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-06-04 01:22:28 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-06-04 04:06:25 (GMT)
commitecff296323a81059810a91709f502921bc9277c2 (patch)
tree7208937647145b2e18234aae2d163ee68d92c1fa /tools/qml/deviceorientation_maemo.cpp
parentf6d3753892353e6064fa1fc3c4bf0ba2fad900a6 (diff)
downloadQt-ecff296323a81059810a91709f502921bc9277c2.zip
Qt-ecff296323a81059810a91709f502921bc9277c2.tar.gz
Qt-ecff296323a81059810a91709f502921bc9277c2.tar.bz2
Revert to Portrait/Landscape terminology for Orientation enum, with
additional PortraitInverted and LandscapeInverted values. TopUp etc. only indicates rotation which makes it difficult to resize the window according to whether the device is in Portrait or Landscape orientation.
Diffstat (limited to 'tools/qml/deviceorientation_maemo.cpp')
-rw-r--r--tools/qml/deviceorientation_maemo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp
index 501ff79..7948e2a 100644
--- a/tools/qml/deviceorientation_maemo.cpp
+++ b/tools/qml/deviceorientation_maemo.cpp
@@ -48,11 +48,11 @@ class MaemoOrientation : public DeviceOrientation
Q_OBJECT
public:
MaemoOrientation()
- : DeviceOrientation(),m_current(TopUp), m_lastSeen(TopUp), m_lastSeenCount(0)
+ : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0)
{
m_current = get();
if (m_current == UnknownOrientation)
- m_current = TopUp;
+ m_current = Portrait;
startTimer(100);
}
@@ -101,13 +101,13 @@ private:
if (abs(az) > 850) {
o = UnknownOrientation;
} else if (ax < -750) {
- o = LeftUp;
+ o = Portrait;
} else if (ax > 750) {
- o = RightUp;
+ o = PortraitInverted;
} else if (ay < -750) {
- o = TopUp;
+ o = Landscape;
} else if (ay > 750) {
- o = TopDown;
+ o = LandscapeInverted;
}
return o;