Quantum GIS API Documentation  master-693a1fe
src/core/gps/qgsqtlocationconnection.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           QgsQtLocationConnection.h  -  description
00003                           -------------------
00004     begin                : December 7th, 2011
00005     copyright            : (C) 2011 by Marco Bernasocchi, Bernawebdesign.ch
00006     email                : marco at bernawebdesign dot ch
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSQTLOCATIONCONNECTION_H
00019 #define QGSQTLOCATIONCONNECTION_H
00020 
00021 #include "qgsgpsconnection.h"
00022 #include <QtCore/QPointer>
00023 #include <QtLocation/QGeoPositionInfoSource>
00024 #include <QtLocation/QGeoSatelliteInfo>
00025 #include <QtLocation/QGeoSatelliteInfoSource>
00026 
00027 QTM_USE_NAMESPACE
00028 
00029 class CORE_EXPORT QgsQtLocationConnection: public QgsGPSConnection
00030 {
00031     Q_OBJECT
00032   public:
00033     QgsQtLocationConnection();
00034     ~QgsQtLocationConnection();
00035 
00036   protected slots:
00038     void broadcastConnectionAvailable( );
00039 
00041     void parseData();
00042 
00046     void positionUpdated( const QGeoPositionInfo &info );
00047 
00049     void satellitesInViewUpdated( const QList<QGeoSatelliteInfo>& satellites );
00050 
00052     void satellitesInUseUpdated( const QList<QGeoSatelliteInfo>& satellites );
00053 
00054   private:
00055     void startGPS();
00056     void startSatelliteMonitor();
00057     QString mDevice;
00058     QGeoPositionInfo mInfo;
00059     QPointer<QGeoPositionInfoSource> locationDataSource;
00060     QPointer<QGeoSatelliteInfoSource> satelliteInfoSource;
00061 
00062 };
00063 
00064 #endif // QGSQTLOCATIONCONNECTION_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines