diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-06-10 10:09:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-12 09:55:27 -0700 |
commit | 790c0dcfc876d50b21791ad7b81f693796e2173b (patch) | |
tree | 3ab9032be99ca11d666eb4188fca05e950dbd579 /mobile-widgets/qml/DownloadFromDiveComputer.qml | |
parent | c7a35098008b215b1cccad512c4c568cd618f2c6 (diff) | |
download | subsurface-790c0dcfc876d50b21791ad7b81f693796e2173b.tar.gz |
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 <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DownloadFromDiveComputer.qml')
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 11 |
1 files changed, 6 insertions, 5 deletions
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 } |