aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml8
-rw-r--r--mobile-widgets/qmlmanager.cpp6
-rw-r--r--mobile-widgets/qmlmanager.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 5788ab571..ecab94774 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -37,10 +37,16 @@ Kirigami.Page {
columns: 2
Kirigami.Label { text: qsTr(" Vendor name: ") }
ComboBox {
+ id: comboVendor
Layout.fillWidth: true
model: vendorList
}
- Kirigami.Label { text: qsTr(" Dive Computer:") } ComboBox { Layout.fillWidth: true }
+ Kirigami.Label { text: qsTr(" Dive Computer:") }
+ ComboBox {
+ id: comboProduct
+ Layout.fillWidth: true
+ model: manager.getDCListFromVendor(comboVendor.currentText)
+ }
}
ProgressBar {
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index b683bafae..4d2999049 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -24,6 +24,7 @@
#include "core/subsurface-qt/SettingsObjectWrapper.h"
#include "core/membuffer.h"
#include "qt-models/tankinfomodel.h"
+#include "core/downloadfromdcthread.h"
QMLManager *QMLManager::m_instance = NULL;
@@ -1513,3 +1514,8 @@ void QMLManager::setShowPin(bool enable)
m_showPin = enable;
emit showPinChanged();
}
+
+QStringList QMLManager::getDCListFromVendor(const QString& vendor)
+{
+ return productList[vendor];
+}
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index fe9e930b6..db170704b 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -113,6 +113,7 @@ public:
QStringList cylinderInit() const;
bool showPin() const;
void setShowPin(bool enable);
+ Q_INVOKABLE QStringList getDCListFromVendor(const QString& vendor);
public slots:
void applicationStateChanged(Qt::ApplicationState state);