QGeoSatelliteInfo 類

QGeoSatelliteInfo 類包含衛星的有關基本信息。 更多...

頭: #include <QGeoSatelliteInfo>
CMake: find_package(Qt6 REQUIRED COMPONENTS Positioning)
target_link_libraries(mytarget PRIVATE Qt6::Positioning)
qmake: QT += positioning

公共類型

enum 屬性 { Elevation, Azimuth }
enum SatelliteSystem { Undefined, GPS, GLONASS, GALILEO, BEIDOU, …, CustomType }

特性

公共函數

QGeoSatelliteInfo ()
QGeoSatelliteInfo (const QGeoSatelliteInfo & other )
(從 6.2 起) QGeoSatelliteInfo (QGeoSatelliteInfo && other )
~QGeoSatelliteInfo ()
qreal attribute (QGeoSatelliteInfo::Attribute attribute ) const
bool hasAttribute (QGeoSatelliteInfo::Attribute attribute ) const
void removeAttribute (QGeoSatelliteInfo::Attribute attribute )
int satelliteIdentifier () const
QGeoSatelliteInfo::SatelliteSystem satelliteSystem () const
void setAttribute (QGeoSatelliteInfo::Attribute attribute , qreal value )
void setSatelliteIdentifier (int satId )
void setSatelliteSystem (QGeoSatelliteInfo::SatelliteSystem system )
void setSignalStrength (int signalStrength )
int signalStrength () const
(從 6.2 起) void swap (QGeoSatelliteInfo & other )
(從 6.2 起) QGeoSatelliteInfo & operator= (QGeoSatelliteInfo && other )
QGeoSatelliteInfo & operator= (const QGeoSatelliteInfo & other )
bool operator!= (const QGeoSatelliteInfo & lhs , const QGeoSatelliteInfo & rhs )
QDataStream & operator<< (QDataStream & stream , const QGeoSatelliteInfo & info )
bool operator== (const QGeoSatelliteInfo & lhs , const QGeoSatelliteInfo & rhs )
QDataStream & operator>> (QDataStream & stream , QGeoSatelliteInfo & info )

詳細描述

另請參閱 QGeoSatelliteInfoSource .

成員類型文檔編製

enum QGeoSatelliteInfo:: 屬性

定義用於衛星信息的屬性。

常量 描述
QGeoSatelliteInfo::Elevation 0 衛星仰角 (以度為單位)。
QGeoSatelliteInfo::Azimuth 1 正北方位角 (以度為單位)。

enum QGeoSatelliteInfo:: SatelliteSystem

定義衛星的 GNSS 係統。

常量 描述
QGeoSatelliteInfo::Undefined 0x00 未定義。
QGeoSatelliteInfo::GPS 0x01 全球定位係統 (USA 美國)。
QGeoSatelliteInfo::GLONASS 0x02 全球定位係統 (俄羅斯)。
QGeoSatelliteInfo::GALILEO 0x03 全球導航衛星係統 (EU 歐盟)。
QGeoSatelliteInfo::BEIDOU 0x04 北鬥導航衛星係統 (中國)。
QGeoSatelliteInfo::QZSS 0x05 準天頂衛星係統 (日本)。
QGeoSatelliteInfo::Multiple 0xFF This type normally indicates that the information is received from a device that supports multiple satellite systems, and the satellite system is not explicitly specified. Depending on the data source, you might use other information to determine the actual system type. One example of the usage of this type is an NMEA $GNGSA message, which contains the IDs of the satellites being used, but does not explicitly mention their system types.
QGeoSatelliteInfo::CustomType 0x100 The first type that can be used for user purposes. For example when reimplementing NMEA data parsing in QNmeaSatelliteInfoSource . User can add more types using CustomType + 1 , CustomType + 2 and so on.

特性文檔編製

[read-only] satelliteIdentifier : const int

This property holds the satellite identifier number.

The satellite identifier number can be used to identify a satellite within the satellite system.

The actual value may vary, depending on the platform and the selected backend.

例如,若 nmea plugin is used, the satellite identifier for GPS satellite system represents the PRN (Pseudo-random noise) number, and the satellite identifier for GLONASS satellite system represents the slot number.

For NMEA-based backends the satellite identifier can be used to determine the satellite system type if it is not available from other sources. You can refer to satellite IDs list to check the ID ranges for different satellite systems.

注意: Depending on the platform and the selected backend, the satellite identifier ranges for different satellite systems may intersect. To uniquely identify a satellite, a combination of satelliteIndetifier() and satelliteSystem () must be used.

訪問函數:

int satelliteIdentifier () const

[read-only] satelliteSystem : const SatelliteSystem

This property holds the satellite system in use, such as GPS or GLONASS.

訪問函數:

QGeoSatelliteInfo::SatelliteSystem satelliteSystem () const

[read-only] signalStrength : const qreal

This property holds the signal strength.

訪問函數:

int signalStrength () const

成員函數文檔編製

QGeoSatelliteInfo:: QGeoSatelliteInfo ()

創建衛星信息對象。

QGeoSatelliteInfo:: QGeoSatelliteInfo (const QGeoSatelliteInfo & other )

創建衛星信息對象采用值為 other .

[noexcept, since 6.2] QGeoSatelliteInfo:: QGeoSatelliteInfo ( QGeoSatelliteInfo && other )

創建衛星信息對象通過移動自 other .

Note that a moved-from QGeoSatelliteInfo can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.

該函數在 Qt 6.2 引入。

[noexcept] QGeoSatelliteInfo:: ~QGeoSatelliteInfo ()

銷毀衛星信息對象。

[invokable] qreal QGeoSatelliteInfo:: 屬性 ( QGeoSatelliteInfo::Attribute attribute ) const

返迴值為指定 attribute 如 qreal 值。

返迴 -1 若值未設置。

注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .

另請參閱 hasAttribute () 和 setAttribute ().

[invokable] bool QGeoSatelliteInfo:: hasAttribute ( QGeoSatelliteInfo::Attribute attribute ) const

返迴 true 若指定 attribute 呈現在此更新中。

注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .

void QGeoSatelliteInfo:: removeAttribute ( QGeoSatelliteInfo::Attribute attribute )

移除指定 attribute 及其值。

int QGeoSatelliteInfo:: satelliteIdentifier () const

返迴衛星標識符編號。

注意: getter 函數對於特性 satelliteIdentifier。

另請參閱 setSatelliteIdentifier () 和 satelliteSystem ().

QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo:: satelliteSystem () const

返迴衛星係統 (GPS、GLONASS...)

注意: 此值可以一起用於 satelliteIdentifier () 以唯一標識衛星。

注意: getter 函數對於特性 satelliteSystem。

另請參閱 setSatelliteSystem () 和 satelliteIdentifier ().

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

設置值為 attribute to value .

另請參閱 attribute ().

void QGeoSatelliteInfo:: setSatelliteIdentifier ( int satId )

將衛星標識編號設為 satId .

The satellite identifier number can be used to identify a satellite within the satellite system.

The actual value may vary, depending on the platform and the selected backend.

例如,若 nmea plugin is used, the satellite identifier for GPS satellite system represents the PRN (Pseudo-random noise) number, and the satellite identifier for GLONASS satellite system represents the slot number.

另請參閱 satelliteIdentifier ().

void QGeoSatelliteInfo:: setSatelliteSystem ( QGeoSatelliteInfo::SatelliteSystem system )

設置衛星係統 (GPS、GLONASS...) 為 system .

另請參閱 satelliteSystem ().

void QGeoSatelliteInfo:: setSignalStrength ( int signalStrength )

將信號強度設為 signalStrength (以分貝為單位)。

另請參閱 signalStrength ().

int QGeoSatelliteInfo:: signalStrength () const

Returns the signal strength, or -1 if the value has not been set.

注意: getter 函數對於特性 signalStrength。

另請參閱 setSignalStrength ().

[noexcept, since 6.2] void QGeoSatelliteInfo:: swap ( QGeoSatelliteInfo & other )

Swaps this satellite information with other 。此操作很快且從不失敗。

該函數在 Qt 6.2 引入。

[noexcept, since 6.2] QGeoSatelliteInfo &QGeoSatelliteInfo:: operator= ( QGeoSatelliteInfo && other )

Move-assigns the value from other to this object

Note that a moved-from QGeoSatelliteInfo can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.

該函數在 Qt 6.2 引入。

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

賦值值從 other 到此對象。

相關非成員

bool operator!= (const QGeoSatelliteInfo & lhs , const QGeoSatelliteInfo & rhs )

返迴 true if any of the parameters of the lhs satellite are not the same as those of rhs . Otherwise returns false .

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

寫入給定 info 到指定 stream .

另請參閱 序列化 Qt 數據類型 .

bool operator== (const QGeoSatelliteInfo & lhs , const QGeoSatelliteInfo & rhs )

返迴 true if all the parameters of the lhs satellite are the same as those of rhs . Otherwise returns false .

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

Reads satellite information from the specified stream 進給定 info .

另請參閱 序列化 Qt 數據類型 .

內容

  1. 公共類型

  2. 特性

  3. 公共函數

  4. 相關非成員

  5. 詳細描述