feat: add client information

This commit is contained in:
semenov
2025-11-20 17:20:52 +03:00
parent 633881847b
commit 6665f417c9
12 changed files with 11023 additions and 10881 deletions

105
Data/Client.h Normal file
View File

@@ -0,0 +1,105 @@
#ifndef CLIENT_H
#define CLIENT_H
#include <QString>
#include <QTcpSocket>
class Client
{
public:
Client(QObject *parent = nullptr):
login(""),
ready(false)
{ };
~Client(){};
public:
QString getFullName()
{
return fullName;
};
void setLogin(QString login)
{
this->login = login;
isLoggedIn = true;
fullName = "Name: " + name + " IP: " + address + " port : " + port + " login: " + login;
}
QString getLogin()
{
return login;
}
QString getAddress()
{
return address;
}
QString getPort()
{
return port;
}
bool getReady()
{
return ready;
}
void setReady(bool ready)
{
this->ready = ready;
}
bool operator == (Client* right)
{
return this->address == right->address;
}
bool getIsLoggedIn()
{
return isLoggedIn;
}
void setIsLoggedIn(bool value)
{
isLoggedIn = value;
}
QString getId()
{
return id;
}
void setId(QString value)
{
id = value;
}
QByteArray getClientHash()
{
return clientHash;
}
void setClientHash(const QByteArray &value)
{
clientHash = value;
}
private:
QString name;
QString address;
QString port;
QString fullName;
QString id;
QString login;
bool ready;
bool isLoggedIn;
QByteArray clientHash;
};
#endif // CLIENT_H