QGIS API Documentation  2.0.1-Dufour
 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 
49  void satellitesInViewUpdated( const QList<QGeoSatelliteInfo>& satellites );
50 
52  void satellitesInUseUpdated( const QList<QGeoSatelliteInfo>& satellites );
53 
54  private:
55  void startGPS();
56  void startSatelliteMonitor();
57  QString mDevice;
58  QGeoPositionInfo mInfo;
59  QPointer<QGeoPositionInfoSource> locationDataSource;
60  QPointer<QGeoSatelliteInfoSource> satelliteInfoSource;
61 
62 };
63 
64 #endif // QGSQTLOCATIONCONNECTION_H