-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwgauche.cpp
60 lines (44 loc) · 1.86 KB
/
wgauche.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
#include "wgauche.h"
#include <QDebug>
Gauche::Gauche(QMainWindow* parent) :
QWidget(parent) {
NotesManager *NM = NotesManager::getInstance();
/////////////////Note Active//////////////////////////
setFixedSize(300, 350);
titre_act = new QLabel(this);
titre_act->setText("Les notes actives :");
notes_actives = new QListWidget(this);
///print all the notes which are active
for (NotesManager::iterator it = NM->begin(); it != NM->end(); it++) {
if ((*it)->is_active())
notes_actives->addItem((*it)->getId());
}
///button to show note in detail
button_box = new QHBoxLayout;
bouton_afficher_act = new QPushButton("Afficher Note");
arborescence = new QPushButton("Arborescence");
///////////////////////////////////////////////////////
/////////////////Note Archived/////////////////////////
titre_arch = new QLabel(this);
titre_arch->setText("Les notes archivees :");
notes_archivees = new QComboBox(this);
///print all the note which are archived
for (NotesManager::iterator it = NM->begin(); it != NM->end(); it++) {
if ((*it)->is_archived())
notes_archivees->addItem((*it)->getId());
}
///////////////////////////////////////////////////////
button_arch_box = new QHBoxLayout;
bouton_afficher_arch = new QPushButton("Afficher Archived");
restaurer = new QPushButton("Restaurer");
couche = new QVBoxLayout;
button_box->addWidget(bouton_afficher_act);button_box->addWidget(arborescence);
button_arch_box->addWidget(bouton_afficher_arch);button_arch_box->addWidget(restaurer);
couche->addWidget(titre_act);
couche->addWidget(notes_actives);
couche->addLayout(button_box);
couche->addWidget(titre_arch);
couche->addWidget(notes_archivees);
couche->addLayout(button_arch_box);
this->setLayout(couche);
}