feat: load to server block

This commit is contained in:
semenov
2025-01-17 16:47:22 +03:00
parent 4b9ee1738a
commit 91a4b04f05
11 changed files with 99 additions and 17 deletions

View File

@@ -8,11 +8,16 @@ ProcessingSystem::ProcessingSystem(ProviderDBLMS* providerDBLMS, QObject *parent
this->providerDBLMS = providerDBLMS;
}
void ProcessingSystem::initialize(ServerLMSWidget *server, DataParser *dataParser, CommonClientHandler *commonClientHandler,Logger *logger)
void ProcessingSystem::initialize(ServerLMSWidget *server,
DataParser *dataParser,
CommonClientHandler *commonClientHandler,
Logger *logger,
UpdateController *updateController)
{
this->commonClientServer = commonClientHandler;
this->dataParser = dataParser;
this->server = server;
this->updateController = updateController;
connect(this,&ProcessingSystem::sigAuthChanged,commonClientHandler, &CommonClientHandler::slot_AuthChanged,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
@@ -278,6 +283,18 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
{
client->sendVersionList();
}
else if(clientNotify.Code == commandCanChangeVersion)
{
if (updateController->getCurrentVersion()->getIsChangeable())
{
client->sigSendNotify(commandChangable);
}
else
{
client->sigSendNotify(commandUnchangable);
}
}
}