summaryrefslogtreecommitdiffstats
path: root/qt-mobile/gpslocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/gpslocation.cpp')
-rw-r--r--qt-mobile/gpslocation.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/qt-mobile/gpslocation.cpp b/qt-mobile/gpslocation.cpp
index fea313950..d1c5c4588 100644
--- a/qt-mobile/gpslocation.cpp
+++ b/qt-mobile/gpslocation.cpp
@@ -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");