#include "prttypeform.h"
#include "ui_prttypeform.h"
#include "QsLog.h"

PrtTypeForm::PrtTypeForm(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::PrtTypeForm)
{
    ui->setupUi(this);

    setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground);
    this->setModal(true);
}

PrtTypeForm::~PrtTypeForm()
{
    delete ui;
}

void PrtTypeForm::OnBtnClicket()
{
    QPushButton *pBtn = (QPushButton*)sender();

    int type = pBtn->property("type").toInt();

    QLOG_DEBUG() << "type:" << type;

    emit BtnClicket(type);

    this->accept();
}
