-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwrelations.cpp
54 lines (34 loc) · 1.51 KB
/
wrelations.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
#include "wrelations.h"
CentreRelations::CentreRelations(QMainWindow *parent):
QWidget(parent) {
setFixedSize(320,350);
NotesManager *NM = NotesManager::getInstance();
RelationManager* RM = RelationManager::getRelationManager();
titre_relations = new QLabel(this);
titre_relations->setText("Les relations disponibles :");
relations = new QListWidget(this);
for (RelationManager::iterator it = RM->begin(); it != RM->end(); it++) {
relations->addItem((*it)->getTitre());
}
afficher_relation = new QPushButton("Afficher Couples");
//QObject::connect(afficher_relation, SIGNAL(Clicked()),this, SLOT(afficherRelation()));
fermer = new QPushButton("Fermer");
connect(fermer, SIGNAL(clicked()),this, SLOT(close()));
creer_relation = new QPushButton("Creer relation");
//QObject::connect(creer_relation, SIGNAL(clicked()),this, SLOT(ouvrir_creer_relation()));
supprimer_relation = new QPushButton("Supprimer relation");
//QObject::connect(supprimer_relation, SIGNAL(Clicked()),this, SLOT(supprimerRelation()));
horiz1 = new QHBoxLayout;
horiz1->addWidget(afficher_relation);
horiz1->addWidget(supprimer_relation);
horiz1->addWidget(fermer);
horiz2 = new QHBoxLayout;
horiz2->addWidget(creer_relation);
verti = new QVBoxLayout;
verti->addWidget(titre_relations);
verti->addWidget(relations);
verti->addLayout(horiz1);
verti->addLayout(horiz2);
setLayout(verti);
}
void CentreRelations::supprimerRelation() {}