Public Types | Signals | Public Member Functions | Properties

MeeGo::QmOrientation Class Reference

Provides information on device orientation. More...

#include <qmorientation.h>

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

List of all members.

Public Types

enum  Orientation {
  Undefined = 0, BottomUp, BottomDown, LeftUp,
  RightUp, FaceDown, FaceUp
}

Signals

void orientationChanged (const MeeGo::QmOrientationReading orientation)

Public Member Functions

 QmOrientation (QObject *parent=0)
 ~QmOrientation ()
QmOrientationReading orientation ()
int threshold ()
void setThreshold (int value)

Properties

QmOrientationReading orientation
int threshold

Detailed Description

Provides information on device orientation.

Scope:
Internal

Orientation is given as the side of the device with the strongest negative acceleration. Threshold value can be used to control the sensitivity of state change. setThreshold()

Device side naming:


                          Top


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


              Bottom

       

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

Definition at line 81 of file qmorientation.h.


Member Enumeration Documentation

Enumerated states for possible orientations.

Enumerator:
Undefined 

Orientation is unknown.

BottomUp 

Device bottom is up

BottomDown 

Device bottom is down

LeftUp 

Device left side is up

RightUp 

Device right side is up

FaceDown 

Device face is down

FaceUp 

Device face is up

Definition at line 92 of file qmorientation.h.


Constructor & Destructor Documentation

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

Constructor

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

Destructor


Member Function Documentation

QmOrientationReading MeeGo::QmOrientation::orientation (  ) 

Gets the current device orientation.

Returns:
Current device orientation
void MeeGo::QmOrientation::orientationChanged ( const MeeGo::QmOrientationReading  orientation  )  [signal]

Sent when the device orientation has changed.

Parameters:
orientation Current device orientation
void MeeGo::QmOrientation::setThreshold ( int  value  ) 

Sets the threshold value for the algorithm. Threshold value controls the sensitivity of orientation change. Value is given in mG. Orientation is considered to have changed whenever measured acceleration towards new orientation is stronger than acceleration towards previous orientation by the amount of threshold.

Low threshold provides more sensitivity, high threshold value provides more stability.

Current default is 50 mG.

Parameters:
value Threshold value to set
int MeeGo::QmOrientation::threshold (  ) 

Gets the currently used threshold value. Value is in mG. See setThreshold()

Returns:
Current threshold value

Property Documentation

QmOrientationReading MeeGo::QmOrientation::orientation [read]

Definition at line 83 of file qmorientation.h.

int MeeGo::QmOrientation::threshold [read, write]

Definition at line 84 of file qmorientation.h.


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