diff options
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qml/main.qml | 7 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 6 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.h | 1 |
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); |