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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QGeoPositionInfo Class Reference

The QGeoPositionInfo class contains information gathered on a global position, direction and velocity at a particular point in time. More...

 #include <QGeoPositionInfo>

This class was introduced in Qt Mobility 1.0.

Public Types

enum Attribute { Direction, GroundSpeed, VerticalSpeed, MagneticVariation, HorizontalAccuracy, VerticalAccuracy }

Public Functions

QGeoPositionInfo ()
QGeoPositionInfo ( const QGeoCoordinate & coordinate, const QDateTime & timestamp )
QGeoPositionInfo ( const QGeoPositionInfo & other )
~QGeoPositionInfo ()
qreal attribute ( Attribute attribute ) const
QGeoCoordinate coordinate () const
bool hasAttribute ( Attribute attribute ) const
bool isValid () const
void removeAttribute ( Attribute attribute )
void setAttribute ( Attribute attribute, qreal value )
void setCoordinate ( const QGeoCoordinate & coordinate )
void setTimestamp ( const QDateTime & timestamp )
QDateTime timestamp () const
bool operator!= ( const QGeoPositionInfo & other ) const
QGeoPositionInfo & operator= ( const QGeoPositionInfo & other )
bool operator== ( const QGeoPositionInfo & other ) const

Related Non-Members

QDataStream & operator<< ( QDataStream & stream, const QGeoPositionInfo & info )
QDataStream & operator>> ( QDataStream & stream, QGeoPositionInfo & info )

Detailed Description

The QGeoPositionInfo class contains information gathered on a global position, direction and velocity at a particular point in time.

A QGeoPositionInfo contains, at a minimum, a geographical coordinate and a timestamp. It may also have heading and speed measurements as well as estimates of the accuracy of the provided data.

See also QGeoPositionInfoSource.

Member Type Documentation

enum QGeoPositionInfo::Attribute

Defines the attributes for positional information.

ConstantValueDescription
QGeoPositionInfo::Direction0The bearing to true north from the direction of travel, in degrees.
QGeoPositionInfo::GroundSpeed1The ground speed, in metres/sec.
QGeoPositionInfo::VerticalSpeed2The vertical speed, in metres/sec.
QGeoPositionInfo::MagneticVariation3The angle between the horizontal component of the magnetic field and true north, in degrees. Also known as magnetic declination. A positive value indicates a clockwise direction from true north and a negative value indicates a counter-clockwise direction.
QGeoPositionInfo::HorizontalAccuracy4The accuracy of the provided latitude-longitude value, in metres.
QGeoPositionInfo::VerticalAccuracy5The accuracy of the provided altitude value, in metres.

Member Function Documentation

QGeoPositionInfo::QGeoPositionInfo ()

Creates an invalid QGeoPositionInfo object.

See also isValid().

QGeoPositionInfo::QGeoPositionInfo ( const QGeoCoordinate & coordinate, const QDateTime & timestamp )

Creates a QGeoPositionInfo for the given coordinate and timestamp.

This function was introduced in Qt Mobility 1.0.

QGeoPositionInfo::QGeoPositionInfo ( const QGeoPositionInfo & other )

Creates a QGeoPositionInfo with the values of other.

This function was introduced in Qt Mobility 1.0.

QGeoPositionInfo::~QGeoPositionInfo ()

Destroys a QGeoPositionInfo object.

qreal QGeoPositionInfo::attribute ( Attribute attribute ) const

Returns the value of the specified attribute as a qreal value.

Returns -1 if the value has not been set, although this may also be a legitimate value for some attributes.

The function hasAttribute() should be used to determine whether or not a value has been set for an attribute.

This function was introduced in Qt Mobility 1.0.

See also hasAttribute() and setAttribute().

QGeoCoordinate QGeoPositionInfo::coordinate () const

Returns the coordinate for this position.

Returns an invalid coordinate if no coordinate has been set.

This function was introduced in Qt Mobility 1.0.

See also setCoordinate().

bool QGeoPositionInfo::hasAttribute ( Attribute attribute ) const

Returns true if the specified attribute is present for this QGeoPositionInfo object.

This function was introduced in Qt Mobility 1.0.

bool QGeoPositionInfo::isValid () const

Returns true if the timestamp() and coordinate() values are both valid.

This function was introduced in Qt Mobility 1.0.

See also QGeoCoordinate::isValid() and QDateTime::isValid().

void QGeoPositionInfo::removeAttribute ( Attribute attribute )

Removes the specified attribute and its value.

This function was introduced in Qt Mobility 1.0.

void QGeoPositionInfo::setAttribute ( Attribute attribute, qreal value )

Sets the value for attribute to value.

This function was introduced in Qt Mobility 1.0.

See also attribute().

void QGeoPositionInfo::setCoordinate ( const QGeoCoordinate & coordinate )

Sets the coordinate for this position to coordinate.

This function was introduced in Qt Mobility 1.0.

See also coordinate().

void QGeoPositionInfo::setTimestamp ( const QDateTime & timestamp )

Sets the date and time at which this position was reported to timestamp.

The timestamp must be in UTC time.

This function was introduced in Qt Mobility 1.0.

See also timestamp().

QDateTime QGeoPositionInfo::timestamp () const

Returns the date and time at which this position was reported, in UTC time.

Returns an invalid QDateTime if no date/time value has been set.

This function was introduced in Qt Mobility 1.0.

See also setTimestamp().

bool QGeoPositionInfo::operator!= ( const QGeoPositionInfo & other ) const

Returns true if any of this object's values are not the same as those of other.

This function was introduced in Qt Mobility 1.0.

QGeoPositionInfo & QGeoPositionInfo::operator= ( const QGeoPositionInfo & other )

Assigns the values from other to this QGeoPositionInfo.

This function was introduced in Qt Mobility 1.0.

bool QGeoPositionInfo::operator== ( const QGeoPositionInfo & other ) const

Returns true if all of this object's values are the same as those of other.

This function was introduced in Qt Mobility 1.0.

Related Non-Members

QDataStream & operator<< ( QDataStream & stream, const QGeoPositionInfo & info )

Writes the given info to the specified stream.

This function was introduced in Qt Mobility 1.0.

See also Serializing Qt Data Types.

QDataStream & operator>> ( QDataStream & stream, QGeoPositionInfo & info )

Reads a coordinate from the specified stream into the given info.

This function was introduced in Qt Mobility 1.0.

See also Serializing Qt Data Types.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 26
  2. «Le projet de loi des droits du développeur» : quelles conditions doivent remplir les entreprises pour que le développeur puisse réussir ? 60
  3. Une nouvelle ère d'IHM 3D pour les automobiles, un concept proposé par Digia et implémenté avec Qt 3
  4. Qt Creator 2.5 est sorti en beta, l'EDI supporte maintenant plus de fonctionnalités de C++11 2
  5. PySide devient un add-on Qt et rejoint le Qt Project et le modèle d'open gouvernance 1
  6. Vingt sociétés montrent leurs décodeurs basés sur Qt au IPTV World Forum, en en exploitant diverses facettes (déclaratif, Web, widgets) 0
  7. Thread travailleur avec Qt en utilisant les signaux et les slots, un article de Christophe Dumez traduit par Thibaut Cuvelier 1
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 97
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 50
  4. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 26
  5. «Le projet de loi des droits du développeur» : quelles conditions doivent remplir les entreprises pour que le développeur puisse réussir ? 57
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le Qt Labs au hasard

Logo

Qt et Box2D c'est facile

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.2
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