summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml14
-rw-r--r--subsurface-mobile-helper.cpp1
2 files changed, 14 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index b7f000a46..d57068522 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -26,7 +26,7 @@ Kirigami.Page {
deviceData.product : comboProduct.currentText
//TODO: make this dynamic?
- deviceData.devName : "/tmp/ttyS1"
+ deviceData.devName : comboConnection.currentText
//TODO: Make this the default on the C++
deviceData.bluetoothMode : isBluetooth.checked
@@ -82,10 +82,22 @@ Kirigami.Page {
Layout.fillWidth: true
model: null
currentIndex: productidx
+ onCurrentTextChanged: {
+ comboConnection.currentIndex = downloadThread.data().getMatchingAddress(comboVendor.currentText, currentText)
+ }
+
onModelChanged: {
currentIndex = productidx
}
}
+ Kirigami.Label { text: qsTr(" Connection:") }
+ ComboBox {
+ id: comboConnection
+ Layout.fillWidth: true
+ model: connectionListModel
+ currentIndex: -1
+ }
+
Kirigami.Label { text: btEnabled ? qsTr("Bluetooth download:") : qsTr("No Bluetooth support detected")}
CheckBox {
id: isBluetooth
diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp
index 00c0e2c08..e84fd82d1 100644
--- a/subsurface-mobile-helper.cpp
+++ b/subsurface-mobile-helper.cpp
@@ -75,6 +75,7 @@ void run_ui()
ctxt->setContextProperty("diveModel", sortModel);
ctxt->setContextProperty("gpsModel", gpsSortModel);
ctxt->setContextProperty("vendorList", vendorList);
+ ctxt->setContextProperty("connectionListModel", &connectionListModel);
ctxt->setContextProperty("logModel", MessageHandlerModel::self());
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));