Home · All Classes · All Functions ·

QOrientationReading Class Reference

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.


Public Types

enum Orientation { Undefined, BottomUp, BottomDown, LeftUp, ..., FaceUp }

Properties


Public Functions

Orientation orientation () const
void setOrientation ( Orientation orientation )

Additional Inherited Members


Detailed Description

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.


Member Type Documentation

enum QOrientationReading::Orientation

This enum represents the orientation of the device.

The parts of the phone are defined as follows.

                        Top


                ----------
               /  NOKIA  /|
              /-------- / |
             //       //  /
            //       //  /
    Left   //  Face //  /    Right
          //       //  /
         //       //  /
        /---------/  /
       /    O    /  /
      /         /  /
      ----------  /
      |_________!/


        Bottom

ConstantValueDescription
QOrientationReading::Undefined0The orientation is unknown.
QOrientationReading::BottomUp1The device is upside down.
QOrientationReading::BottomDown2The device is the right way up.
QOrientationReading::LeftUp3The device has been rotated clockwise.
QOrientationReading::RightUp4The device has been rotated counter-clockwise.
QOrientationReading::FaceDown5The screen is facing down.
QOrientationReading::FaceUp6The screen is facing up.


Property Documentation

orientation : const Orientation

This property holds the orientation of the device.

Access functions:

Orientation orientation () const

Member Function Documentation

void QOrientationReading::setOrientation ( Orientation orientation )

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