#include "MainWindow.h"
#include "ui_PopupDialog.h"
#include <QDialog>


MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
    ui.setupUi(this);

    QString cs = QString("Qt %1").arg(qVersion());
    ui.statusBar->showMessage(cs);
}

MainWindow::~MainWindow()
{
}

void MainWindow::on_btnFull_clicked()
{
    QDialog dlg;
    Ui_PopupDialog dlg_ui;
    dlg_ui.setupUi(&dlg);
    dlg.showFullScreen(); //BUG: does not work correctly and pushes widgets off the screen at the bottom, QTBUG-46630
    dlg.exec();
}

void MainWindow::on_btnMax_clicked()
{
    QDialog dlg;
    Ui_PopupDialog dlg_ui;
    dlg_ui.setupUi(&dlg);
    dlg.setWindowState(windowState() | Qt::WindowMaximized);    //workaround for showFullScreen()
    dlg.exec();
}
