Qt Mobility Reference Documentation

QOrientationReading Class Reference

The QOrientationReading class represents one reading from the orientation sensor. More...

 #include <QOrientationReading>

Inherits QSensorReading.


Public Types

enum Orientation { Undefined, TopUp, TopDown, LeftUp, ..., FaceDown }

Properties


Public Functions

Orientation orientation () const
void setOrientation ( Orientation orientation )

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QOrientationReading class represents one reading from the orientation sensor.

It should be noted that the orientation sensor reports the orientation of the device and not the UI. The orientation of the device will not change just because the UI is rotated.

QOrientationReading Units

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.

To explain the meaning of each value it is helpful to refer to the following diagram.

The orientations are shown here in order: TopUp, TopDown, LeftUp, RightUp, FaceUp, FaceDown.

ConstantValueDescription
QOrientationReading::Undefined0The orientation is unknown.
QOrientationReading::TopUp1The Top edge of the device is pointing up.
QOrientationReading::TopDown2The Top edge of the device is pointing down.
QOrientationReading::LeftUp3The Left edge of the device is pointing up.
QOrientationReading::RightUp4The Right edge of the device is pointing up.
QOrientationReading::FaceUp5The Face of the device is pointing up.
QOrientationReading::FaceDown6The Face of the device is pointing down.

It should be noted that the orientation sensor reports the orientation of the device and not the UI. The orientation of the device will not change just because the UI is rotated.


Property Documentation

orientation : const Orientation

This property holds the orientation of the device.

The unit is an enumeration describing the orientation of the device.

Access functions:

Orientation orientation () const

See also QOrientationReading Units.


Member Function Documentation

void QOrientationReading::setOrientation ( Orientation orientation )

Sets the orientation for the reading.

See also orientation().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.