SpecialMessageBox

This commit is contained in:
2025-09-15 18:20:39 +03:00
parent bffbd0fe81
commit 0e81d14566
19 changed files with 366 additions and 215 deletions

View File

@@ -1,4 +1,5 @@
#include "notifycontroller.h"
#include "specialmessagebox.h"
NotifyController::NotifyController(QObject *parent) : QObject(parent)
{
@@ -7,10 +8,5 @@ NotifyController::NotifyController(QObject *parent) : QObject(parent)
void NotifyController::showWarning(QString text)
{
QMessageBox warning;
warning.setText(text);
warning.setIcon(QMessageBox::Warning);
warning.setWindowTitle(tr("Error"));
warning.exec();
SpecialMessageBox(nullptr, SpecialMessageBox::TypeSpecMsgBox::warningWithoutButtons, text).exec();
}

View File

@@ -6,6 +6,7 @@
#include "instructor.h"
#include "tasksAmmFim.h"
#include "timingoftrainee.h"
#include "specialmessagebox.h"
RecognizeSystem::RecognizeSystem(QObject *parent):
@@ -392,7 +393,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
QFile xmlInFile(xmlFileName);
if (!xmlInFile.open(QFile::ReadOnly | QFile::Text))
{
QMessageBox::critical(nullptr, tr("Attention!"), tr("The file could not be opened ") + xmlFileName);
SpecialMessageBox(nullptr, SpecialMessageBox::TypeSpecMsgBox::critical, tr("The file could not be opened ") + xmlFileName).exec();
return;
}
else