summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/main.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-02 07:09:40 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-02 12:46:59 -0500
commit69c10808af442140829975ee1cf893160e3be10d (patch)
tree920867c4eb230888c5b6193571690719da227f97 /qt-mobile/qml/main.qml
parentf677d482e9db6f4d566eac40909bb7c8f01fafd7 (diff)
downloadsubsurface-69c10808af442140829975ee1cf893160e3be10d.tar.gz
QML UI: don't go through manager object to show map
We can open URLs in the browser directly from QML. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/main.qml')
-rw-r--r--qt-mobile/qml/main.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index 9365052a8..b578ffe51 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -46,6 +46,14 @@ Kirigami.ApplicationWindow {
diveList.scrollToTop()
}
+ function showMap(location) {
+ var urlPrefix = "https://www.google.com/maps/place/"
+ var locationPair = location + "/@" + location
+ var urlSuffix = ",5000m/data=!3m1!1e3!4m2!3m1!1s0x0:0x0"
+ Qt.openUrlExternally(urlPrefix + locationPair + urlSuffix)
+
+ }
+
function startAddDive() {
detailsWindow.state = "add"
detailsWindow.dive_id = manager.addDive();