#include <QHBoxLayout>
#include "dialogtaskscommon.h"

DialogTasksCommon::DialogTasksCommon(ConnectorToServer* connectorToServer, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
                                     QWidget *parent) :
    QDialog(parent,
              Qt::WindowSystemMenuHint
            | Qt::WindowMaximizeButtonHint
            | Qt::WindowMinimizeButtonHint
            | Qt::WindowCloseButtonHint),
    viewerTasks(nullptr)
{
    viewerTasks = new ViewerTasksCommon(connectorToServer, ammTasksWidget_common, fimTasksWidget_common, this);

    QHBoxLayout *layout = new QHBoxLayout(this);
    layout->addWidget(viewerTasks);
    this->setWindowTitle(tr("Viewer tasks common"));
    this->setMinimumSize(1400, 700);
    this->setWindowState(Qt::WindowMaximized);
    this->setModal(true);
}

DialogTasksCommon::~DialogTasksCommon()
{
    delete viewerTasks;
}

void DialogTasksCommon::closeEvent(QCloseEvent *event)
{
    viewerTasks->close();
}
