mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: Fill the product list
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f78fdf3d0f
commit
0e4c996f51
3 changed files with 14 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue