-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremovedialog.cpp
More file actions
executable file
·41 lines (37 loc) · 956 Bytes
/
Copy pathremovedialog.cpp
File metadata and controls
executable file
·41 lines (37 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "removedialog.h"
#include "ui_removedialog.h"
RemoveDialog::RemoveDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::RemoveDialog)
{
ui->setupUi(this);
btn_group = new QButtonGroup;
btn_group->setExclusive(true);
btn_group->addButton(ui->Finish_pushButton, 1);
btn_group->addButton(ui->Cancel_pushButton, 2);
}
RemoveDialog::~RemoveDialog()
{
delete ui;
}
void RemoveDialog::on_Finish_pushButton_clicked()
{
QString id = ui->ID_lineEdit->text();
if(id.isEmpty() && id.length() > 6)
{
emit get_person_error();
QMessageBox::warning(this, "Warning","please check your name and id");
QDialog::reject();
}
else
{
emit get_person_finished(id);
QString msg = QString("id: %1").arg(id);
QMessageBox::information(this, "Info", msg);
QDialog::accept();
}
}
void RemoveDialog::on_Cancel_pushButton_clicked()
{
QDialog::reject();
}