mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Вывел все окна в свои диалоги
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidget *parent) :
|
||||
InstructorsView(connectorToServer, CommonView::TypeView::onlyView, parent),
|
||||
dlgEditor(nullptr),
|
||||
dlgRedactor(nullptr),
|
||||
ui(new Ui::ViewerInstructors)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -24,8 +24,8 @@ ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidg
|
||||
|
||||
ViewerInstructors::~ViewerInstructors()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
if(dlgRedactor)
|
||||
dlgRedactor->close();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ void ViewerInstructors::setAuthComplited(bool authComplited)
|
||||
|
||||
void ViewerInstructors::deactivate()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
if(dlgRedactor)
|
||||
dlgRedactor->close();
|
||||
|
||||
CommonView::deactivate();
|
||||
updateButtons();
|
||||
@@ -60,25 +60,14 @@ void ViewerInstructors::on_btnEditorInstructors_clicked()
|
||||
{
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
EditorInstructors* editorInstructors = new EditorInstructors(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorInstructors, &EditorInstructors::slot_NeedUpdateUI);
|
||||
editorInstructors->activate();
|
||||
dlgRedactor = new DialogRedactorInstructors(connectorToServer, adminMode, this);
|
||||
dlgRedactor->exec();
|
||||
|
||||
dlgEditor = new QDialog(this,
|
||||
Qt::WindowSystemMenuHint
|
||||
| Qt::WindowMaximizeButtonHint
|
||||
| Qt::WindowMinimizeButtonHint
|
||||
| Qt::WindowCloseButtonHint);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dlgEditor);
|
||||
layout->addWidget(editorInstructors);
|
||||
dlgEditor->setWindowTitle(tr("Editor of instructors"));
|
||||
dlgEditor->setMinimumSize(1400, 700);
|
||||
dlgEditor->setWindowState(Qt::WindowMaximized);
|
||||
dlgEditor->setModal(true);
|
||||
dlgEditor->exec();
|
||||
|
||||
delete dlgEditor;
|
||||
dlgEditor = nullptr;
|
||||
if(dlgRedactor)
|
||||
{
|
||||
delete dlgRedactor;
|
||||
dlgRedactor = nullptr;
|
||||
}
|
||||
|
||||
if(authComplited)
|
||||
loadInstructorsFromDB();
|
||||
|
||||
Reference in New Issue
Block a user