From 4b39971978b5c1fe2f50e83837eb5f8b2ce7ce47 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 12 Nov 2015 20:23:00 -0800 Subject: Location service: apply the saved GPS fixes to dive list Signed-off-by: Dirk Hohndel --- qt-mobile/qml/main.qml | 7 +++++++ qt-mobile/qmlmanager.cpp | 5 +++++ qt-mobile/qmlmanager.h | 1 + 3 files changed, 13 insertions(+) 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 @@ -79,6 +79,13 @@ ApplicationWindow { } } + MenuItem { + text: "Apply GPS data to dives" + onTriggered: { + manager.applyGpsData(); + } + } + MenuItem { text: "View Log" onTriggered: { 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; -- cgit v1.2.3-70-g09d2