21 #include <QLocalSocket>
28 qRegisterMetaType< QList<QGeoSatelliteInfo> >(
"QList<QGeoSatelliteInfo>" );
69 if (
mInfo.isValid() )
97 QgsDebugMsg(
"Valid QGeoPositionInfo, positionUpdated" );
103 const QList<QGeoSatelliteInfo>& satellites )
107 for (
int i = 0; i < satellites.size(); ++i )
109 QGeoSatelliteInfo currentSatellite = satellites.at( i );
111 satelliteInfo.
azimuth = currentSatellite.attribute( QGeoSatelliteInfo::Azimuth );
112 satelliteInfo.
elevation = currentSatellite.attribute( QGeoSatelliteInfo::Elevation );
113 satelliteInfo.
id = currentSatellite.prnNumber();
114 satelliteInfo.
signal = currentSatellite.signalStrength();
123 const QList<QGeoSatelliteInfo>& satellites )
129 for (
int i = 0; i < satellites.size(); ++i )
131 QGeoSatelliteInfo currentSatellite = satellites.at( i );
139 if ( satInView.
id == currentSatellite.prnNumber() )
141 satInView.
inUse =
true;
153 QgsDebugMsg(
"Starting GPS QtLocation connection" );
160 locationDataSource->setPreferredPositioningMethods( QGeoPositionInfoSource::SatellitePositioningMethods );
186 QgsDebugMsg(
"Starting GPS QtLocation satellite monitor" );
198 const QList<QGeoSatelliteInfo>& ) ),
201 const QList<QGeoSatelliteInfo>& ) ) );
208 const QList<QGeoSatelliteInfo>& ) ),
211 const QList<QGeoSatelliteInfo>& ) ) );
void satellitesInUseUpdated(const QList< QGeoSatelliteInfo > &satellites)
Called when the number of satellites in use is updated.
Status mStatus
Connection status.
void positionUpdated(const QGeoPositionInfo &info)
Called when the position updated.
void startSatelliteMonitor()
Abstract base class for connection to a GPS device.
void satellitesInViewUpdated(const QList< QGeoSatelliteInfo > &satellites)
Called when the number of satellites in view is updated.
QgsGPSInformation mLastGPSInformation
Last state of the gps related variables (e.g.
QPointer< QGeoSatelliteInfoSource > satelliteInfoSource
void broadcastConnectionAvailable()
Needed to make QtLocation detected.
QPointer< QGeoPositionInfoSource > locationDataSource
void stateChanged(const QgsGPSInformation &info)
QgsQtLocationConnection()
void parseData()
Parse available data source content.
~QgsQtLocationConnection()