#include "base.h"

BaseWindow::BaseWindow(QWidget *parent) :
    QMainWindow(parent)
{
}
void BaseWindow::closeEvent(QCloseEvent *e)
{
        (void)e;
        MessageDialog md(
            "确认关闭", "确认关闭当前窗口吗?", MESSAGE_LEVEL_WARNING);
        int ret = md.exec();

        if (ret)
        {

            e->accept();
        }
        else
        {
            e->ignore();
        }
    }