servicepassinputdlg.cpp
692 Bytes
#include "servicepassinputdlg.h"
#include "ui_servicepassinputdlg.h"
#define PASS_WORD "0000"
ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::ServicePassInputDlg)
{
ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_NoSystemBackground);
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_DeleteOnClose);
}
ServicePassInputDlg::~ServicePassInputDlg()
{
delete ui;
}
void ServicePassInputDlg::on_ctrBtnOk_clicked()
{
if(ui->lineEdit->text() == PASS_WORD){
accept();
}
else reject();
}
void ServicePassInputDlg::on_ctrBtnCancel_clicked()
{
reject();
}