mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
notifyController -> specialWB
This commit is contained in:
@@ -21,6 +21,8 @@ add_library(InstructorsAndTrainees SHARED
|
||||
specialmessagebox/specialmessagebox.cpp
|
||||
specialmessagebox/specialmessagebox.h
|
||||
specialmessagebox/specialmessagebox.ui
|
||||
specialmessagebox/notifycontroller.cpp
|
||||
specialmessagebox/notifycontroller.h
|
||||
|
||||
authorization/dialogauthorization.cpp
|
||||
authorization/dialogauthorization.h
|
||||
@@ -80,8 +82,6 @@ add_library(InstructorsAndTrainees SHARED
|
||||
connectorToServer/Core/tools.cpp
|
||||
connectorToServer/Core/tools.h
|
||||
connectorToServer/Core/FileData.h
|
||||
connectorToServer/Core/notifycontroller.cpp
|
||||
connectorToServer/Core/notifycontroller.h
|
||||
connectorToServer/Core/versioncontainer.cpp
|
||||
connectorToServer/Core/versioncontainer.h
|
||||
connectorToServer/Datas.h
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#include "notifycontroller.h"
|
||||
#include "specialmessagebox.h"
|
||||
|
||||
NotifyController::NotifyController(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void NotifyController::showWarning(QString text)
|
||||
{
|
||||
SpecialMessageBox(nullptr, SpecialMessageBox::TypeSpecMsgBox::warningClose, text).exec();
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef NOTIFYCONTROLLER_H
|
||||
#define NOTIFYCONTROLLER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMessageBox>
|
||||
|
||||
class NotifyController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NotifyController(QObject *parent = nullptr);
|
||||
|
||||
void showWarning(QString text);
|
||||
signals:
|
||||
|
||||
};
|
||||
|
||||
#endif // NOTIFYCONTROLLER_H
|
||||
@@ -55,7 +55,7 @@ signals:
|
||||
void sigAnswerQueryTasksXML_AMM(QByteArray array);
|
||||
void sigShowServerDataList(QList<StreamingVersionData*> *versions);
|
||||
void sigSetVersion(StreamingVersionData* serverVersion);
|
||||
void sigNotify(QString text);
|
||||
void sigNotify(QString text, QWidget *parentWidget = nullptr);
|
||||
void sigAnimationActivated(bool flag);
|
||||
void sigHashReady();
|
||||
void sigAnswerQuerySubProc(QList<SubProc> listSubProc, QString parentTask_dmCode);
|
||||
|
||||
@@ -144,7 +144,7 @@ void ConnectorToServer::createObjects()
|
||||
recognizeSystem = new RecognizeSystem;
|
||||
recognizeSystem->moveToThread(connectionThread);
|
||||
|
||||
notifyController = new NotifyController;
|
||||
notifyController = new NotifyController(parentWidget);
|
||||
versionContainer = new VersionContainer;
|
||||
versionSelectWidget = new VersionSelectWidget(parentWidget);
|
||||
versionSelectWidget->initialize(sendSystem,versionContainer,notifyController, recognizeSystem);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#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)
|
||||
SpecialMessageBox(parentWidget, SpecialMessageBox::TypeSpecMsgBox::warningClose, text).exec();
|
||||
else
|
||||
SpecialMessageBox(this->parentWidget, SpecialMessageBox::TypeSpecMsgBox::warningClose, text).exec();
|
||||
}
|
||||
20
InstructorsAndTrainees/specialmessagebox/notifycontroller.h
Normal file
20
InstructorsAndTrainees/specialmessagebox/notifycontroller.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#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
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef DIALOGNEWVERSION_H
|
||||
#define DIALOGNEWVERSION_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
#include <QLineEdit>
|
||||
#include <QToolTip>
|
||||
|
||||
@@ -79,7 +79,7 @@ void VersionSelectWidget::on_createDuplicateButton_clicked()
|
||||
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
emit sigSendNotify(tr("Version not selected"));
|
||||
emit sigSendNotify(tr("Version not selected"), this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ void VersionSelectWidget::sendCopyEmit(QString newName)
|
||||
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
emit sigSendNotify(tr("Version not selected"));
|
||||
emit sigSendNotify(tr("Version not selected"), this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ void VersionSelectWidget::on_DeleteVersionButton_clicked()
|
||||
{
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
emit sigSendNotify(tr("Version not selected"));
|
||||
emit sigSendNotify(tr("Version not selected"), this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void VersionSelectWidget::on_switchServerVersionButton_clicked()
|
||||
{
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
emit sigSendNotify(tr("Version not selected"));
|
||||
emit sigSendNotify(tr("Version not selected"), this);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <Core/sendsystem.h>
|
||||
#include <Core/versioncontainer.h>
|
||||
#include <Core/notifycontroller.h>
|
||||
#include <notifycontroller.h>
|
||||
#include <streamingversiondata.h>
|
||||
#include <dialognewversion.h>
|
||||
#include <waitanimationwidget.h>
|
||||
@@ -44,7 +44,7 @@ signals:
|
||||
void sigSendDeleteVersion(StreamingVersionData *streaming);
|
||||
void sigSendSwitchVersion(StreamingVersionData *selectVersion);
|
||||
void sigSendCopyVersion(QString versionPair);
|
||||
void sigSendNotify(QString message);
|
||||
void sigSendNotify(QString message, QWidget *parentWidget = nullptr);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user