mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Location service: toggle the service from the main menu
That way we don't track the user's location until explicitly asked to do so. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a29e74e2e9
commit
cd7d6ae6e5
5 changed files with 46 additions and 0 deletions
|
@ -22,6 +22,21 @@ GpsLocation::GpsLocation(QObject *parent)
|
|||
status("don't have GPS source");
|
||||
}
|
||||
}
|
||||
|
||||
void GpsLocation::serviceEnable(bool toggle)
|
||||
{
|
||||
if (!gpsSource)
|
||||
return;
|
||||
|
||||
if (toggle) {
|
||||
gpsSource->startUpdates();
|
||||
status("Starting Subsurface GPS service");
|
||||
} else {
|
||||
gpsSource->stopUpdates();
|
||||
status("Stopping Subsurface GPS service");
|
||||
}
|
||||
}
|
||||
|
||||
void GpsLocation::newPosition(QGeoPositionInfo pos)
|
||||
{
|
||||
QString msg("received new position %1");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue