QGeoSatelliteInfo Class

The QGeoSatelliteInfo class contains basic information about a satellite. 更多...

头文件: #include <QGeoSatelliteInfo>
qmake: QT += positioning
开始支持版本: Qt 5.2

公有类型

enum Attribute { Elevation, Azimuth }
enum SatelliteSystem { Undefined, GPS, GLONASS }

公有函数

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

详细描述

The QGeoSatelliteInfo class contains basic information about a satellite.

参见 QGeoSatelliteInfoSource.

成员类型

enum QGeoSatelliteInfo::Attribute

Defines the attributes for the satellite information.

ConstantValueDescription
QGeoSatelliteInfo::Elevation0The elevation of the satellite, in degrees.
QGeoSatelliteInfo::Azimuth1The azimuth to true north, in degrees.

enum QGeoSatelliteInfo::SatelliteSystem

Defines the GNSS system of the satellite.

ConstantValueDescription
QGeoSatelliteInfo::Undefined0x00Not defined.
QGeoSatelliteInfo::GPS0x01Global Positioning System (USA).
QGeoSatelliteInfo::GLONASS0x02Global Positioning System (Russia).

成员函数

QGeoSatelliteInfo::QGeoSatelliteInfo()

Creates a satellite information object.

QGeoSatelliteInfo::QGeoSatelliteInfo(const QGeoSatelliteInfo &other)

Creates a satellite information object with the values of other.

QGeoSatelliteInfo::~QGeoSatelliteInfo()

Destroys a satellite information object.

qreal QGeoSatelliteInfo::attribute(Attribute attribute) const

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

Returns -1 if the value has not been set.

参见 hasAttribute() and setAttribute().

bool QGeoSatelliteInfo::hasAttribute(Attribute attribute) const

Returns true if the specified attribute is present in this update.

void QGeoSatelliteInfo::removeAttribute(Attribute attribute)

Removes the specified attribute and its value.

int QGeoSatelliteInfo::satelliteIdentifier() const

Returns the satellite identifier number.

The satellite identifier number can be used to identify a satellite inside the satellite system. For satellite system GPS the satellite identifier number represents the PRN (Pseudo-random noise) number. For satellite system GLONASS the satellite identifier number represents the slot number.

参见 setSatelliteIdentifier().

SatelliteSystem QGeoSatelliteInfo::satelliteSystem() const

Returns the Satellite System (GPS, GLONASS, ...)

参见 setSatelliteSystem().

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

Sets the value for attribute to value.

参见 attribute().

void QGeoSatelliteInfo::setSatelliteIdentifier(int satId)

Sets the satellite identifier number to satId.

The satellite identifier number can be used to identify a satellite inside the satellite system. For satellite system GPS the satellite identifier number represents the PRN (Pseudo-random noise) number. For satellite system GLONASS the satellite identifier number represents the slot number.

参见 satelliteIdentifier().

void QGeoSatelliteInfo::setSatelliteSystem(SatelliteSystem system)

Sets the Satellite System (GPS, GLONASS, ...) to system.

参见 satelliteSystem().

void QGeoSatelliteInfo::setSignalStrength(int signalStrength)

Sets the signal strength to signalStrength, in decibels.

参见 signalStrength().

int QGeoSatelliteInfo::signalStrength() const

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

参见 setSignalStrength().

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

Returns true if any of the information for this satellite are not the same as those of other.

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

Assigns the values from other to this object.

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

Returns true if all the information for this satellite are the same as those of other.

相关非成员

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

Writes the given info to the specified stream.

参见 Format of the QDataStream operators.

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

Reads satellite information from the specified stream into the given info.

参见 Format of the QDataStream operators.