615a5fa81c815da92ddf9b2c25018f93a9869933
[ptas] / zouba / gpscontroller.h
1 #ifndef GPSCONTROLLER_H
2 #define GPSCONTROLLER_H
3
4 #include "location.h"
5
6 #include <QObject>
7 #include <QGeoPositionInfo>
8 #include <QGeoPositionInfoSource>
9
10 QTM_USE_NAMESPACE
11
12 class GpsController : public QObject
13 {
14   Q_OBJECT
15
16 public:
17   GpsController();
18
19   ~GpsController();
20
21   void stopGps();
22
23 public Q_SLOTS:
24   void updateLocation( QGeoPositionInfo positionInfo );
25   void startGps();
26
27 Q_SIGNALS:
28   void locationChanged( const Location &newLocation );
29
30 private:
31   QGeoPositionInfoSource *m_location;
32   bool updatesEnabled;
33 };
34
35 #endif // GPSCONTROLLER_H