внедрение мессенджера

This commit is contained in:
2025-09-02 15:52:35 +03:00
parent 0da66544f0
commit 179026d4ca
6 changed files with 95 additions and 55 deletions

View File

@@ -406,6 +406,12 @@ void ConnectorToServer::slot_HashReady()
sendQueryTasksXML("amm");
}
void ConnectorToServer::slot_Auth(ServerAuthorization *serverAuth)
{
this->serverAuth = *serverAuth;
emit sigLoginResult(serverAuth);
}
void ConnectorToServer::initialize()
{
createObjects();
@@ -426,7 +432,7 @@ void ConnectorToServer::bindConnection()
connect(this,&ConnectorToServer::signal_sendXMLmsgGUItoServer,sendSystem,&SendSystem::sendXMLmsgGUItoServer);
connect(this,&ConnectorToServer::sigSendAnswerToServer,sendSystem,&SendSystem::sendXMLAnswer,Qt::AutoConnection);
connect(recognizeSystem,&RecognizeSystem::sigAuth,this,&ConnectorToServer::sigLoginResult);
connect(recognizeSystem,&RecognizeSystem::sigAuth,this,&ConnectorToServer::slot_Auth); // ::sigLoginResult);
connect(recognizeSystem,&RecognizeSystem::sigDeAuth,this,&ConnectorToServer::sigDeLoginResult);
connect(recognizeSystem,&RecognizeSystem::signal_ReceiveMessage,this,&ConnectorToServer::signal_receiveMessage,Qt::AutoConnection);
connect(recognizeSystem,&RecognizeSystem::sigShowServerDataList,this,&ConnectorToServer::showServerList);

View File

@@ -69,6 +69,7 @@ public:
bool getIsConnected();
SendSystem *getSendSystem() const;
ServerAuthorization getServerAuth(){return serverAuth;}
bool sendClientNotify(QString command);
public slots:
@@ -88,6 +89,8 @@ public slots:
void slot_HashReady();
void slot_Auth(ServerAuthorization * serverAuth);
signals:
void sigSetConnect(ServerSettings* serverSettings,QThread *thread);
void sigStopConnect();
@@ -148,6 +151,8 @@ private:
ServerSettings serverSettings;
bool isLoggedIn;
ServerAuthorization serverAuth;
};
#endif // CONNECTORTOSERVER_H