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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-05-29 15:11:11 -07:00
parent 18eff8f2b3
commit c8c56b3737

View file

@ -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
}
}