QGIS API Documentation  3.23.0-Master (b5237dafc3)
qgsqtlocationconnection.h
Go to the documentation of this file.
1 /***************************************************************************
2  QgsQtLocationConnection.h - description
3  -------------------
4  begin : December 7th, 2011
5  copyright : (C) 2011 by Marco Bernasocchi, Bernawebdesign.ch
6  email : marco at bernawebdesign dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSQTLOCATIONCONNECTION_H
19 #define QGSQTLOCATIONCONNECTION_H
20 
21 #include "qgis_core.h"
22 #include "qgis_sip.h"
23 #include "qgsgpsconnection.h"
24 
25 #include <QtCore/QPointer>
26 
27 #include <QtPositioning/QGeoPositionInfoSource>
28 #include <QtPositioning/QGeoSatelliteInfo>
29 #include <QtPositioning/QGeoSatelliteInfoSource>
30 
37 class CORE_EXPORT QgsQtLocationConnection: public QgsGpsConnection
38 {
39  Q_OBJECT
40  public:
42 
43  protected slots:
45  void broadcastConnectionAvailable();
46 
48  void parseData() override;
49 
54  void positionUpdated( const QGeoPositionInfo &info ) SIP_SKIP;
55 
60  void satellitesInViewUpdated( const QList<QGeoSatelliteInfo> &satellites );
61 
66  void satellitesInUseUpdated( const QList<QGeoSatelliteInfo> &satellites );
67 
68  private:
69  void startGPS();
70  void startSatelliteMonitor();
71  QString mDevice;
72  QGeoPositionInfo mInfo;
73  QPointer<QGeoPositionInfoSource> locationDataSource;
74  QPointer<QGeoSatelliteInfoSource> satelliteInfoSource;
75 
76 };
77 
78 #endif // QGSQTLOCATIONCONNECTION_H
Abstract base class for connection to a GPS device.
virtual void parseData()=0
Parse available data source content.
A GPS connection subclass based on the Qt Location libraries.
#define SIP_SKIP
Definition: qgis_sip.h:126