mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
f9b106cf5b
* 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
34 lines
1.1 KiB
C++
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
|
|
|