QGIS API Documentation  2.99.0-Master (13a3f2f)
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 #if defined(HAVE_QT_MOBILITY_LOCATION )
28 #include <QtLocation/QGeoPositionInfoSource>
29 #include <QtLocation/QGeoSatelliteInfo>
30 #include <QtLocation/QGeoSatelliteInfoSource>
31 
32 QTM_USE_NAMESPACE
33 #else // Using QtPositioning
34 #include <QtPositioning/QGeoPositionInfoSource>
35 #include <QtPositioning/QGeoSatelliteInfo>
36 #include <QtPositioning/QGeoSatelliteInfoSource>
37 #endif
38 
44 class CORE_EXPORT QgsQtLocationConnection: public QgsGPSConnection
45 {
46  Q_OBJECT
47  public:
50 
51  protected slots:
53  void broadcastConnectionAvailable();
54 
56  void parseData();
57 
61  void positionUpdated( const QGeoPositionInfo &info );
62 
66  void satellitesInViewUpdated( const QList<QGeoSatelliteInfo> &satellites ) SIP_SKIP;
67 
71  void satellitesInUseUpdated( const QList<QGeoSatelliteInfo> &satellites ) SIP_SKIP;
72 
73  private:
74  void startGPS();
75  void startSatelliteMonitor();
76  QString mDevice;
77  QGeoPositionInfo mInfo;
78  QPointer<QGeoPositionInfoSource> locationDataSource;
79  QPointer<QGeoSatelliteInfoSource> satelliteInfoSource;
80 
81 };
82 
83 #endif // QGSQTLOCATIONCONNECTION_H
virtual void parseData()=0
Parse available data source content.
#define SIP_SKIP
Definition: qgis_sip.h:102
Abstract base class for connection to a GPS device.