#ifndef INSTALLCONTROLLER_H #define INSTALLCONTROLLER_H #include #include "core/defs.h" #include "containers/containers_defs.h" #include "ui/models/servers_model.h" #include "ui/models/containers_model.h" class InstallController : public QObject { Q_OBJECT public: explicit InstallController(const QSharedPointer &serversModel, const QSharedPointer &containersModel, const std::shared_ptr &settings, QObject *parent = nullptr); public slots: void install(DockerContainer container, int port, TransportProto transportProto); void setCurrentlyInstalledServerCredentials(const QString &hostName, const QString &userName, const QString &secretData); void setShouldCreateServer(bool shouldCreateServer); signals: void installContainerFinished(); void installServerFinished(); void installationErrorOccurred(QString errorMessage); private: void installServer(DockerContainer container, QJsonObject& config); void installContainer(DockerContainer container, QJsonObject& config); QSharedPointer m_serversModel; QSharedPointer m_containersModel; std::shared_ptr m_settings; ServerCredentials m_currentlyInstalledServerCredentials; bool m_shouldCreateServer; }; #endif // INSTALLCONTROLLER_H