-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialogjanela.cpp
executable file
·68 lines (54 loc) · 1.08 KB
/
dialogjanela.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "dialogjanela.h"
#include "ui_dialogjanela.h"
DialogJanela::DialogJanela(QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogJanela)
{
ui->setupUi(this);
}
DialogJanela::~DialogJanela()
{
delete ui;
}
void DialogJanela::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
char DialogJanela::getIdioma()
{
if (this->ui->ingles->isChecked())
return 1;
if (this->ui->portugues->isChecked())
return 2;
return 0;
}
char DialogJanela::getAnalise()
{
if (this->ui->normal->isChecked())
return 1;
if (this->ui->canonico->isChecked())
return 2;
if (this->ui->completo->isChecked())
return 3;
return 0;
}
void DialogJanela::on_cancelar_clicked()
{
this->done(0);
}
void DialogJanela::on_inicio_clicked()
{
opIdioma = getIdioma();
opAnalise = getAnalise();
if (opIdioma == 0 || opAnalise == 0)
this->done(0);
else
this->done(1);
}