mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
WidgetTools::closeAllChildWidgets
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user