added exportController and PageShare
- added a blank PageSettingsProtocol
This commit is contained in:
parent
3034019d5a
commit
be7386f0d7
38 changed files with 1080 additions and 115 deletions
|
@ -25,10 +25,10 @@ bool ContainersModel::setData(const QModelIndex &index, const QVariant &value, i
|
|||
// return ContainerProps::containerHumanNames().value(container);
|
||||
case DescRole:
|
||||
// return ContainerProps::containerDescriptions().value(container);
|
||||
case ConfigRole:
|
||||
m_settings->setContainerConfig(m_currentlyProcessedServerIndex,
|
||||
container,
|
||||
value.toJsonObject());
|
||||
case ConfigRole: //todo save to model also
|
||||
m_settings->setContainerConfig(m_currentlyProcessedServerIndex,
|
||||
container,
|
||||
value.toJsonObject());
|
||||
case ServiceTypeRole:
|
||||
// return ContainerProps::containerService(container);
|
||||
case DockerContainerRole:
|
||||
|
@ -76,8 +76,8 @@ QVariant ContainersModel::data(const QModelIndex &index, int role) const
|
|||
return ContainerProps::easySetupDescription(container);
|
||||
case IsInstalledRole:
|
||||
return m_containers.contains(container);
|
||||
case IsCurrentlyInstalledRole:
|
||||
return container == static_cast<DockerContainer>(m_currentlyInstalledContainerIndex);
|
||||
case IsCurrentlyProcessedRole:
|
||||
return container == static_cast<DockerContainer>(m_currentlyProcessedContainerIndex);
|
||||
case IsDefaultRole:
|
||||
return container == m_defaultContainerIndex;
|
||||
case IsSupportedRole:
|
||||
|
@ -97,9 +97,9 @@ void ContainersModel::setCurrentlyProcessedServerIndex(int index)
|
|||
emit defaultContainerChanged();
|
||||
}
|
||||
|
||||
void ContainersModel::setCurrentlyInstalledContainerIndex(int index)
|
||||
void ContainersModel::setCurrentlyProcessedContainerIndex(int index)
|
||||
{
|
||||
m_currentlyInstalledContainerIndex = index;
|
||||
m_currentlyProcessedContainerIndex = index;
|
||||
}
|
||||
|
||||
DockerContainer ContainersModel::getDefaultContainer()
|
||||
|
@ -112,9 +112,9 @@ QString ContainersModel::getDefaultContainerName()
|
|||
return ContainerProps::containerHumanNames().value(m_defaultContainerIndex);
|
||||
}
|
||||
|
||||
int ContainersModel::getCurrentlyInstalledContainerIndex()
|
||||
int ContainersModel::getCurrentlyProcessedContainerIndex()
|
||||
{
|
||||
return m_currentlyInstalledContainerIndex;
|
||||
return m_currentlyProcessedContainerIndex;
|
||||
}
|
||||
|
||||
void ContainersModel::removeAllContainers()
|
||||
|
@ -153,7 +153,7 @@ QHash<int, QByteArray> ContainersModel::roleNames() const {
|
|||
roles[EasySetupDescriptionRole] = "easySetupDescription";
|
||||
|
||||
roles[IsInstalledRole] = "isInstalled";
|
||||
roles[IsCurrentlyInstalledRole] = "isCurrentlyInstalled";
|
||||
roles[IsCurrentlyProcessedRole] = "isCurrentlyProcessed";
|
||||
roles[IsDefaultRole] = "isDefault";
|
||||
roles[IsSupportedRole] = "isSupported";
|
||||
return roles;
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
EasySetupDescriptionRole,
|
||||
|
||||
IsInstalledRole,
|
||||
IsCurrentlyInstalledRole,
|
||||
IsCurrentlyProcessedRole,
|
||||
IsDefaultRole,
|
||||
IsSupportedRole
|
||||
};
|
||||
|
@ -45,8 +45,8 @@ public slots:
|
|||
QString getDefaultContainerName();
|
||||
|
||||
void setCurrentlyProcessedServerIndex(int index);
|
||||
void setCurrentlyInstalledContainerIndex(int index);
|
||||
int getCurrentlyInstalledContainerIndex();
|
||||
void setCurrentlyProcessedContainerIndex(int index);
|
||||
int getCurrentlyProcessedContainerIndex();
|
||||
|
||||
void removeAllContainers();
|
||||
void clearCachedProfiles();
|
||||
|
@ -59,7 +59,7 @@ private:
|
|||
|
||||
|
||||
int m_currentlyProcessedServerIndex;
|
||||
int m_currentlyInstalledContainerIndex;
|
||||
int m_currentlyProcessedContainerIndex;
|
||||
DockerContainer m_defaultContainerIndex;
|
||||
|
||||
std::shared_ptr<Settings> m_settings;
|
||||
|
|
|
@ -75,6 +75,11 @@ void ServersModel::setCurrentlyProcessedServerIndex(int index)
|
|||
m_currenlyProcessedServerIndex = index;
|
||||
}
|
||||
|
||||
int ServersModel::getCurrentlyProcessedServerIndex()
|
||||
{
|
||||
return m_currenlyProcessedServerIndex;
|
||||
}
|
||||
|
||||
bool ServersModel::isDefaultServerCurrentlyProcessed()
|
||||
{
|
||||
return m_defaultServerIndex == m_currenlyProcessedServerIndex;
|
||||
|
|
|
@ -37,6 +37,7 @@ public slots:
|
|||
const int getServersCount();
|
||||
|
||||
void setCurrentlyProcessedServerIndex(int index);
|
||||
int getCurrentlyProcessedServerIndex();
|
||||
ServerCredentials getCurrentlyProcessedServerCredentials();
|
||||
|
||||
void addServer(const QJsonObject &server);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue