summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-02-13 22:48:50 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-02-14 09:05:58 -0800
commit9d582c5512c261bbea5d6257375c291a06721950 (patch)
tree03f3b1d90cff89e75db383bc4e5a182f04341b22 /mobile-widgets/qml
parentf35a0f3b09197b56a7ecdd63a6689d8b69b36ce8 (diff)
downloadsubsurface-9d582c5512c261bbea5d6257375c291a06721950.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/Settings.qml35
1 files changed, 35 insertions, 0 deletions
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
@@ -531,6 +531,41 @@ Kirigami.ScrollablePage {
}
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
Controls.Label {