mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
3b993fbaad
commit
b14a522f4f
8 changed files with 305 additions and 199 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue