From dbb5826f2af60219137b361a5d59fae3987bc908 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 9 Jul 2017 18:08:36 -0700 Subject: QML UI: add preference for libdivecomputer log Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/Preferences.qml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'mobile-widgets/qml/Preferences.qml') diff --git a/mobile-widgets/qml/Preferences.qml b/mobile-widgets/qml/Preferences.qml index 6004147c7..9dc73ba7b 100644 --- a/mobile-widgets/qml/Preferences.qml +++ b/mobile-widgets/qml/Preferences.qml @@ -250,6 +250,7 @@ Kirigami.Page { } } GridLayout { + id: gpsPrefs columns: 2 width: parent.width - Kirigami.Units.gridUnit anchors { @@ -292,4 +293,51 @@ Kirigami.Page { Layout.fillHeight: true } } + GridLayout { + columns: 2 + width: parent.width - Kirigami.Units.gridUnit + anchors { + top: gpsPrefs.bottom + margins: Kirigami.Units.gridUnit / 2 + } + Kirigami.Heading { + text: qsTr("Debug log for download from divecomputer") + color: subsurfaceTheme.textColor + level: 3 + Layout.topMargin: Kirigami.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 + Layout.columnSpan: 2 + } + + CheckBox { + id: libdclogButton + checked: manager.libdcLog + onClicked: { + manager.libdcLog = checked + } + indicator: Rectangle { + implicitWidth: 20 + implicitHeight: 20 + x: libdclogButton.leftPadding + y: parent.height / 2 - height / 2 + radius: 4 + border.color: libdclogButton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor + color: subsurfaceTheme.backgroundColor + + Rectangle { + width: 12 + height: 12 + x: 4 + y: 4 + radius: 3 + color: libdclogButton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor + visible: libdclogButton.checked + } + } + } + Kirigami.Label { + text: qsTr("Save detailed log of interaction with the dive computer") + } + + } } -- cgit v1.2.3-70-g09d2