Home · All Classes · All Functions ·

QTapReading Class Reference

The QTapReading class represents one reading from the tap sensor. More...

    #include <QTapReading>

This class is under development and is subject to change.

Inherits QSensorReading.


Public Types

enum TapDirection { Undefined, X, Y, Z, ..., Z_Neg }

Properties


Public Functions

bool isDoubleTap () const
void setDoubleTap ( bool doubleTap )
void setTapDirection ( TapDirection tapDirection )
TapDirection tapDirection () const

Additional Inherited Members


Detailed Description

The QTapReading class represents one reading from the tap sensor.

The tap sensor registers tap and double tap events in one of the six directions. There are 3 axes that originate from the phone. They are arranged as follows.

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

Member Type Documentation

enum QTapReading::TapDirection

The tap direction is reported as one of the six directions (X, Y, Z, positive and negative). There are 3 flags that you can use if you only care about the axis in use.

ConstantValueDescription
QTapReading::Undefined0This value means that the direction is unknown.
QTapReading::X0x0001This flag is set if the tap was along the X axis.
QTapReading::Y0x0002This flag is set if the tap was along the Y axis.
QTapReading::Z0x0004This flag is set if the tap was along the Z axis.
QTapReading::X_Pos0x0011This value is returned if the tap was towards the positive X direction.
QTapReading::Y_Pos0x0022This value is returned if the tap was towards the positive Y direction.
QTapReading::Z_Pos0x0044This value is returned if the tap was towards the positive Z direction.
QTapReading::X_Neg0x0101This value is returned if the tap was towards the negative X direction.
QTapReading::Y_Neg0x0202This value is returned if the tap was towards the negative Y direction.
QTapReading::Z_Neg0x0404This value is returned if the tap was towards the negative Z direction.


Property Documentation

doubleTap : const bool

This property holds a value indicating if there was a single or double tap.

Access functions:

bool isDoubleTap () const

tapDirection : const TapDirection

This property holds the direction of the tap.

Access functions:

TapDirection tapDirection () const

See also TapDirection.


Member Function Documentation

void QTapReading::setDoubleTap ( bool doubleTap )

Sets the double tap status of the reading to doubleTap.

See also isDoubleTap().

void QTapReading::setTapDirection ( TapDirection tapDirection )

Sets the tap direction to tapDirection.

See also tapDirection().


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.0