This commit is contained in:
2025-12-17 17:17:34 +03:00
parent 3953527795
commit 360b740220
6 changed files with 41 additions and 69 deletions

View File

@@ -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);
}
}