Signals | Public Member Functions

MeeGo::QmRotation Class Reference

Provides device rotation measurements. More...

#include <qmrotation.h>

Inheritance diagram for MeeGo::QmRotation:
Inheritance graph
[legend]
Collaboration diagram for MeeGo::QmRotation:
Collaboration graph
[legend]

List of all members.

Signals

void dataAvailable (const MeeGo::QmRotationReading &data)

Public Member Functions

 QmRotation (QObject *parent=0)
 ~QmRotation ()
QmRotationReading rotation ()
bool hasZ ()

Detailed Description

Provides device rotation measurements.

Scope:
Internal

Device rotation is given in degrees of rotation around each device axis.

X-rotation is limited to half-sphere in order to avoid ambiguous situations. Z-Rotation might not be available on all devices. If not available, the value will be 0. Availability can be checked with hasZ() function.

Axis directions are best described with image. For further details on axis alignment, see QmAccelerometer.



                     +z
                      |
                      |      +y
                      |     /
                      |----/----
                     /| NOKIA  /|
                    //|--/--- / |
                   // | /   //  /
                  //  |/   //  /
                 //   '--------------- +x
                //       //  /
               //       //  /
              /---------/  /
             /    O    /  /
            /         /  /
            ----------  /
            |_________!/


              Bottom

       

To get measurements from the daemon, the client must open a session and call start(). Details can be found from documentation of QmSensor.

Definition at line 102 of file qmrotation.h.


Constructor & Destructor Documentation

MeeGo::QmRotation::QmRotation ( QObject *  parent = 0  ) 

Constructor

Parameters:
parent Parent QObject.
MeeGo::QmRotation::~QmRotation (  ) 

Destructor


Member Function Documentation

void MeeGo::QmRotation::dataAvailable ( const MeeGo::QmRotationReading data  )  [signal]

Signals the availability of new measurement data from the sensor.

Parameters:
data Available measurement data
bool MeeGo::QmRotation::hasZ (  ) 

Tells whether the z-axis rotation is calculated. The z-axis calculations rely on having magnetometer/gyroscope on the device, and might not thus be available on all devices.

Returns:
Bool true if z-axis is calculated, false otherwise
QmRotationReading MeeGo::QmRotation::rotation (  ) 

Gets the previous measured rotation.

Returns:
Previous measured rotation, or XYZ(0,0,0,0) if no session is open

The documentation for this class was generated from the following file: