内容表

上一话题

QGeoPolygon

下一话题

QGeoPositionInfoSource

QGeoPositionInfo

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

Inheritance diagram of PySide2.QtPositioning.QGeoPositionInfo

概要

函数

详细描述

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.

class QGeoPositionInfo

QGeoPositionInfo(coordinate, updateTime)

QGeoPositionInfo(other)

param updateTime

QDateTime

param coordinate

QGeoCoordinate

param other

QGeoPositionInfo

Creates an invalid QGeoPositionInfo 对象。

另请参阅

isValid()

创建 QGeoPositionInfo 为给定 coordinate and timestamp .

PySide2.QtPositioning.QGeoPositionInfo. 属性

Defines the attributes for positional information.

常量

描述

QGeoPositionInfo.Direction

The bearing measured in degrees clockwise from true north to the direction of travel.

QGeoPositionInfo.GroundSpeed

The ground speed, in meters/sec.

QGeoPositionInfo.VerticalSpeed

The vertical speed, in meters/sec.

QGeoPositionInfo.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.

QGeoPositionInfo.HorizontalAccuracy

The accuracy of the provided latitude-longitude value, in meters.

QGeoPositionInfo.VerticalAccuracy

The accuracy of the provided altitude value, in meters.

PySide2.QtPositioning.QGeoPositionInfo. attribute ( attribute )
参数

attribute 属性

返回类型

qreal

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

Returns NaN if the value has not been set.

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

PySide2.QtPositioning.QGeoPositionInfo. coordinate ( )
返回类型

QGeoCoordinate

Returns the coordinate for this position.

Returns an invalid coordinate if no coordinate has been set.

另请参阅

setCoordinate()

PySide2.QtPositioning.QGeoPositionInfo. hasAttribute ( attribute )
参数

attribute 属性

返回类型

bool

返回 true 若指定 attribute is present for this QGeoPositionInfo 对象。

PySide2.QtPositioning.QGeoPositionInfo. isValid ( )
返回类型

bool

返回 true 若 timestamp() and coordinate() values are both valid.

另请参阅

isValid() isValid()

PySide2.QtPositioning.QGeoPositionInfo. __ne__ ( other )
参数

other QGeoPositionInfo

返回类型

bool

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

PySide2.QtPositioning.QGeoPositionInfo. __eq__ ( other )
参数

other QGeoPositionInfo

返回类型

bool

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

PySide2.QtPositioning.QGeoPositionInfo. removeAttribute ( attribute )
参数

attribute 属性

移除指定 attribute and its value.

PySide2.QtPositioning.QGeoPositionInfo. setAttribute ( attribute , value )
参数

Sets the value for attribute to value .

另请参阅

attribute()

PySide2.QtPositioning.QGeoPositionInfo. setCoordinate ( coordinate )
参数

coordinate QGeoCoordinate

Sets the coordinate for this position to coordinate .

另请参阅

coordinate()

PySide2.QtPositioning.QGeoPositionInfo. setTimestamp ( timestamp )
参数

timestamp QDateTime

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

timestamp must be in UTC time.

另请参阅

timestamp()

PySide2.QtPositioning.QGeoPositionInfo. timestamp ( )
返回类型

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.

另请参阅

setTimestamp()