mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
62f7ec11d7
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>
31 lines
547 B
C++
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
|