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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user