-
Notifications
You must be signed in to change notification settings - Fork 1
/
auth.py
261 lines (254 loc) · 11.6 KB
/
auth.py
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
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.setFixedSize(835, 358)
self.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(-140, 0, 1071, 361))
self.label.setFrameShape(QtWidgets.QFrame.Panel)
self.label.setLineWidth(0)
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap(":/images/Images/auth_back.jpg"))
self.label.setScaledContents(True)
self.label.setObjectName("label")
shadow = QtWidgets.QGraphicsDropShadowEffect()
shadow.setOffset(0)
shadow.setBlurRadius(20)
shadow.setColor(QtGui.QColor(0, 0, 0, 80))
self.frame = QtWidgets.QFrame(self.centralwidget)
self.frame.setGraphicsEffect(shadow)
self.frame.setGeometry(QtCore.QRect(30, 30, 270, 291))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
self.frame.setSizePolicy(sizePolicy)
self.frame.setLayoutDirection(QtCore.Qt.LeftToRight)
self.frame.setAutoFillBackground(False)
self.frame.setStyleSheet("QFrame{\n"
" background-color: white;\n"
" border-radius: 5px;\n"
"}")
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.frame)
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(0, 40, 271, 22))
self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_3 = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Poetsen One")
font.setPointSize(13)
self.label_3.setFont(font)
self.label_3.setAutoFillBackground(False)
self.label_3.setStyleSheet("color: #4B7BEC;")
self.label_3.setFrameShadow(QtWidgets.QFrame.Raised)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName("label_3")
self.horizontalLayout_2.addWidget(self.label_3)
self.horizontalLayoutWidget = QtWidgets.QWidget(self.frame)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 20, 271, 25))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.label_2 = QtWidgets.QLabel(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Poetsen One")
font.setPointSize(13)
font.setBold(False)
font.setWeight(50)
self.label_2.setFont(font)
self.label_2.setStyleSheet("color: rgba(0, 0, 0, 0.65);")
self.label_2.setFrameShadow(QtWidgets.QFrame.Raised)
self.label_2.setTextFormat(QtCore.Qt.AutoText)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
self.horizontalLayoutWidget_3 = QtWidgets.QWidget(self.frame)
self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(0, 70, 271, 21))
self.horizontalLayoutWidget_3.setObjectName("horizontalLayoutWidget_3")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_3)
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label_4 = QtWidgets.QLabel(self.horizontalLayoutWidget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Public Sans")
font.setPointSize(7)
font.setBold(False)
font.setWeight(50)
self.label_4.setFont(font)
self.label_4.setStyleSheet("color: rgba(0, 0, 0, 0.5);")
self.label_4.setFrameShadow(QtWidgets.QFrame.Raised)
self.label_4.setTextFormat(QtCore.Qt.AutoText)
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
self.label_4.setObjectName("label_4")
self.horizontalLayout_3.addWidget(self.label_4)
self.label_5 = QtWidgets.QLabel(self.frame)
self.label_5.setGeometry(QtCore.QRect(46, 120, 31, 16))
font = QtGui.QFont()
font.setFamily("Public Sans")
self.label_5.setFont(font)
self.label_5.setStyleSheet("color: #333333;")
self.label_5.setAlignment(QtCore.Qt.AlignCenter)
self.label_5.setObjectName("label_5")
self.frame_2 = QtWidgets.QFrame(self.frame)
self.frame_2.setGeometry(QtCore.QRect(46, 140, 178, 21))
font = QtGui.QFont()
font.setFamily("Public Sans")
self.frame_2.setFont(font)
self.frame_2.setAutoFillBackground(False)
self.frame_2.setStyleSheet("QFrame{\n"
" background-color: white;\n"
" border-bottom: 1px solid rgba(0, 0, 0, 0.44);\n"
"}")
self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_2.setObjectName("frame_2")
self.lineEdit = QtWidgets.QLineEdit(self.frame_2)
self.lineEdit.setGeometry(QtCore.QRect(2, 0, 158, 16))
self.lineEdit.setStyleSheet("border: none;")
self.lineEdit.setText("")
self.lineEdit.setObjectName("lineEdit")
self.label_6 = QtWidgets.QLabel(self.frame_2)
self.label_6.setGeometry(QtCore.QRect(160, 0, 14, 14))
self.label_6.setStyleSheet("border: none;")
self.label_6.setText("")
self.label_6.setPixmap(QtGui.QPixmap(":/images/Images/user.png"))
self.label_6.setScaledContents(True)
self.label_6.setObjectName("label_6")
self.label_7 = QtWidgets.QLabel(self.frame)
self.label_7.setGeometry(QtCore.QRect(46, 170, 41, 16))
font = QtGui.QFont()
font.setFamily("Public Sans")
self.label_7.setFont(font)
self.label_7.setStyleSheet("color: #333333;")
self.label_7.setAlignment(QtCore.Qt.AlignCenter)
self.label_7.setObjectName("label_7")
self.frame_3 = QtWidgets.QFrame(self.frame)
self.frame_3.setGeometry(QtCore.QRect(46, 190, 178, 21))
font = QtGui.QFont()
font.setFamily("Public Sans")
self.frame_3.setFont(font)
self.frame_3.setAutoFillBackground(False)
self.frame_3.setStyleSheet("QFrame{\n"
" background-color: white;\n"
" border-bottom: 1px solid rgba(0, 0, 0, 0.44);\n"
"}")
self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_3.setObjectName("frame_3")
self.lineEdit_2 = QtWidgets.QLineEdit(self.frame_3)
self.lineEdit_2.setGeometry(QtCore.QRect(2, 0, 158, 16))
self.lineEdit_2.setStyleSheet("border: none;")
self.lineEdit_2.setText("")
self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Password)
self.lineEdit_2.setObjectName("lineEdit_2")
self.label_8 = QtWidgets.QLabel(self.frame_3)
self.label_8.setGeometry(QtCore.QRect(160, 0, 17, 14))
self.label_8.setStyleSheet("border: none;")
self.label_8.setText("")
self.label_8.mousePressEvent = self.show_hide_password
self.label_8.setPixmap(QtGui.QPixmap(":/images/Images/password.png"))
self.label_8.setScaledContents(True)
self.label_8.setObjectName("label_8")
self.pushButton = QtWidgets.QPushButton(self.frame)
self.pushButton.setGeometry(QtCore.QRect(24, 230, 222, 27))
font = QtGui.QFont()
font.setFamily("Roboto Medium")
font.setPointSize(8)
self.pushButton.setFont(font)
self.pushButton.setAutoFillBackground(False)
self.pushButton.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.pushButton.setStyleSheet("background-color: #4B7BEC;\n"
"border: none;\n"
"color: white;\n"
"border-radius: 2px;")
self.pushButton.setObjectName("pushButton")
self.frame_6 = QtWidgets.QFrame(self.centralwidget)
self.frame_6.setObjectName(u"frame_4")
self.frame_6.setGeometry(QtCore.QRect(634, 358, 201, 30))
self.frame_6.setStyleSheet(u"QFrame{\n"
" background-color: white;\n"
" border-top-left-radius: 5px;\n"
"}")
self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised)
self.label_10 = QtWidgets.QLabel(self.frame_6)
self.label_10.setObjectName(u"label_9")
self.label_10.setGeometry(QtCore.QRect(25, 5, 171, 20))
self.label_10.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_10.setAlignment(QtCore.Qt.AlignCenter)
self.label_10.setText("Подождите")
self.frame_7 = QtWidgets.QFrame(self.frame_6)
self.frame_7.setObjectName(u"frame_5")
self.frame_7.setGeometry(QtCore.QRect(0, 0, 20, 30))
self.frame_7.setStyleSheet(u"QFrame{\n"
" background-color: #05b4ff;\n"
"}")
self.frame_7.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_4 = QtWidgets.QFrame(self.centralwidget)
self.frame_4.setObjectName(u"frame_4")
self.frame_4.setGeometry(QtCore.QRect(634, 358, 201, 30))
self.frame_4.setStyleSheet(u"QFrame{\n"
" background-color: white;\n"
" border-top-left-radius: 5px;\n"
"}")
self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
self.label_9 = QtWidgets.QLabel(self.frame_4)
self.label_9.setObjectName(u"label_9")
self.label_9.setGeometry(QtCore.QRect(25, 5, 171, 20))
self.label_9.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_9.setAlignment(QtCore.Qt.AlignCenter)
self.label_9.setText("Проверьте корректность данных")
self.frame_5 = QtWidgets.QFrame(self.frame_4)
self.frame_5.setObjectName(u"frame_5")
self.frame_5.setGeometry(QtCore.QRect(0, 0, 20, 30))
self.frame_5.setStyleSheet(u"QFrame{\n"
" background-color: #d10a39;\n"
"}")
self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.label_3.setText(_translate("MainWindow", "Audit Vela"))
self.label_2.setText(_translate("MainWindow", "Добро пожаловать"))
self.label_4.setText(_translate("MainWindow", "Введите ваши данные"))
self.label_5.setText(_translate("MainWindow", "Логин"))
self.lineEdit.setPlaceholderText(_translate("MainWindow", "Email"))
self.label_7.setText(_translate("MainWindow", "Пароль"))
self.lineEdit_2.setPlaceholderText(_translate("MainWindow", "Введите пароль"))
self.pushButton.setText(_translate("MainWindow", "Продолжить"))
def show_hide_password(self, event):
if self.lineEdit_2.echoMode() == 2:
self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Normal)
else:
self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Password)
import resources_rc