#include "NoRefundForm.h"
#include "ui_NoRefundForm.h"

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

    this->setWindowFlags(windowFlags()|Qt::FramelessWindowHint|Qt::Dialog);

    this->move(parent->pos().x()+(parent->width()-this->width())/2,
               parent->pos().y()+(parent->height()-this->height())/2);

    ui->NoRefundRbtn0->toggle();
}

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

QString NoRefundForm::GetReason() const
{
    return _reason;
}

void NoRefundForm::on_NoRefundBtnOk_clicked()
{
    this->accept();
}

void NoRefundForm::on_NoRefundBtnCancle_clicked()
{
    this->reject();
}

void NoRefundForm::on_NoRefundRbtn0_toggled(bool)
{
    _reason = ui->NoRefundRbtn0->text();
}

void NoRefundForm::on_NoRefundRbtn1_toggled(bool)
{
    _reason = ui->NoRefundRbtn1->text();
}

void NoRefundForm::on_NoRefundRbtn2_toggled(bool)
{
    _reason = ui->NoRefundRbtn2->text();
}

void NoRefundForm::on_NoRefundRbtn3_toggled(bool)
{
    _reason = ui->NoRefundRbtn3->text();
}
