Вывел все окна в свои диалоги

This commit is contained in:
2025-09-18 13:26:22 +03:00
parent a2cd5280bd
commit 8bb54cb56c
17 changed files with 166 additions and 51 deletions

View File

@@ -9,7 +9,7 @@ ViewerTrainees::ViewerTrainees(ConnectorToServer* connectorToServer, MessangerCo
ammTasksWidgetCommon(nullptr),
fimTasksWidgetCommon(nullptr),
messangerController(messangerController),
dlgEditor(nullptr),
dlgRedactor(nullptr),
dlgCardTrainee(nullptr),
ui(new Ui::ViewerTrainees)
{
@@ -48,8 +48,8 @@ ViewerTrainees::~ViewerTrainees()
fimTasksWidgetCommon = nullptr;
}
if(dlgEditor)
dlgEditor->close();
if(dlgRedactor)
dlgRedactor->close();
if(dlgCardTrainee)
dlgCardTrainee->close();
@@ -65,13 +65,11 @@ void ViewerTrainees::setAuthComplited(bool authComplited)
void ViewerTrainees::deactivate()
{
if(dlgEditor)
dlgEditor->close();
if(dlgRedactor)
dlgRedactor->close();
if(dlgCardTrainee)
{
dlgCardTrainee->close();
}
CommonView::deactivate();
@@ -96,25 +94,14 @@ void ViewerTrainees::on_btnEditorTrainees_clicked()
{
Q_EMIT signal_BlockAutorization(true);
EditorTrainees* editorTraineesGroups = new EditorTrainees(connectorToServer, adminMode);
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorTraineesGroups, &EditorTrainees::slot_NeedUpdateUI);
editorTraineesGroups->activate();
dlgRedactor = new DialogRedactorTrainees(connectorToServer, adminMode, this);
dlgRedactor->exec();
dlgEditor = new QDialog(this,
Qt::WindowSystemMenuHint
| Qt::WindowMaximizeButtonHint
| Qt::WindowMinimizeButtonHint
| Qt::WindowCloseButtonHint);
QHBoxLayout *layout = new QHBoxLayout(dlgEditor);
layout->addWidget(editorTraineesGroups);
dlgEditor->setWindowTitle(tr("Editor of trainees"));
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)
loadTraineesFromDB();