Provides device rotation measurements. More...
#include <qmrotation.h>
Signals | |
void | dataAvailable (const MeeGo::QmRotationReading &data) |
Public Member Functions | |
QmRotation (QObject *parent=0) | |
~QmRotation () | |
QmRotationReading | rotation () |
bool | hasZ () |
Provides device rotation measurements.
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.
MeeGo::QmRotation::QmRotation | ( | QObject * | parent = 0 |
) |
Constructor
parent | Parent QObject. |
MeeGo::QmRotation::~QmRotation | ( | ) |
Destructor
void MeeGo::QmRotation::dataAvailable | ( | const MeeGo::QmRotationReading & | data | ) | [signal] |
Signals the availability of new measurement data from the sensor.
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.
true
if z-axis is calculated, false
otherwise QmRotationReading MeeGo::QmRotation::rotation | ( | ) |
Gets the previous measured rotation.