QGeoPositionInfo
#include <QtLocationSubset/QGeoPositionInfo>
The QGeoPositionInfo class contains information gathered on a global position, direction and velocity at a particular point in time.
1.0
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.
Public Types Index
enum AttributeDirection, GroundSpeed, VerticalSpeed, MagneticVariation, HorizontalAccuracy, VerticalAccuracy |
Public Functions Index
| QGeoPositionInfo () | |
| QGeoPositionInfo (const QGeoCoordinate &coordinate, const QDateTime &updateTime) | |
| QGeoPositionInfo (const QGeoPositionInfo &other) | |
| ~QGeoPositionInfo () | |
| QGeoPositionInfo & | operator= (const QGeoPositionInfo &other) |
| bool | operator== (const QGeoPositionInfo &other) const |
| bool | operator!= (const QGeoPositionInfo &other) const |
| bool | isValid () const |
| void | setTimestamp (const QDateTime ×tamp) |
| QDateTime | timestamp () const |
| void | setCoordinate (const QGeoCoordinate &coordinate) |
| QGeoCoordinate | coordinate () const |
| void | setAttribute (Attribute attribute, qreal value) |
| qreal | attribute (Attribute attribute) const |
| void | removeAttribute (Attribute attribute) |
| bool | hasAttribute (Attribute attribute) const |
Public Types
Defines the attributes for positional information.
Direction The bearing to true north from the direction of travel, in degrees. GroundSpeed The ground speed, in meters/sec. VerticalSpeed The vertical speed, in meters/sec. MagneticVariation The 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. HorizontalAccuracy The accuracy of the provided latitude-longitude value, in meters. VerticalAccuracy The accuracy of the provided altitude value, in meters.
- Direction
- GroundSpeed
- VerticalSpeed
- MagneticVariation
- HorizontalAccuracy
- VerticalAccuracy
Public Functions
Creates a QGeoPositionInfo for the given coordinate and timestamp.
Creates a QGeoPositionInfo with the values of other.
Destructor.
QGeoPositionInfo &
Assigns the values from other to this QGeoPositionInfo.
bool
Returns true if all of this object's values are the same as those of other.
bool
Returns true if any of this object's values are not the same as those of other.
bool
Returns true if the timestamp() and coordinate() values are both valid.
QGeoCoordinate::isValid(), QDateTime::isValid()
void
Sets the date and time at which this position was reported to timestamp.
The timestamp must be in UTC time.
QDateTime
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.
QGeoCoordinate
Returns the coordinate for this position.
Returns an invalid coordinate if no coordinate has been set.
qreal
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.
void
Removes the specified attribute and its value.
bool
Returns true if the specified attribute is present for this QGeoPositionInfo object.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.