supported container on connection (#736)

This commit is contained in:
Nethius
2024-04-07 01:42:17 +07:00
committed by GitHub
parent e39efb1d68
commit 10ea9b418a
7 changed files with 77 additions and 46 deletions

View File

@@ -83,6 +83,16 @@ QJsonObject ContainersModel::getContainerConfig(const int containerIndex)
return qvariant_cast<QJsonObject>(data(index(containerIndex), ConfigRole));
}
bool ContainersModel::isSupportedByCurrentPlatform(const int containerIndex)
{
return qvariant_cast<bool>(data(index(containerIndex), IsSupportedRole));
}
bool ContainersModel::isServiceContainer(const int containerIndex)
{
return qvariant_cast<amnezia::ServiceType>(data(index(containerIndex), ServiceTypeRole) == ServiceType::Other);
}
QHash<int, QByteArray> ContainersModel::roleNames() const
{
QHash<int, QByteArray> roles;