mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Начал реализовывать обмен запросами к БД
This commit is contained in:
@@ -69,6 +69,8 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
|
||||
connect(processingSystem,&ProcessingSystem::sigLogMessage,logger,&Logger::addTextToLogger);
|
||||
connect(this,&ServerLMSWidget::sigLog,logger,&Logger::addTextToLogger);
|
||||
|
||||
connect(processingSystem,&ProcessingSystem::sigAuthChanged,this, &ServerLMSWidget::slot_AuthChanged);
|
||||
|
||||
on_btnStartServer_clicked();
|
||||
|
||||
first = true;
|
||||
@@ -189,6 +191,21 @@ void ServerLMSWidget::slot_BlockAutorization(bool block)
|
||||
unBlockAutorization();
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slot_AuthChanged()
|
||||
{
|
||||
//Проходим все открытые сокеты
|
||||
foreach(int idSocket, clientsMap.keys())
|
||||
{
|
||||
//Проверяем, есть ли клиенты TYPE_GUI
|
||||
if(clientsMap[idSocket]->getClient()->getTypeClient() == TypeClientAutorization::TYPE_GUI)
|
||||
{//Отправляем этому клиенту обновление списков
|
||||
ClientQueryToDB queryToDB;
|
||||
queryToDB.typeQuery = TypeQueryToDB::TYPE_QUERY_GET_LIST_INSTRUCTORS;
|
||||
processingSystem->processingClientQueryToDB(clientsMap[idSocket], queryToDB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ServerLMSWidget::removeClient(int idSocket)
|
||||
{
|
||||
clientsMap.remove(idSocket);
|
||||
|
||||
Reference in New Issue
Block a user