From 790c0dcfc876d50b21791ad7b81f693796e2173b Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Sat, 10 Jun 2017 10:09:56 +0200 Subject: QML UI: add internal admin for virtual vendor Added a list of paired BT devices for the "Paired BT Devices" vendor. The devices under this vendor represent all BT devces that can be found from the local BT interface. Some special processing is required, as the BT provided data is (obviously) missing the specific data needed to open a BT device using libdc code. This processing is not in this commit, but will follow. This commit is preparation for that. Signed-off-by: Jan Mulder Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index 6a24f2dc9..80aaaa251 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -57,11 +57,11 @@ Kirigami.Page { id: comboVendor Layout.fillWidth: true model: vendorList - currentIndex: downloadThread.data().getDetectedVendorIndex() + currentIndex: downloadThread.data().getDetectedVendorIndex(currentText) onCurrentTextChanged: { comboProduct.model = downloadThread.data().getProductListFromVendor(comboVendor.currentText) - if (currentIndex == downloadThread.data().getDetectedVendorIndex()) - comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex() + if (currentIndex == downloadThread.data().getDetectedVendorIndex(currentText)) + comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex(currentText, comboProduct.currentText) } } Kirigami.Label { text: qsTr(" Dive Computer:") } @@ -74,7 +74,7 @@ Kirigami.Page { Kirigami.Label { text: qsTr("Bluetooth download:") } CheckBox { id: isBluetooth - checked: downloadThread.data().getDetectedVendorIndex() != -1 + checked: downloadThread.data().getDetectedVendorIndex(ComboBox.currentText) != -1 } } @@ -89,7 +89,8 @@ Kirigami.Page { onClicked: { text: qsTr("Retry") if (downloadThread.deviceData.bluetoothMode) { - var addr = downloadThread.data().getDetectedDeviceAddress() + var addr = downloadThread.data().getDetectedDeviceAddress(comboVendor.currentText, + comboProduct.currentText) if (addr !== "") downloadThread.deviceData.devName = addr } -- cgit v1.2.3-70-g09d2