WidgetTools::closeAllChildWidgets

This commit is contained in:
2025-11-30 21:29:32 +03:00
parent d129fbded0
commit d30e6b4927
10 changed files with 53 additions and 48 deletions

View File

@@ -1,19 +0,0 @@
#include <QMessageBox>
#include "notifycontroller.h"
#include "specialmessagebox.h"
NotifyController::NotifyController(QWidget *parentWidget, QObject *parent) :
QObject(parent),
parentWidget(parentWidget)
{
}
void NotifyController::showWarning(QString text, QWidget *parentWidget)
{
if(parentWidget)
SpecMsgBox::WarningClose(parentWidget, text);
else
SpecMsgBox::WarningClose(this->parentWidget, text);
}

View File

@@ -1,20 +0,0 @@
#ifndef NOTIFYCONTROLLER_H
#define NOTIFYCONTROLLER_H
#include <QObject>
#include <QWidget>
class NotifyController : public QObject
{
Q_OBJECT
public:
explicit NotifyController(QWidget *parentWidget = nullptr, QObject *parent = nullptr);
void showWarning(QString text, QWidget *parentWidget = nullptr);
private:
QWidget *parentWidget;
};
#endif // NOTIFYCONTROLLER_H

View File

@@ -8,6 +8,8 @@ SpecMsgBox::SpecMsgBox(QWidget *parent, TypeSpecMsgBox type, const QString& text
{
ui->setupUi(this);
this->setObjectName("SpecMsgBox");
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
if(type == TypeSpecMsgBox::warningYesNo)