added pages for sftp and tor website settings

This commit is contained in:
vladimir.kuznetsov 2023-07-18 11:15:04 +09:00
parent 75489c00c2
commit 5d677a9115
22 changed files with 713 additions and 6 deletions

View file

@ -0,0 +1,39 @@
#ifndef SFTPCONFIGMODEL_H
#define SFTPCONFIGMODEL_H
#include <QAbstractListModel>
#include <QJsonObject>
#include "containers/containers_defs.h"
class SftpConfigModel : public QAbstractListModel
{
Q_OBJECT
public:
enum Roles {
PortRole = Qt::UserRole + 1,
UserNameRole,
PasswordRole
};
explicit SftpConfigModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
public slots:
void updateModel(const QJsonObject &config);
QJsonObject getConfig();
protected:
QHash<int, QByteArray> roleNames() const override;
private:
DockerContainer m_container;
QJsonObject m_protocolConfig;
QJsonObject m_fullConfig;
};
#endif // SFTPCONFIGMODEL_H