QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "qgsgpsconnection.h"
22 #include <QtCore/QPointer>
23 #include <QtLocation/QGeoPositionInfoSource>
24 #include <QtLocation/QGeoSatelliteInfo>
25 #include <QtLocation/QGeoSatelliteInfoSource>
26 
27 QTM_USE_NAMESPACE
28 
29 class CORE_EXPORT QgsQtLocationConnection: public QgsGPSConnection
30 {
31  Q_OBJECT
32  public:
35 
36  protected slots:
38  void broadcastConnectionAvailable();
39 
41  void parseData();
42 
46  void positionUpdated( const QGeoPositionInfo &info );
47 
51  void satellitesInViewUpdated( const QList<QGeoSatelliteInfo>& satellites );
52 
56  void satellitesInUseUpdated( const QList<QGeoSatelliteInfo>& satellites );
57 
58  private:
59  void startGPS();
60  void startSatelliteMonitor();
61  QString mDevice;
62  QGeoPositionInfo mInfo;
63  QPointer<QGeoPositionInfoSource> locationDataSource;
64  QPointer<QGeoSatelliteInfoSource> satelliteInfoSource;
65 
66 };
67 
68 #endif // QGSQTLOCATIONCONNECTION_H