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>
This commit is contained in:
Dirk Hohndel 2019-02-13 22:48:50 -08:00
parent f35a0f3b09
commit 9d582c5512
5 changed files with 60 additions and 2 deletions

View file

@ -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