diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-12 20:23:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-12 20:23:00 -0800 |
commit | 4b39971978b5c1fe2f50e83837eb5f8b2ce7ce47 (patch) | |
tree | c33b251bd845a5e80433f8a5f3de787bace329d2 | |
parent | 5873a08197abc39168ca9e70eae1b2b732aa7779 (diff) | |
download | subsurface-4b39971978b5c1fe2f50e83837eb5f8b2ce7ce47.tar.gz |
Location service: apply the saved GPS fixes to dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-mobile/qml/main.qml | 7 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 5 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index d22710ea4..3e18cbc68 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -80,6 +80,13 @@ ApplicationWindow { } MenuItem { + text: "Apply GPS data to dives" + onTriggered: { + manager.applyGpsData(); + } + } + + MenuItem { text: "View Log" onTriggered: { stackView.push(logWindow) diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index ad8f1e259..68f22fdc1 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -147,6 +147,11 @@ void QMLManager::addDive() DiveListModel::instance()->startAddDive(); } +void QMLManager::applyGpsData() +{ + locationProvider->applyLocations(); +} + QString QMLManager::logText() const { return m_logText; diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index 99e83c277..8c42b15ef 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -42,6 +42,7 @@ public slots: void commitChanges(QString diveId, QString suit, QString buddy, QString diveMaster, QString notes); void saveChanges(); void addDive(); + void applyGpsData(); private: QString m_cloudUserName; |