mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
ref 2
This commit is contained in:
@@ -1,35 +1,25 @@
|
||||
#ifndef SERVERLMSWIDGET_H
|
||||
#define SERVERLMSWIDGET_H
|
||||
|
||||
#include "ServerLMS_global.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QMap>
|
||||
#include <QTranslator>
|
||||
#include <QMutex>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#include <Systems/Parsers/dataparser.h>
|
||||
#include <Systems/sendsystem.h>
|
||||
#include <Systems/processingsystem.h>
|
||||
#include <Systems/updatecontroller.h>
|
||||
#include <Systems/assetsmanager.h>
|
||||
#include <Systems/recognizesystem.h>
|
||||
#include <Systems/logger.h>
|
||||
#include <Systems/commonclienthandler.h>
|
||||
#include <Systems/assetsmanager.h>
|
||||
#include "ServerLMS_global.h"
|
||||
|
||||
#include <Data/typesDataServerClient.h>
|
||||
#include <Data/Client.h>
|
||||
#include "logger.h"
|
||||
#include "waitanimationwidget.h"
|
||||
#include "specialmessagebox.h"
|
||||
|
||||
#include "Parsers/dataparser.h"
|
||||
#include "processingsystem.h"
|
||||
#include "updatecontroller.h"
|
||||
#include "assetsmanager.h"
|
||||
#include "commonclienthandler.h"
|
||||
#include "assetsmanager.h"
|
||||
#include "multithreadserver.h"
|
||||
#include "providerdblms.h"
|
||||
#include "docsupdater.h"
|
||||
#include "waitanimationwidget.h"
|
||||
#include "specialmessagebox.h"
|
||||
#include "cficontroller.h"
|
||||
|
||||
|
||||
@@ -38,11 +28,9 @@ class ServerLMSWidget;
|
||||
}
|
||||
|
||||
class DataParser;
|
||||
class SendSystem;
|
||||
class ProcessingSystem;
|
||||
class Logger;
|
||||
class UpdateController;
|
||||
class RecognizeSystem;
|
||||
class ClientHandler;
|
||||
class MultiThreadServer;
|
||||
class AssetsManager;
|
||||
@@ -64,34 +52,31 @@ public:
|
||||
~ServerLMSWidget();
|
||||
|
||||
public:
|
||||
void start();
|
||||
void startInitialization();
|
||||
QString getLanguage();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
signals:
|
||||
//MAINWINDOW, ТРЕЙ
|
||||
//сигнал смены языка
|
||||
void signal_LanguageChanged(QString language);
|
||||
|
||||
//сигнал вывода сообщения из трея
|
||||
void signal_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::MessageIcon iconMsg = QSystemTrayIcon::Information);
|
||||
|
||||
//синал обновления состояния сервера (иконка в трее)
|
||||
void signal_Tray_UpdateStateServer(EStateServer state_Server, EStateBlockAutorization state_BlockAutorization);
|
||||
//сигналы меню трея
|
||||
void signal_Menu_ShowWindow();
|
||||
void signal_Menu_HideWindow();
|
||||
//сигнал о наличии ошибок начальной инициализации
|
||||
void signal_StartInitHasError(int code);
|
||||
//сигнал об окончании начальной инициализации
|
||||
void signal_StartInitFinished();
|
||||
|
||||
void sigRecognize();
|
||||
void sigCalculateFullHash();
|
||||
void sigUpdateControllerInitialize(CommonClientHandler* commonClientHandler,DataParser *dataParser,AssetsManager *assetManager);
|
||||
|
||||
//void signal_DocsChanged();
|
||||
void signal_hasError(int code);
|
||||
|
||||
void signal_updateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization);
|
||||
|
||||
void signal_updateDocsXML();
|
||||
|
||||
void signal_InitializeFinished();
|
||||
void signal_UpdateControllerInitialize(CommonClientHandler* commonClientHandler,DataParser *dataParser,AssetsManager *assetManager);
|
||||
void signal_UpdateDocsXML();
|
||||
|
||||
void signal_TryConnectionToDB();
|
||||
void signal_TryDisConnectionFromDB();
|
||||
@@ -100,55 +85,23 @@ signals:
|
||||
void signal_StopServer();
|
||||
|
||||
public slots:
|
||||
//ИНДИКАЦИЯ
|
||||
void slot_LanguageChanged(QString language);
|
||||
void slot_UpdateListClients(QStringList listFullName);
|
||||
void slot_BlockAutorizationIndicate(bool block, QString blocker, QString types);
|
||||
void slot_AddMessageToLog(QString message);
|
||||
|
||||
void slot_ErrorPostgreSQL(QString text);
|
||||
void slot_StateConnectionToDB(bool dbIsConnected, DataBaseSettings dbSettings);
|
||||
void slot_StateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization);
|
||||
|
||||
void slot_UpdateDocs();
|
||||
void slot_StateConnectionToDB(bool state_dbIsConnected, DataBaseSettings state_dbSettings);
|
||||
void slot_StateServer(EStateServer state_Server, EStateBlockAutorization state_BlockAutorization);
|
||||
void slot_StateVersionMaterials(QString state_VersionMaterials);
|
||||
|
||||
void slot_UpdateControllerInitializeFinished();
|
||||
|
||||
void slot_StateVersionMaterials(QString stateVersionMaterials);
|
||||
void slot_UpdateDocsCompleted();
|
||||
|
||||
void slot_ResultTryConnectDb(bool result);
|
||||
void slot_ResultTryDisConnectDb(bool result);
|
||||
|
||||
public:
|
||||
QString getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
void setError(int code)
|
||||
{
|
||||
if(code == 100)
|
||||
{
|
||||
QString textError = tr("No Client files found!") + "\n\n" +
|
||||
tr("* check Application for the presence of a folder with a build \n"
|
||||
"* check SharedData for a folder with the base version and the name base");
|
||||
|
||||
SpecMsgBox::CriticalClose(this, textError);
|
||||
}
|
||||
errorCode = code;
|
||||
emit signal_hasError(code);
|
||||
}
|
||||
|
||||
int hasError() const
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
ProcessingSystem* getProcessingSystem()
|
||||
{
|
||||
return processingSystem;
|
||||
}
|
||||
|
||||
void removeClient(int socketId);
|
||||
void slot_SetError(int code);
|
||||
|
||||
private slots:
|
||||
void on_btnStartServer_clicked();
|
||||
@@ -168,6 +121,8 @@ private:
|
||||
private:
|
||||
void startInitialization_step0();
|
||||
void startInitialization_step1();
|
||||
void startInitialization_step2();
|
||||
void startInitialization_step3();
|
||||
void tryConnectionToDB();
|
||||
|
||||
private:
|
||||
@@ -192,22 +147,21 @@ private:
|
||||
DocsUpdater* docsUpdater; //updateThread
|
||||
CfiController* cfiController; //updateThread
|
||||
|
||||
bool first; // для тестов Unity
|
||||
|
||||
QTranslator qtLanguageTranslator;
|
||||
QString language;
|
||||
|
||||
int errorCode;
|
||||
|
||||
QString stateVersionMaterials;
|
||||
bool dbIsConnected;
|
||||
DataBaseSettings dbSettings;
|
||||
EStateServer stateServer;
|
||||
EStateBlockAutorization stateBlockAutorization;
|
||||
QString state_VersionMaterials;
|
||||
bool state_dbIsConnected;
|
||||
DataBaseSettings state_dbSettings;
|
||||
EStateServer state_Server;
|
||||
EStateBlockAutorization state_BlockAutorization;
|
||||
|
||||
bool flStartInitialization;
|
||||
bool flTryConnectionToDB;
|
||||
bool flNeedReconnectDB;
|
||||
bool flTryUpdateDocs;
|
||||
};
|
||||
|
||||
#endif // SERVERLMSWIDGET_H
|
||||
|
||||
Reference in New Issue
Block a user