-
Notifications
You must be signed in to change notification settings - Fork 0
/
maddbenifitdialog.cpp
50 lines (36 loc) · 1.23 KB
/
maddbenifitdialog.cpp
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
42
43
44
45
46
47
48
49
50
#include "maddbenifitdialog.h"
#include "ui_maddbenifitdialog.h"
mAddBenifitDialog::mAddBenifitDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::mAddBenifitDialog)
{
ui->setupUi(this);
Qt::WindowFlags flags(this->windowFlags());
setWindowFlags(flags ^ Qt::WindowContextHelpButtonHint
| Qt::MSWindowsFixedSizeDialogHint
);
setWindowTitle("Льгота");
setAttribute(Qt::WA_DeleteOnClose);
this->connect(ui->cancelPushButton,
SIGNAL(clicked(bool)), SLOT(reject()));
this->connect(ui->okPushButton,
SIGNAL(clicked(bool)), SLOT(formCortege()));
}
mAddBenifitDialog::~mAddBenifitDialog()
{
delete ui;
}
void mAddBenifitDialog::formCortege() {
QList <QVariant> vl;
vl << ui->nameLineEdit->text()
<< ui->entryCheckBox->isChecked()
<< ui->contesstCheckBox->isChecked();
setVisible(false);
emit cortegeFormed(vl);
close();
}
void mAddBenifitDialog::fillCortege(const QSqlRecord & rec) {
ui->nameLineEdit->setText(rec.value("benefit_name").toString());
ui->entryCheckBox->setChecked(rec.value("is_entry_exam").toBool());
ui->contesstCheckBox->setChecked(rec.value("is_contest").toBool());
}