From d51fe03bd9195380aeec031a6e45eda5f44404f0 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Sun, 23 Jul 2017 09:38:40 +0200 Subject: QML UI: move location services to GPS menu Move the location services switch to the GPS menu, indicate both with icon and text if the service is active or not. Signed-off-by: Joakim Bygdell --- mobile-widgets/qml/main.qml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mobile-widgets/qml/main.qml') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 98825e98a..0a45ab09e 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -24,6 +24,7 @@ Kirigami.ApplicationWindow { property QtObject notification: null property bool showingDiveList: false property alias syncToCloud: manager.syncToCloud + property alias locationServiceEnabled: manager.locationServiceEnabled property alias showPin: manager.showPin onNotificationTextChanged: { if (notificationText != "") { @@ -229,6 +230,14 @@ if you have network connectivity and want to sync your data to cloud storage."), manager.clearGpsData(); } } + + Kirigami.Action { + iconName: locationServiceEnabled ? "icons/ic_location_off.svg" : "icons/ic_place.svg" + text: locationServiceEnabled ? qsTr("Disable location service") : qsTr("Run location service") + onTriggered: { + locationServiceEnabled = !locationServiceEnabled + } + } }, Kirigami.Action { iconName: "icons/ic_info_outline.svg" -- cgit v1.2.3-70-g09d2