Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QCompassReading Class

The QCompassReading class represents one reading from a compass. More...

 #include <QCompassReading>

Inherits: QSensorReading.

QCompassReading is instantiated by QML element CompassReading

Properties

Public Functions

qreal azimuth() const
qreal calibrationLevel() const
void setAzimuth(qreal azimuth)
void setCalibrationLevel(qreal calibrationLevel)

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QCompassReading class represents one reading from a compass.

QCompassReading Units

The compass returns the azimuth of the device as degrees from magnetic north in a clockwise direction based on the top of the UI. There is also a value to indicate the calibration status of the device. If the device is not calibrated the azimuth may not be accurate.

Digital compasses are susceptible to magnetic interference and may need calibration after being placed near anything that emits a magnetic force. Accuracy of the compass can be affected by any ferrous materials that are nearby.

The calibration status of the device is measured as a number from 0 to 1. A value of 1 is the highest level that the device can support and 0 is the worst.

See also CS001671 - Calibrating the magnetometer sensor.

Property Documentation

azimuth : const qreal

This property holds the azimuth of the device.

Measured in degrees from magnetic north in a clockwise direction based the top of the UI.

Access functions:

qreal azimuth() const

See also QCompassReading Units.

calibrationLevel : const qreal

This property holds the calibration level of the reading.

Measured as a value from 0 to 1 with higher values being better.

Access functions:

qreal calibrationLevel() const

See also QCompassReading Units and CS001671 - Calibrating the magnetometer sensor.

Member Function Documentation

void QCompassReading::setAzimuth(qreal azimuth)

Sets the azimuth of the device.

See also azimuth() and QCompassReading Units.

void QCompassReading::setCalibrationLevel(qreal calibrationLevel)

Sets the calibration level of the reading to calibrationLevel.

See also calibrationLevel().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web