mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refact
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
#include <QThread>
|
||||
#include <QMenu>
|
||||
@@ -68,7 +67,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
slot_Tray_ShowMessage(tr("Starting the server..."));
|
||||
|
||||
QTimer::singleShot(1000,this,&MainWindow::slot_LazyInitialization);
|
||||
QTimer::singleShot(1000, this, &MainWindow::slot_LazyInitialization);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@@ -153,11 +152,6 @@ void MainWindow::slot_TrayMenu_HideWindow()
|
||||
this->hide();
|
||||
action_ShowWindow->setEnabled(true);
|
||||
action_HideWindow->setEnabled(false);
|
||||
|
||||
/*
|
||||
slot_Tray_ShowMessage(tr("The application is minimized to the tray.\n"
|
||||
"To maximize the application window, click the application icon in the tray."));
|
||||
*/
|
||||
}
|
||||
|
||||
void MainWindow::slot_TrayMenu_Exit()
|
||||
@@ -169,9 +163,7 @@ void MainWindow::slot_TrayMenu_Exit()
|
||||
void MainWindow::slot_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::MessageIcon iconMsg)
|
||||
{
|
||||
QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(iconMsg);
|
||||
trayIcon->showMessage(tr("Server MPS"),
|
||||
textMsg,
|
||||
icon, 100);
|
||||
trayIcon->showMessage(tr("Server MPS"), textMsg, icon, 100);
|
||||
}
|
||||
|
||||
void MainWindow::slot_updateStateServer(EStateServer stateServer, EStateBlockAutorization stateBlockAutorization)
|
||||
@@ -230,7 +222,7 @@ void MainWindow::errorCheck()
|
||||
slot_TrayMenu_ShowWindow();
|
||||
|
||||
//выключение с задержкой, так как eventLoop инициализируется позже
|
||||
QTimer::singleShot(1000,this,&MainWindow::slot_TrayMenu_Exit);
|
||||
QTimer::singleShot(1000, this, &MainWindow::slot_TrayMenu_Exit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user