From c8c56b373706ad9be34ba92078e3a457287230a7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 29 May 2017 15:11:11 -0700 Subject: [PATCH] QML UI: populate dive computer vendor and product If we detected a BT dive computer, we can already set up the vendor and product for it (as well as the new BT checkbox). Oddly, in my tests this doesn't set up the product correctly. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index ed4b4ea0a..6a2f72317 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -26,7 +26,7 @@ Kirigami.Page { deviceData.devName : "/tmp/ttyS1" //TODO: Make this the default on the C++ - deviceData.bluetoothMode : false + deviceData.bluetoothMode : isBluetooth.checked deviceData.forceDownload : false deviceData.createNewTrip : false deviceData.deviceId : 0 @@ -57,12 +57,19 @@ Kirigami.Page { id: comboVendor Layout.fillWidth: true model: vendorList + currentIndex: manager.getVendorIndex() } Kirigami.Label { text: qsTr(" Dive Computer:") } ComboBox { id: comboProduct Layout.fillWidth: true model: manager.getDCListFromVendor(comboVendor.currentText) + currentIndex: manager.getProductIndex() + } + Kirigami.Label { text: qsTr("Bluetooth download:") } + CheckBox { + id: isBluetooth + checked: manager.getVendorIndex() != -1 } }