From bb3387f234991f0779e683951b3f74cf00782570 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 17 Jul 2017 12:09:11 -0700 Subject: QML UI: Download from DC: remove Bluetooth checkbox The connection already clearly defines whether this is Bluetooth or not. No reason for the separate checkbox. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 32 +++---------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index ded51abfc..a9b34f34f 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -29,7 +29,7 @@ Kirigami.Page { deviceData.devName : comboConnection.currentText //TODO: Make this the default on the C++ - deviceData.bluetoothMode : isBluetooth.checked + deviceData.bluetoothMode : true deviceData.forceDownload : false deviceData.createNewTrip : false deviceData.deviceId : 0 @@ -157,35 +157,9 @@ Kirigami.Page { // pattern that matches BT addresses var btAddr = /[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]/ ; if (btAddr.test(currentText)) - isBluetooth.checked = true + downloadThread.deviceData.bluetoothMode = true else - isBluetooth.checked = false - } - } - - Kirigami.Label { text: btEnabled ? qsTr("Bluetooth download:") : qsTr("No Bluetooth support detected")} - CheckBox { - id: isBluetooth - checked: downloadThread.data().getDetectedVendorIndex(ComboBox.currentText) != -1 - indicator: Rectangle { - visible: btEnabled - implicitWidth: 20 - implicitHeight: 20 - x: isBluetooth.leftPadding - y: parent.height / 2 - height / 2 - radius: 4 - border.color: isBluetooth.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor - color: subsurfaceTheme.backgroundColor - - Rectangle { - width: 12 - height: 12 - x: 4 - y: 4 - radius: 3 - color: isBluetooth.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor - visible: btEnabled && isBluetooth.checked - } + downloadThread.deviceData.bluetoothMode = false } } } -- cgit v1.2.3-70-g09d2