#include "dialogcardtrainee.h"

DialogCardTrainee::DialogCardTrainee(ConnectorToServer* connectorToServer, MessangerController* messangerController,
                                     int id_trainee, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
                                     QWidget *parent) :
    QDialog(parent,
              Qt::WindowSystemMenuHint
            | Qt::WindowMaximizeButtonHint
            | Qt::WindowMinimizeButtonHint
            | Qt::WindowCloseButtonHint),
    cardTrainee(nullptr)
{
    cardTrainee = new PersonalCardTrainee(connectorToServer, messangerController,
                                          id_trainee, ammTasksWidget_common, fimTasksWidget_common, this);

    QHBoxLayout *layout = new QHBoxLayout(this);
    layout->addWidget(cardTrainee);
    this->setWindowTitle(tr("Personal card trainee"));
    this->setMinimumSize(1600, 800);
    this->setWindowState(Qt::WindowMaximized);
    this->setModal(true);
}

DialogCardTrainee::~DialogCardTrainee()
{
    delete cardTrainee;
}

void DialogCardTrainee::closeEvent(QCloseEvent *event)
{
    cardTrainee->close();
}
