#include "Prescriptiondialog.h"
#include "ui_Prescriptiondialog.h"
#include <QPainter>

PrescriptionDialog::PrescriptionDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::PrescriptionDialog)
{
    ui->setupUi(this);
    this->setWindowFlags(Qt::FramelessWindowHint);      //设置无边框
    setAttribute(Qt::WA_TranslucentBackground,true);
}

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

void PrescriptionDialog::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event)
    QPainter painter(this);
    painter.fillRect(rect(),QColor(0,0,0,100));
}

void PrescriptionDialog::changeEvent(QEvent *event)
{
    switch (event->type())
    {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        QWidget::changeEvent(event);
        break;
    }
}

void PrescriptionDialog::on_confirm_Btn_clicked()
{
    this->close();
}