Files
RRJServer/LibInstructorsAndTrainees/instructors/dialogredactorinstructors.cpp
2026-01-20 17:11:01 +03:00

35 lines
1.2 KiB
C++

#include <QHBoxLayout>
#include "dialogredactorinstructors.h"
DialogRedactorInstructors::DialogRedactorInstructors(ConnectorToServer* connectorToServer,
bool adminMode, QWidget *parent) :
QDialog(parent,
Qt::WindowSystemMenuHint
| Qt::WindowMaximizeButtonHint
| Qt::WindowMinimizeButtonHint
| Qt::WindowCloseButtonHint),
editorInstructors(nullptr)
{
editorInstructors = new EditorInstructors(connectorToServer, adminMode, this);
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorInstructors, &EditorInstructors::slot_NeedUpdateUI);
editorInstructors->activate();
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(editorInstructors);
this->setWindowTitle(tr("Editor of instructors"));
this->setMinimumSize(1400, 700);
this->setWindowFlags(windowFlags() & ~Qt::WindowMinimizeButtonHint);
//this->setWindowState(Qt::WindowMaximized);
this->setModal(true);
}
DialogRedactorInstructors::~DialogRedactorInstructors()
{
delete editorInstructors;
}
void DialogRedactorInstructors::closeEvent(QCloseEvent *event)
{
editorInstructors->close();
}