ref: change message attributes

This commit is contained in:
semenov
2025-08-04 16:37:54 +03:00
parent 501b84b13a
commit 33c7a31143
12 changed files with 62 additions and 53 deletions

View File

@@ -96,13 +96,13 @@ public:
isLoggedIn = value;
}
void setAccessType(QString type)
void setAccessType(UserType type)
{
accessType = type;
userType = type;
}
QString getAccessType()
UserType getAccessType()
{
return accessType;
return userType;
}
@@ -130,7 +130,7 @@ private:
bool isUnity = false;
TypeClientAutorization TypeClient;
QString accessType = "";
UserType userType;
};
#endif // CLIENT_H

View File

@@ -51,7 +51,9 @@ enum TypeClientAutorization{
enum UserType
{
INSTRUCTOR,
TRAINEE
TRAINEE,
NONE = 100
};
class ClientAutorization
@@ -104,18 +106,20 @@ public:
class ClientMessage
{
public:
QString From;
QString To;
QString From;//формат"id-type"
QString To;//формат"id-type"
QString Text;
QString Type; //ТИП ЮЗЕРА К КОТОРОМУ ПРИХОДИТ СООБЩЕНИЕ
//id-0 инструктор
//id-1 обучаемый
ClientMessage(){}
ClientMessage(QString from,QString to,QString text,QString userType)
ClientMessage(QString from,QString to,QString text)
{
From = from;
To = to;
Text = text;
Type = userType;
}
};