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

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

@@ -0,0 +1,33 @@
#include <QHBoxLayout>
#include "dialogredactortrainees.h"
DialogRedactorTrainees::DialogRedactorTrainees(ConnectorToServer* connectorToServer,
bool adminMode, QWidget *parent) :
QDialog(parent,
Qt::WindowSystemMenuHint
| Qt::WindowMaximizeButtonHint
| Qt::WindowMinimizeButtonHint
| Qt::WindowCloseButtonHint),
editorTraineesGroups(nullptr)
{
editorTraineesGroups = new EditorTrainees(connectorToServer, adminMode, this);
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorTraineesGroups, &EditorTrainees::slot_NeedUpdateUI);
editorTraineesGroups->activate();
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(editorTraineesGroups);
this->setWindowTitle(tr("Editor of trainees"));
this->setMinimumSize(1400, 700);
this->setWindowState(Qt::WindowMaximized);
this->setModal(true);
}
DialogRedactorTrainees::~DialogRedactorTrainees()
{
delete editorTraineesGroups;
}
void DialogRedactorTrainees::closeEvent(QCloseEvent *event)
{
editorTraineesGroups->close();
}