subsurface/qt-mobile/gpslocation.h
Dirk Hohndel 62f7ec11d7 Location service: store locations in settings
This is rather simplistic and will clutter the settings. I'm not convinced
this is the BEST way to do this, but it's a rather straight forward way to
get persistant storage of the location fixes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 15:28:10 -08:00

31 lines
547 B
C++

#ifndef GPSLOCATION_H
#define GPSLOCATION_H
#include "units.h"
#include <QObject>
#include <QGeoCoordinate>
#include <QGeoPositionInfoSource>
#include <QGeoPositionInfo>
#include <QSettings>
class GpsLocation : QObject
{
Q_OBJECT
public:
GpsLocation(QObject *parent);
private:
QGeoPositionInfo lastPos;
QGeoPositionInfoSource *gpsSource;
void status(QString msg);
QSettings geoSettings;
signals:
public slots:
void serviceEnable(bool toggle);
void newPosition(QGeoPositionInfo pos);
void updateTimeout();
};
#endif // GPSLOCATION_H