-
Notifications
You must be signed in to change notification settings - Fork 1
/
pedyrum.h
205 lines (125 loc) · 4.81 KB
/
pedyrum.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
/*
Copyright (c) 2013, Luiz Cândido da Silva Júnior, heron@jaguati.com.br
Copyright (c) 2013, Jonathan, jonathan@jaguati.com.br
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Pedyrum may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY {{THE COPYRIGHT HOLDERS AND CONTRIBUTORS}} "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL {{THE COPYRIGHT HOLDER OR CONTRIBUTORS}} BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PEDYRUM_H
#define PEDYRUM_H
#include <QMainWindow>
#include <Abstract/confnetwork.h>
#include <Abstract/encryption.h>
#include <Interface/logininterface.h>
#include <Interface/firstadmininterface.h>
#include <Interface/clientinterface.h>
#include <Interface/productinterface.h>
#include <Interface/functionaryinterface.h>
#include <Interface/treatmentinterface.h>
#include <Interface/orderedinterface.h>
#include <Interface/alertinterface.h>
#include <Interface/accountfinanceinterface.h>
#include <Interface/payboxinterface.h>
#include <Interface/configinterface.h>
#include <Interface/jaguatiinterface.h>
#include <Interface/usermenu.h>
#include <Interface/ads.h>
#include <Component/messagealert.h>
#include <Component/topmenu.h>
#include <Component/sidebar.h>
#include <Abstract/bdtools.h>
#include <Abstract/tools.h>
#include <Object/backup.h>
#include <QStackedWidget>
#include <QKeyEvent>
#include <QCloseEvent>
#include <QSystemTrayIcon>
#include <QTimer>
#include <QPoint>
namespace Ui {
class Pedyrum;
}
class Pedyrum : public QMainWindow
{
Q_OBJECT
public:
explicit Pedyrum(QWidget *parent = 0);
void createComponent(); // Cria os componentes na tela.
void resizeEvent(QResizeEvent *);
void connections();
void closeEvent(QCloseEvent *e);
void input();
BDTools bd;
Tools tools;
~Pedyrum();
public slots:
void openLogin();
void onFocus_Menu(bool b);
void goToPanel(int currentIndex);
void setFullScreen(bool b);
void adjustLayout();
void keyPressEvent(QKeyEvent *event);
void connected();
void showNewAlert();
void trayIcon_MessageCliked();
void setMessageObject(MessageObject *message);
void showAlert();
void hideAlert();
void openSystem(QString name, QString id, QList<bool> permissions);
void logout();
void configureUser();
void timeLogoutUpdate();
void reloadModels(int index);
private slots:
void indexLoadOrdered(int index, int index2, int idOrder = 0);
signals:
void finishedInput();
void restoreLayoutScreen();
private:
Ui::Pedyrum *ui;
short int H_;
short int W_;
short int X_;
short int Y_;
QString styleSheet;
QPropertyAnimation *next;
topMenu *wTopMenu;
sideBar *wSideBar;
ConfNetwork *wConfNetwork;
FirstAdminInterface *wFirstAdminInterface;
LoginInterface *wLoginInterface;
QStackedWidget *swPanels;
TreatmentInterface *wTreatmentInterface;
ClientInterface *wClientInterface;
ProductInterface *wProductInterface;
OrderedInterface *wOrderedInterface;
FunctionaryInterface *wFunctionaryInterface;
AlertInterface *wAlertInterface;
QStackedWidget *swFinance;
AccountFinanceInterface *wBillFinanceInterface;
PayBoxInterface *wCahsInterface;
ConfigInterface *wConfigInterface;
JaguatiInterface *wJaguatiInterface;
Ads *wAds;
GraphicEffects * animationMenu;
Backup backup;
enum windowState{
NORMAL,
MAXIMIZED,
FULL_SCREEN
};
windowState wState;
QSystemTrayIcon *trayIcon;
MessageAlert *wMessage;
UserMenu *wUserMenu;
QTimer *timeLogout;
QTimer *timeServer;
QPoint oldPoint;
int delayLogout;
QString idCurrentSystemUser;
Encryption encryption;
};
#endif // PEDYRUM_H