feat: complete delay messages

This commit is contained in:
semenov
2025-08-05 16:34:26 +03:00
parent a6022d7ec8
commit c3bd64588a
12 changed files with 51 additions and 61 deletions

View File

@@ -12,7 +12,7 @@ public:
Client(QString name, QString address, QString port,QObject *parent = nullptr):
login(""),
ready(false),
TypeClient(TypeClientAutorization::TYPE_SIMPLE)
typeClient(TypeClientAutorization::TYPE_QT_CLIENT)
{
this->name = name;
this->address = address;
@@ -57,28 +57,31 @@ public:
this->ready = ready;
}
void setUnity(bool flag)
void setUnity(TypeClientAutorization type)
{
isUnity = flag;
typeClient = type;
}
bool getIsUnity()
TypeClientAutorization GETTYPE()
{
return isUnity;
return typeClient;
}
void setTypeClient(TypeClientAutorization TypeClient)
{
this->TypeClient = TypeClient;
this->typeClient = TypeClient;
}
TypeClientAutorization getTypeClient()
{
return TypeClient;
return typeClient;
}
void changePackageResponse()
{
isUnity = !isUnity;
if (typeClient == TypeClientAutorization::TYPE_QT_CLIENT)
typeClient = TypeClientAutorization::TYPE_UNITY_CLIENT;
else if (typeClient == TypeClientAutorization::TYPE_UNITY_CLIENT)
typeClient = TypeClientAutorization::TYPE_QT_CLIENT;
}
bool operator == (Client* right)
@@ -105,8 +108,6 @@ public:
return userType;
}
QString getId()
{
return id;
@@ -127,9 +128,8 @@ private:
QString login;
bool ready;
bool isLoggedIn;
bool isUnity = false;
TypeClientAutorization TypeClient;
TypeClientAutorization typeClient;
UserType userType;
};

View File

@@ -44,7 +44,8 @@ struct SXmlAnswerTag
};
enum TypeClientAutorization{
TYPE_SIMPLE = 0,
TYPE_QT_CLIENT = 0,
TYPE_UNITY_CLIENT = 1,
TYPE_GUI = 10
};