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);
|
||||
|
||||
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_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_Menu_ShowWindow, this, &MainWindow::slot_TrayMenu_ShowWindow);
|
||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_HideWindow, this, &MainWindow::slot_TrayMenu_HideWindow);
|
||||
@@ -65,8 +65,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
trayIcon->setContextMenu(trayMenu);
|
||||
trayIcon->show();
|
||||
|
||||
//slot_Tray_ShowMessage(tr("Starting the server..."));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void MainWindow::slot_updateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization)
|
||||
void MainWindow::slot_UpdateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization)
|
||||
{
|
||||
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)
|
||||
{
|
||||
slot_TrayMenu_ShowWindow();
|
||||
|
||||
//выключение с задержкой
|
||||
QTimer::singleShot(1000, this, &MainWindow::slot_TrayMenu_Exit);
|
||||
slot_TrayMenu_Exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user