QML UI: show the VendorList on the Download from DC

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2017-05-12 18:17:23 +02:00 committed by Dirk Hohndel
parent 9951592216
commit f78fdf3d0f
2 changed files with 8 additions and 1 deletions

View file

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

View file

@ -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) {