-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvelopes.cpp
More file actions
50 lines (44 loc) · 1.17 KB
/
Copy pathenvelopes.cpp
File metadata and controls
50 lines (44 loc) · 1.17 KB
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 "envelopes.h"
#include "ui_envelopes.h"
#include <QPushButton>
Envelopes::Envelopes(QWidget *parent) :
QDialog(parent),
ui(new Ui::Envelopes)
{
ui->setupUi(this);
setWindowTitle("Envelopes");
setWindowIcon(QIcon(":/imgs/imgs/adicionarenv.png"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
ui->Botoes->button(QDialogButtonBox::Ok)->setText("Adicionar");
ui->Botoes->button(QDialogButtonBox::Cancel)->setText("Fechar");
QRegExp cond0("^[A-Za-z][A-Za-z\\s]*$");
QValidator *val0 = new QRegExpValidator(cond0, this);
ui->Nome->setValidator(val0);
}
Envelopes::~Envelopes() {
delete ui;
}
QString Envelopes::Nome() const {
return ui->Nome->text().toUpper();
}
double Envelopes::Dizimo() const {
return ui->Dizimo->value();
}
double Envelopes::Oferta() const{
return ui->Oferta->value();
}
double Envelopes::Construcao() const {
return ui->Construcao->value();
}
double Envelopes::Missao() const {
return ui->Missao->value();
}
double Envelopes::Voto() const {
return ui->Voto->value();
}
void Envelopes::on_Botoes_accepted() {
accept();
}
void Envelopes::on_Botoes_rejected() {
reject();
}