This commit is contained in:
2025-09-17 22:23:38 +03:00
parent 973ca4a31d
commit 6aab774795
10 changed files with 140 additions and 25 deletions

View File

@@ -35,8 +35,17 @@ ViewerTrainees::ViewerTrainees(ConnectorToServer* connectorToServer, MessangerCo
ViewerTrainees::~ViewerTrainees()
{
delete ammTasksWidgetCommon;
delete fimTasksWidgetCommon;
if(ammTasksWidgetCommon)
{
delete ammTasksWidgetCommon;
ammTasksWidgetCommon = nullptr;
}
if(fimTasksWidgetCommon)
{
delete fimTasksWidgetCommon;
fimTasksWidgetCommon = nullptr;
}
if(dlgEditor)
dlgEditor->close();
@@ -59,7 +68,9 @@ void ViewerTrainees::deactivate()
dlgEditor->close();
if(dlgCardTrainee)
{
dlgCardTrainee->close();
}
CommonView::deactivate();
@@ -88,12 +99,17 @@ void ViewerTrainees::on_btnEditorTrainees_clicked()
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorTraineesGroups, &EditorTrainees::slot_NeedUpdateUI);
editorTraineesGroups->activate();
dlgEditor = new QDialog(this);
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->setWindowFlags(dlgEditor->windowFlags() & ~Qt::WindowContextHelpButtonHint);
dlgEditor->setWindowState(Qt::WindowMaximized);
dlgEditor->setModal(true);
dlgEditor->exec();
delete dlgEditor;
@@ -129,8 +145,9 @@ void ViewerTrainees::on_itemDoubleClicked(QTreeWidgetItem *item, int column)
QHBoxLayout *layout = new QHBoxLayout(dlgCardTrainee);
layout->addWidget(cardTrainee);
dlgCardTrainee->setWindowTitle(tr("Personal card trainee"));
//dlgCardTrainee->setMinimumSize(1900, 1000);
dlgCardTrainee->showMaximized();
dlgCardTrainee->setMinimumSize(1400, 700);
dlgCardTrainee->setWindowState(Qt::WindowMaximized);
dlgCardTrainee->setModal(true);
dlgCardTrainee->exec();
ammTasksWidgetCommon->setParent(this);