summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-07 21:37:36 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-07 21:41:52 -0800
commit2b1ffb3cc49566c8c138e1e536c8d1f25344e960 (patch)
treee1aeb00966c4b78ff992363ed5dc2fee8959fdcb /qt-mobile
parent1c66e399fa1f3549a9c3349d3a3f13000bb0d353 (diff)
downloadsubsurface-2b1ffb3cc49566c8c138e1e536c8d1f25344e960.tar.gz
QML UI: trigger download of GPS fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qml/main.qml7
-rw-r--r--qt-mobile/qmlmanager.cpp6
-rw-r--r--qt-mobile/qmlmanager.h1
3 files changed, 14 insertions, 0 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index c0d079106..b9a377c56 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -98,6 +98,13 @@ MobileComponents.ApplicationWindow {
}
Action {
+ text: "Download GPS data"
+ onTriggered: {
+ manager.downloadGpsData();
+ }
+ }
+
+ Action {
text: "Clear GPS cache"
onTriggered: {
manager.clearGpsData();
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 00f8b5d48..766498b17 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -501,6 +501,12 @@ void QMLManager::sendGpsData()
locationProvider->uploadToServer();
}
+void QMLManager::downloadGpsData()
+{
+ locationProvider->downloadFromServer();
+ locationProvider->updateModel();
+}
+
void QMLManager::clearGpsData()
{
locationProvider->clearGpsData();
diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h
index 24ca265e6..1dc13d669 100644
--- a/qt-mobile/qmlmanager.h
+++ b/qt-mobile/qmlmanager.h
@@ -77,6 +77,7 @@ public slots:
QString addDive();
void applyGpsData();
void sendGpsData();
+ void downloadGpsData();
void clearGpsData();
void finishSetup();
void showMap(QString location);