mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refact 0
This commit is contained in:
@@ -23,9 +23,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
serverLMSWidget = new ServerLMSWidget(this);
|
serverLMSWidget = new ServerLMSWidget(this);
|
||||||
|
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_StartInitFinished, this, &MainWindow::slot_InitializeFinished);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_StartInitFinished, this, &MainWindow::slot_InitializeFinished);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_StartInitHasError, this, &MainWindow::slot_hasError);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_StartInitHasError, this, &MainWindow::slot_InitializeHasError);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Tray_UpdateStateServer, this, &MainWindow::slot_updateStateServer);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_Tray_UpdateStateServer, this, &MainWindow::slot_UpdateStateServer);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Tray_ShowMessage, this, &MainWindow::slot_Tray_ShowMessage);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_Tray_ShowMessage, this, &MainWindow::slot_Tray_ShowMessage);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_ShowWindow, this, &MainWindow::slot_TrayMenu_ShowWindow);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_ShowWindow, this, &MainWindow::slot_TrayMenu_ShowWindow);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_HideWindow, this, &MainWindow::slot_TrayMenu_HideWindow);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_HideWindow, this, &MainWindow::slot_TrayMenu_HideWindow);
|
||||||
@@ -65,8 +65,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
trayIcon->setContextMenu(trayMenu);
|
trayIcon->setContextMenu(trayMenu);
|
||||||
trayIcon->show();
|
trayIcon->show();
|
||||||
|
|
||||||
//slot_Tray_ShowMessage(tr("Starting the server..."));
|
|
||||||
|
|
||||||
ui->verticalLayout_Main->addWidget(serverLMSWidget);
|
ui->verticalLayout_Main->addWidget(serverLMSWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +179,7 @@ void MainWindow::slot_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::Message
|
|||||||
trayIcon->showMessage(tr("Server MTD"), textMsg, icon, 100);
|
trayIcon->showMessage(tr("Server MTD"), textMsg, icon, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::slot_updateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization)
|
void MainWindow::slot_UpdateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization)
|
||||||
{
|
{
|
||||||
if(stateServer == EStateServer::started)
|
if(stateServer == EStateServer::started)
|
||||||
{
|
{
|
||||||
@@ -200,14 +198,12 @@ void MainWindow::slot_updateStateServer(EStateServer stateServer, EStateBlockAut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::slot_hasError(int code)
|
void MainWindow::slot_InitializeHasError(int code)
|
||||||
{
|
{
|
||||||
if(code == 100)
|
if(code == 100)
|
||||||
{
|
{
|
||||||
slot_TrayMenu_ShowWindow();
|
slot_TrayMenu_ShowWindow();
|
||||||
|
slot_TrayMenu_Exit();
|
||||||
//выключение с задержкой
|
|
||||||
QTimer::singleShot(1000, this, &MainWindow::slot_TrayMenu_Exit);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,12 +48,10 @@ public slots:
|
|||||||
void slot_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::MessageIcon iconMsg = QSystemTrayIcon::Information);
|
void slot_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::MessageIcon iconMsg = QSystemTrayIcon::Information);
|
||||||
|
|
||||||
//Слот изменения иконки трея о статусе Сервера
|
//Слот изменения иконки трея о статусе Сервера
|
||||||
void slot_updateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization);
|
void slot_UpdateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization);
|
||||||
|
|
||||||
|
void slot_InitializeHasError(int code);
|
||||||
void slot_hasError(int code); //TODO ?
|
void slot_InitializeFinished();
|
||||||
|
|
||||||
void slot_InitializeFinished(); //TODO ?
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateTrayTitles();
|
void updateTrayTitles();
|
||||||
|
|||||||
Reference in New Issue
Block a user