From 9d582c5512c261bbea5d6257375c291a06721950 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 13 Feb 2019 22:48:50 -0800 Subject: Mobile: only show dive computers in the Bluetooth connection list And offer an option to show all devices in the settings. This is intentionally not stored in the preferences as this should never be needed. We don't support BT or BLE dive computers that we don't recognize. This is a last resort in case a new firmware were to change the name or some other weird issue causes us not to recognize a dive computer - and that should be fixed instead of worked around. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/Settings.qml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index 358d89a04..6a3302eb8 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -530,6 +530,41 @@ Kirigami.ScrollablePage { Layout.fillWidth: true } + GridLayout { + id: whichBluetoothDevices + columns: 2 + Controls.Label { + text: qsTr("Bluetooth") + font.pointSize: subsurfaceTheme.headingPointSize + font.weight: Font.Light + color: subsurfaceTheme.textColor + Layout.topMargin: Kirigami.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 + Layout.columnSpan: 2 + } + + Controls.Label { + text: qsTr("Show all bluetooth devices \neven if not recognized as dive computers") + font.pointSize: subsurfaceTheme.regularPointSize + Layout.preferredWidth: gridWidth * 0.75 + } + SsrfSwitch { + id: nonDCButton + checked: manager.showNonDiveComputers + Layout.preferredWidth: gridWidth * 0.25 + onClicked: { + manager.showNonDiveComputers = checked + } + } + } + + Rectangle { + color: subsurfaceTheme.darkerPrimaryColor + height: 1 + opacity: 0.5 + Layout.fillWidth: true + } + GridLayout { id: developer columns: 2 -- cgit v1.2.3-70-g09d2