#ifndef PROTOCOLS_MODEL_H #define PROTOCOLS_MODEL_H #include #include #include #include #include "settings.h" #include "containers/containers_defs.h" class ProtocolsModel : public QAbstractListModel { Q_OBJECT public: ProtocolsModel(std::shared_ptr settings, QObject *parent = nullptr); public: enum SiteRoles { NameRole = Qt::UserRole + 1, DescRole, ServiceTypeRole, IsInstalledRole }; int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; Q_INVOKABLE void setSelectedServerIndex(int index); Q_INVOKABLE void setSelectedDockerContainer(DockerContainer c); protected: QHash roleNames() const override; private: int m_selectedServerIndex; DockerContainer m_selectedDockerContainer; std::shared_ptr m_settings; }; #endif // PROTOCOLS_MODEL_H