#ifndef IKEV2CONFIGMODEL_H #define IKEV2CONFIGMODEL_H #include #include #include "containers/containers_defs.h" class Ikev2ConfigModel : public QAbstractListModel { Q_OBJECT public: enum Roles { PortRole = Qt::UserRole + 1, CipherRole }; explicit Ikev2ConfigModel(QObject *parent = nullptr); int rowCount(const QModelIndex &parent = QModelIndex()) const override; bool setData(const QModelIndex &index, const QVariant &value, int role) override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; public slots: void updateModel(const QJsonObject &config); QJsonObject getConfig(); protected: QHash roleNames() const override; private: DockerContainer m_container; QJsonObject m_protocolConfig; QJsonObject m_fullConfig; }; #endif // IKEV2CONFIGMODEL_H