-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwinterface.h
276 lines (258 loc) · 7.82 KB
/
winterface.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
/*!
*@file winterface.h
*@author Ngo Sy Toan
* @date June 2017
* @brief The main window
*/
#ifndef INTERFACE_H
#define INTERFACE_H
#include <QApplication>
#include <QMainWindow>
#include <QMenuBar>
#include <QMenu>
#include <QMessageBox>
#include <QAction>
#include<typeinfo>
#include "NotesManager.h"
#include "relation.h"
#include "wrelations.h"
#include "wrelationdetails.h"
#include "wnoteact.h"
#include "wnotearch.h"
#include "wgauche.h"
#include "wcreernote.h"
#include "wcreerarticle.h"
#include "wcreerimage.h"
#include "wcreeraudio.h"
#include "wcreervideo.h"
#include "wcreertache.h"
#include "wafficherarticle.h"
#include "windowcreerrelation.h"
#include "wafficherimage.h"
#include "hafficheraudio.h"
#include "haffichervideo.h"
#include "waffichertache.h"
#include "waffichercouple.h"
#include "wcreercouple.h"
#include <QCloseEvent>
/*!
* \brief The Interface class: heritate QMainWindow, this class is MainWindow of the program
* \details All the widgets and events happen inside the Interface
*/
class Interface : public QMainWindow {
Q_OBJECT // macro pour pouvoir utiliser signals et slots
/*!
* \brief initilize widget to view note active and note archived
*/
Gauche* window_gauche=0;
/*!
* \brief initilize widget to view note active and its versions
*/
CentreNoteAct* window_note_act=0;
/*!
* \brief initilize widget to view note acrchived and its version
*/
CentreNoteArch* window_note_arch=0;
/*!
* \brief initilize widget to create new note
*/
WindowCreerNote* window_creer_note=0;
/*!
* \brief initilize widget to create new relation
*/
CentreRelations* window_relations=0;
/*!
* \brief initilize widget to create new relation
*/
WindowCreerRelation* window_creer_relation=0;
/*!
* \brief initilize widget to create new couple
*/
WindowCreerCouple* window_creer_couple=0;
/*!
* \brief initilize widget to create new note - Type Article
*/
WindowCreerArticle* window_creer_article=0;
/*!
* \brief initilize widget to create new note - Type Image
*/
WindowCreerImage* window_creer_image=0;
/*!
* \brief initilize widget to create new note - Type Video
*/
WindowCreerVideo* window_creer_video=0;
/*!
* \brief initilize widget to create new note - Type Audio
*/
WindowCreerAudio* window_creer_audio=0;
/*!
* \brief initilize widget to create new note - Type Tache
*/
WindowCreerTache* window_creer_tache=0;
/*!
* \brief initilize widget to view note - Type Article
*/
WindowAfficherArticle* window_afficher_article=0;
/*!
* \brief initilize widget to view new note - Type Image
*/
WindowAfficherImage* window_afficher_image=0;
/*!
* \brief initilize widget to view new note - Type Audio
*/
WindowAfficherAudio* window_afficher_audio=0;
/*!
* \brief initilize widget to view new note - Type Video
*/
WindowAfficherVideo* window_afficher_video=0;
/*!
* \brief initilize widget to view new note - Type Tache
*/
WindowAfficherTache* window_afficher_tache=0;
/*!
* \brief initilize widget to view couples of a Relation
*/
WindowAfficherCouple* window_afficher_couples=0;
/*!
* \brief menuNotes: menu for Note on the headline bar
*/
QMenu *menuNotes;
/*!
* \brief menuRelations: menu for Relation on the headline bar
*/
QMenu *menuRelations;
/*!
* \brief menuCorbeille: menu for Corbeille on the headline bar
*/
QMenu *menuCorbeille;
/*!
* \brief menuQuitter: menu to quit the program
*/
QMenu *menuQuitter;
/*!
* \brief afficherNotes: Action to view all the Notes
* \details bind this action to button AfficherNotes in menuNotes
*/
QAction *afficherNotes;
/*!
* \brief creerNote: Action to create Note
* \details bind this action to button creerNote in menuNotes
*/
QAction *creerNote;
/*!
* \brief afficherRelations: Action to view Relations
* \details bind this action to button affricherRelations in menuRelations
*/
QAction *afficherRelations;
/*!
* \brief actionQuitter: Action to turn off the program
* \details bind this action to button quitter in menuQuitter
*/
QAction *actionQuitter;
/*!
* \brief currentNote: current Note choosing in the ListNotes
*/
Note* currentNote;
/*!
* \brief currentRelation: current Relation choosing in the ListRelations
*/
Relation* currentRelation;
public:
/*!
* \brief Interface: initilize the Interface
*/
Interface();
/*!
* \brief actionCorbeilleAuto: this action bind to check to empty Corbeille when close program
*/
QAction *actionCorbeilleAuto;
/*!
* \brief fermer_droite: close whatever widgets which are opened on the right side of the Interface
*/
void fermer_droite();
/*!
* \brief fermer_gauche: close whatever widgets which are opened on the left side of the Interface
*/
void fermer_gauche();
/*!
* \brief fermer_centre: close whatever widgets which are opened on the centre of the Interface
*/
void fermer_centre();
/*!
* \brief closeEvent: handle Event when click close button at the up-right corner of the Interface
* \param bar: pointer to buttons
*/
void closeEvent(QCloseEvent *bar);
signals:
private slots:
public slots:
/*!
* \brief avant_de_fermer: action perform before close totally program
*/
void avant_de_fermer();
/*!
* \brief ouvrir_relations: construct and show widget to view all the Relations
*/
void ouvrir_relations();
/*!
* \brief ouvrir_creer_relation: construct and show widget to create Relation
*/
void ouvrir_creer_relation();
/*!
* \brief ouvrir_gauche: construct and show widget to view all the notes (active and archived)
*/
void ouvrir_gauche(); //done
/*!
* \brief ouvrir_note_active_id: construct and show widget to view note active with its versions
*/
void ouvrir_note_active_id(); //done
/*!
* \brief ouvrir_note_archivee_id: construct and show widget to view note archived with its versions
*/
void ouvrir_note_archivee_id(); //done
/*!
* \brief ouvrir_creer_note: construct and show widget to create a new note
*/
void ouvrir_creer_note(); //done
/*!
* \brief forward_to_create_type: construct and show widget form accordingly to the type of the note
*/
void forward_to_create_type(); //done
/*!
* \brief restaurer_note: restore the note which is archived
*/
void restaurer_note();
/*!
* \brief restaurer_version: restore a version of a note active
*/
void restaurer_version();
/*!
* \brief ouvrir_version_act: construct and show widget to view inside a version of a note active
*/
void ouvrir_version_act();
/*!
* \brief ouvrir_version_act: construct and show widget to view inside a version of a note archived
*/
void ouvrir_version_arch();
/*!
* \brief sauver_article: save an Article
*/
void sauver_article();
/*!
* \brief creer_relation: construct and show widget to create new relation
*/
void creer_relation();
/*!
* \brief ouvrir_couples: construct and show widget to view couples inside a relation
*/
void ouvrir_couples();
/*!
* \brief ouvrir_creer_couple: construct and show widget to create new couple
*/
void ouvrir_creer_couple();
/*!
* \brief ouvrir_creer_couple: construct and show widget to create new couple
*/
void creer_couple();
};
#endif // INTERFACE_H