From f78fdf3d0fea3a426f07f24d0ce2d98a1cae0bf0 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 12 May 2017 18:17:23 +0200 Subject: [PATCH] QML UI: show the VendorList on the Download from DC Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 6 +++++- subsurface-mobile-helper.cpp | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index a5ccb9b6f..5788ab571 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -35,7 +35,11 @@ Kirigami.Page { Layout.fillWidth: true GridLayout { columns: 2 - Kirigami.Label { text: qsTr(" Vendor name: ") } ComboBox { Layout.fillWidth: true } + Kirigami.Label { text: qsTr(" Vendor name: ") } + ComboBox { + Layout.fillWidth: true + model: vendorList + } Kirigami.Label { text: qsTr(" Dive Computer:") } ComboBox { Layout.fillWidth: true } } diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index faaa31667..4d960181c 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -21,6 +21,7 @@ #include "qt-models/divelistmodel.h" #include "qt-models/gpslistmodel.h" #include "mobile-widgets/qmlprofile.h" +#include "core/downloadfromdcthread.h" #include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h" @@ -67,6 +68,8 @@ void run_ui() QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("diveModel", sortModel); ctxt->setContextProperty("gpsModel", gpsSortModel); + ctxt->setContextProperty("vendorList", vendorList); + engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml"))); qqWindowObject = engine.rootObjects().value(0); if (!qqWindowObject) {