![]() |
Home · All Classes · All Functions · | ![]() |
The QOrientationReading class represents one reading from the orientation sensor. More...
#include <QOrientationReading>
This class is under development and is subject to change.
Inherits QSensorReading.
| enum | Orientation { Undefined, BottomUp, BottomDown, LeftUp, ..., FaceUp } |
| Orientation | orientation () const |
| void | setOrientation ( Orientation orientation ) |
The QOrientationReading class represents one reading from the orientation sensor.
The orientation sensor returns the orientation of the device using the pre-defined values found in the QOrientationReading::Orientation enum.
This enum represents the orientation of the device.
The parts of the phone are defined as follows.
Top
----------
/ NOKIA /|
/-------- / |
// // /
// // /
Left // Face // / Right
// // /
// // /
/---------/ /
/ O / /
/ / /
---------- /
|_________!/
Bottom
| Constant | Value | Description |
|---|---|---|
| QOrientationReading::Undefined | 0 | The orientation is unknown. |
| QOrientationReading::BottomUp | 1 | The device is upside down. |
| QOrientationReading::BottomDown | 2 | The device is the right way up. |
| QOrientationReading::LeftUp | 3 | The device has been rotated clockwise. |
| QOrientationReading::RightUp | 4 | The device has been rotated counter-clockwise. |
| QOrientationReading::FaceDown | 5 | The screen is facing down. |
| QOrientationReading::FaceUp | 6 | The screen is facing up. |
This property holds the orientation of the device.
Access functions:
| Orientation | orientation () const |
Sets the orientation for the reading.
See also orientation().
| Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 |