-
Notifications
You must be signed in to change notification settings - Fork 0
/
addmangadialog.cpp
47 lines (40 loc) · 1.74 KB
/
addmangadialog.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
#include "addmangadialog.h"
AddMangaDialog::AddMangaDialog(QWidget *parent)
: QDialog(parent) {
setWindowTitle("Adicionar Mangá");
isbnEdit = new QLineEdit(this);
titleEdit = new QLineEdit(this);
authorEdit = new QLineEdit(this);
startYearEdit = new QLineEdit(this);
endYearEdit = new QLineEdit(this);
genreEdit = new QLineEdit(this);
magazineEdit = new QLineEdit(this);
publisherEdit = new QLineEdit(this);
editionYearEdit = new QLineEdit(this);
volumesCountEdit = new QLineEdit(this);
acquiredVolumesCountEdit = new QLineEdit(this);
acquiredVolumesListEdit = new QLineEdit(this);
saveButton = new QPushButton("Salvar", this);
QFormLayout *formLayout = new QFormLayout;
formLayout->addRow("ISBN:", isbnEdit);
formLayout->addRow("Título:", titleEdit);
formLayout->addRow("Autor(es):", authorEdit);
formLayout->addRow("Ano de Início:", startYearEdit);
formLayout->addRow("Ano de Fim:", endYearEdit);
formLayout->addRow("Gênero:", genreEdit);
formLayout->addRow("Revista:", magazineEdit);
formLayout->addRow("Editora:", publisherEdit);
formLayout->addRow("Ano da Edição:", editionYearEdit);
formLayout->addRow("Quantidade de Volumes:", volumesCountEdit);
formLayout->addRow("Volumes Adquiridos:", acquiredVolumesCountEdit);
formLayout->addRow("Lista de Volumes Adquiridos:", acquiredVolumesListEdit);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(formLayout);
mainLayout->addWidget(saveButton);
setLayout(mainLayout);
connect(saveButton, &QPushButton::clicked, this, &AddMangaDialog::onSaveButtonClicked);
}
void AddMangaDialog::onSaveButtonClicked() {
// Implementar funcionalidade de salvar mangá
accept();
}