ServerContainers qml ui started to fix
This commit is contained in:
parent
40fa2d6779
commit
542f363e92
17 changed files with 837 additions and 507 deletions
41
client/ui/models/protocols_model.h
Normal file
41
client/ui/models/protocols_model.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef PROTOCOLS_MODEL_H
|
||||
#define PROTOCOLS_MODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QJsonObject>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
#include "settings.h"
|
||||
#include "containers/containers_defs.h"
|
||||
|
||||
class ProtocolsModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProtocolsModel(QObject *parent = nullptr);
|
||||
public:
|
||||
enum SiteRoles {
|
||||
NameRole = Qt::UserRole + 1,
|
||||
DescRole,
|
||||
isVpnTypeRole,
|
||||
isOtherTypeRole,
|
||||
isInstalledRole
|
||||
};
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
void setSelectedServerIndex(int index);
|
||||
void setSelectedDockerContainer(DockerContainer c);
|
||||
|
||||
protected:
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private:
|
||||
int m_selectedServerIndex;
|
||||
DockerContainer m_selectedDockerContainer;
|
||||
Settings m_settings;
|
||||
};
|
||||
|
||||
#endif // PROTOCOLS_MODEL_H
|
Loading…
Add table
Add a link
Reference in a new issue