-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindowmenu.cpp
129 lines (112 loc) · 2.74 KB
/
windowmenu.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
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
/**
* @file windowmenu.cpp
* @brief Fenêtre de menu
* @author tromanin
* @date vendredi 4 septembre 2015, 09:00:00
*
* On apparait sur cette fenêtre après s'être authentifié,
* c'est un menu de navigation pour aller sur chaque fenêtres.
*/
#include "windowmenu.h"
#include "ui_windowmenu.h"
#include <QPushButton>
#include <windowrayon.h>
#include <windowtypeproduit.h>
#include <windowmoderation.h>
#include <windowproduit.h>
#include <windowapercu.h>
#include <mainwindow.h>
/**
* @brief WindowMenu::WindowMenu
* @param parent
*
* Initialisation de l'interface utilisateur.
*/
WindowMenu::WindowMenu(QWidget *parent) :
QDialog(parent),
ui(new Ui::WindowMenu)
{
ui->setupUi(this);
ui->pushButtonModeration->hide();
}
/**
* @brief WindowMenu::~WindowMenu
*
* Suppression de l'interface utilisateur.
*/
WindowMenu::~WindowMenu()
{
delete ui;
}
/**
* @brief WindowMenu::on_pushButtonDeconnexion_clicked
*
* Permet de se déconnecter,
* Renvoie à la fenêtre d'authentification, ferme le menu.
*/
void WindowMenu::on_pushButtonDeconnexion_clicked()
{
MainWindow *allerAuthentification = new MainWindow();
allerAuthentification->show();
this->reject();
}
/**
* @brief WindowMenu::on_pushButtonRayon_clicked
*
* Ouvre la fenêtre d'ajout des rayons, ferme le menu.
*/
void WindowMenu::on_pushButtonRayon_clicked()
{
windowRayon *allerRayon = new windowRayon();
allerRayon->setModal(true);
allerRayon->show();
this->reject();
}
/**
* @brief WindowMenu::on_pushButtonTypeProduit_clicked
*
* Ouvre la fenêtre d'ajout des types de produits, ferme le menu.
*/
void WindowMenu::on_pushButtonTypeProduit_clicked()
{
WindowTypeProduit *allerTypeProduit = new WindowTypeProduit();
allerTypeProduit->setModal(true);
allerTypeProduit->show();
this->reject();
}
/**
* @brief WindowMenu::on_pushButtonProduit_clicked
*
* Ouvre la fenêtre d'ajout des produits, ferme le menu.
*/
void WindowMenu::on_pushButtonProduit_clicked()
{
WindowProduit *allerProduit = new WindowProduit();
allerProduit->setModal(true);
allerProduit->show();
this->reject();
}
/**
* @brief WindowMenu::on_pushButtonModeration_clicked
*
* Ouvre la fenêtre de modération, ferme le menu.
*/
void WindowMenu::on_pushButtonModeration_clicked()
{
WindowModeration *allerModeration = new WindowModeration();
allerModeration->setModal(true);
allerModeration->show();
this->reject();
}
/**
* @brief WindowMenu::on_pushButtonApercu_clicked
*
* Ouvre la fenêtre d'aperçu, ferme le menu.
*/
void WindowMenu::on_pushButtonApercu_clicked()
{
WindowApercu *allerApercu = new WindowApercu();
allerApercu->setModal(true);
allerApercu->show();
this->reject();
}