changed the way to create qml pages, now the page is created when you go to it

- added PageSetupWizardConfigSource, PageSetupWizardInstalling, PageSetupWizardProtocolSettings, PageSetupWizardTextKey
This commit is contained in:
vladimir.kuznetsov 2023-05-03 19:06:16 +03:00
parent 68b27451f2
commit 4f36349630
25 changed files with 503 additions and 158 deletions

View file

@ -56,4 +56,14 @@ void ContainersModel::setSelectedServerIndex(int index)
endResetModel();
}
void ContainersModel::setCurrentlyInstalledContainerIndex(int index)
{
// beginResetModel();
m_currentlyInstalledContainerIndex = createIndex(index, 0);
// endResetModel();
}
QString ContainersModel::getCurrentlyInstalledContainerName()
{
return data(m_currentlyInstalledContainerIndex, NameRole).toString();
}

View file

@ -27,12 +27,16 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_INVOKABLE void setSelectedServerIndex(int index);
Q_INVOKABLE void setCurrentlyInstalledContainerIndex(int index);
Q_INVOKABLE QString getCurrentlyInstalledContainerName();
protected:
QHash<int, QByteArray> roleNames() const override;
private:
int m_selectedServerIndex;
QModelIndex m_currentlyInstalledContainerIndex;
std::shared_ptr<Settings> m_settings;
};