QML UI: move BT handling into core code

This shouldn't be part of the UI (qmlmanager), but part of our
overall handling of dive computers and BT devices.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-05 19:41:57 -07:00
parent 3b993fbaad
commit b14a522f4f
8 changed files with 305 additions and 199 deletions

View file

@ -57,11 +57,11 @@ Kirigami.Page {
id: comboVendor
Layout.fillWidth: true
model: vendorList
currentIndex: manager.getVendorIndex()
currentIndex: downloadThread.data().getDetectedVendorIndex()
onCurrentTextChanged: {
comboProduct.model = manager.getDCListFromVendor(comboVendor.currentText)
if (currentIndex == manager.getVendorIndex())
comboProduct.currentIndex = manager.getProductIndex()
comboProduct.model = downloadThread.data().getProductListFromVendor(comboVendor.currentText)
if (currentIndex == downloadThread.data().getDetectedVendorIndex())
comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex()
}
}
Kirigami.Label { text: qsTr(" Dive Computer:") }
@ -74,7 +74,7 @@ Kirigami.Page {
Kirigami.Label { text: qsTr("Bluetooth download:") }
CheckBox {
id: isBluetooth
checked: manager.getVendorIndex() != -1
checked: downloadThread.data().getDetectedVendorIndex() != -1
}
}