mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refract Server 0
This commit is contained in:
@@ -24,13 +24,12 @@
|
||||
|
||||
#include <Data/typesDataServerClient.h>
|
||||
#include <Data/Client.h>
|
||||
|
||||
#include "multithreadserver.h"
|
||||
#include "providerdblms.h"
|
||||
#include "docsupdater.h"
|
||||
|
||||
#include "waitanimationwidget.h"
|
||||
#include "specialmessagebox.h"
|
||||
|
||||
#include "cficontroller.h"
|
||||
|
||||
|
||||
@@ -51,25 +50,24 @@ class ChatSystem;
|
||||
class DocsUpdater;
|
||||
class CfiController;
|
||||
|
||||
|
||||
class SERVERLMS_EXPORT ServerLMSWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ServerLMSWidget(QWidget *parent = nullptr);
|
||||
~ServerLMSWidget();
|
||||
|
||||
void start();
|
||||
|
||||
public:
|
||||
static const QString languageENG;
|
||||
static const QString languageRUS;
|
||||
|
||||
protected:
|
||||
// Метод получения событий
|
||||
// В нём будет производиться проверка события смены перевода приложения
|
||||
void changeEvent(QEvent * event) override;
|
||||
public:
|
||||
explicit ServerLMSWidget(QWidget *parent = nullptr);
|
||||
~ServerLMSWidget();
|
||||
|
||||
public:
|
||||
void start();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
signals:
|
||||
@@ -95,19 +93,30 @@ signals:
|
||||
|
||||
void signal_InitializeFinished();
|
||||
|
||||
void signal_TryConnectionToDB();
|
||||
void signal_TryDisConnectionFromDB();
|
||||
|
||||
void signal_StartServer();
|
||||
void signal_StopServer();
|
||||
|
||||
public slots:
|
||||
void slot_LanguageChanged(QString language);
|
||||
void slot_UpdateListClients();
|
||||
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_startInitialization_step1();
|
||||
void slot_UpdateControllerInitializeFinished();
|
||||
|
||||
void slot_setVersion(QString versionStr);
|
||||
void slot_StateVersionMaterials(QString stateVersionMaterials);
|
||||
|
||||
void slot_ResultTryConnectDb(bool result);
|
||||
void slot_ResultTryDisConnectDb(bool result);
|
||||
|
||||
public:
|
||||
QString getLanguage()
|
||||
@@ -139,11 +148,6 @@ public:
|
||||
return processingSystem;
|
||||
}
|
||||
|
||||
QMutex *getMutex() const
|
||||
{
|
||||
return mutex;
|
||||
}
|
||||
|
||||
void removeClient(int socketId);
|
||||
|
||||
private slots:
|
||||
@@ -151,18 +155,20 @@ private slots:
|
||||
void on_btnStopServer_clicked();
|
||||
void on_btnSettings_clicked();
|
||||
|
||||
private:
|
||||
void setLanguageInterfase();
|
||||
private:
|
||||
void updateMyStyleSheet();
|
||||
QString loadStyleSheet();
|
||||
void initLanguageInterfase();
|
||||
|
||||
void startInitialization_step0();
|
||||
|
||||
void tryConnectionToDB();
|
||||
|
||||
private:
|
||||
void updateStateOnlyServer();
|
||||
void updateStateOnlyDB();
|
||||
void updateStateOnlyVersion();
|
||||
void updateStateOnlyVersionMaterials();
|
||||
|
||||
private:
|
||||
void startInitialization_step0();
|
||||
void startInitialization_step1();
|
||||
void tryConnectionToDB();
|
||||
|
||||
private:
|
||||
Ui::ServerLMSWidget *ui;
|
||||
@@ -172,31 +178,36 @@ private:
|
||||
|
||||
QThread *updateThread;
|
||||
QThread *loggerThread;
|
||||
QThread *serverThread;
|
||||
|
||||
QMutex *mutex;
|
||||
MultiThreadServer *server; //serverThread
|
||||
DataParser *dataParser; //serverThread
|
||||
ProcessingSystem *processingSystem; //serverThread
|
||||
CommonClientHandler *commonClientHandler; //serverThread
|
||||
ChatSystem *chatSystem; //serverThread
|
||||
ProviderDBLMS* providerDBLMS; //serverThread
|
||||
|
||||
MultiThreadServer *server;
|
||||
|
||||
DataParser *dataParser;
|
||||
ProcessingSystem *processingSystem;
|
||||
UpdateController *updateController; //updateThread
|
||||
AssetsManager *assetsManager; //updateThread
|
||||
CommonClientHandler *commonClientHandler;
|
||||
ChatSystem *chatSystem;
|
||||
AssetsManager *assetsManager; //updateThread
|
||||
DocsUpdater* docsUpdater; //updateThread
|
||||
CfiController* cfiController; //updateThread
|
||||
|
||||
DocsUpdater* docsUpdater; //updateThread
|
||||
CfiController* cfiController; //updateThread
|
||||
|
||||
ProviderDBLMS* providerDBLMS;
|
||||
|
||||
bool first = true; // для тестов Unity
|
||||
bool first; // для тестов Unity
|
||||
|
||||
QTranslator qtLanguageTranslator;
|
||||
QString language;
|
||||
|
||||
int errorCode;
|
||||
QString versionStr;
|
||||
|
||||
QString stateVersionMaterials;
|
||||
bool dbIsConnected;
|
||||
DataBaseSettings dbSettings;
|
||||
EStateServer stateServer;
|
||||
EStateBlockAutorization stateBlockAutorization;
|
||||
|
||||
bool flStartInitialization;
|
||||
bool flTryConnectionToDB;
|
||||
bool flNeedReconnectDB;
|
||||
};
|
||||
|
||||
#endif // SERVERLMSWIDGET_H
|
||||
|
||||
Reference in New Issue
Block a user