Files
amnezia-client/client/ui/models/containerProps.h
T
vkamn f9b106cf5b fix: various fixes (#2693)
* fix: fixed country model update

* fix: fixed context menu crush on ios

* fix: fixed passphrase dialog freeze

* fix: fixed country switch

* fix: fixed start minimized

* fix: fixed black screen after remove container

* refactor: return cloak and ss only for view

* fix: fixed default server change after improt while connected

* fix: divider visibility

* fix: fixed revoke admin user

* fix: fixed language restore after backup

* fix: link hover for tor settings page

* fix: fixed openvpn connecntion status

* fix: fixed free color status

* fix: fixed client config update

* chore: bump version
2026-06-04 22:45:53 +08:00

34 lines
1.1 KiB
C++

#ifndef CONTAINERPROPS_H
#define CONTAINERPROPS_H
#include <QObject>
#include "core/utils/containerEnum.h"
#include "core/utils/containers/containerUtils.h"
class ContainerProps : public QObject
{
Q_OBJECT
public:
explicit ContainerProps(QObject *parent = nullptr) : QObject(parent) {}
Q_INVOKABLE QString containerTypeToString(int containerIndex) const {
return amnezia::ContainerUtils::containerTypeToString(static_cast<amnezia::DockerContainer>(containerIndex));
}
Q_INVOKABLE int defaultProtocol(int containerIndex) const {
return static_cast<int>(amnezia::ContainerUtils::defaultProtocol(static_cast<amnezia::DockerContainer>(containerIndex)));
}
Q_INVOKABLE int containerFromString(const QString &container) const {
return static_cast<int>(amnezia::ContainerUtils::containerFromString(container));
}
Q_INVOKABLE bool isUnsupportedContainer(int containerIndex) const {
return amnezia::ContainerUtils::isUnsupportedContainer(static_cast<amnezia::DockerContainer>(containerIndex));
}
};
#endif // CONTAINERPROPS_H