IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAccelerometerReading Class

The QAccelerometerReading class reports on linear acceleration along the X, Y and Z axes.

This class was introduced in Qt 5.1.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAccelerometerReading Class

  • Header: QAccelerometerReading

  • Since: Qt 5.1

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Sensors)

    target_link_libraries(mytarget PRIVATE Qt6::Sensors)

  • qmake: QT += sensors

  • Inherits: QSensorReading

  • Group: QAccelerometerReading is part of sensors_reading

Detailed Description

 

QAccelerometerReading Units

The scale of the values is meters per second squared. The axes are arranged as follows.

Image non disponible

A monoblock device sitting at rest, face up on a desk will experience a force of approximately 9.8 on the Z axis (ie. towards the roof). This is the proper acceleration the device experiences relative to freefall.

Property Documentation

 

[read-only] x : const qreal

This property holds the acceleration on the X axis.

The scale of the values is meters per second squared.

Access functions:

  • qreal x() const

See Also

[read-only] y : const qreal

This property holds the acceleration on the Y axis.

The scale of the values is meters per second squared.

Access functions:

  • qreal y() const

See Also

[read-only] z : const qreal

This property holds the acceleration on the Z axis.

The scale of the values is meters per second squared.

Access functions:

  • qreal z() const

See Also

Member Function Documentation

 

void QAccelerometerReading::setX(qreal x)

Sets the acceleration on the X axis to x.

See Also

See also x()

void QAccelerometerReading::setY(qreal y)

Sets the acceleration on the Y axis to y.

See Also

See also y()

void QAccelerometerReading::setZ(qreal z)

Sets the acceleration on the Z axis to z.

See Also

See also z()

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+