forked from ankulverma/FaceGrab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResult.py
More file actions
191 lines (179 loc) · 7.9 KB
/
Result.py
File metadata and controls
191 lines (179 loc) · 7.9 KB
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
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QPixmap
class Ui_ResultPage(object):
def openWindow(self):
from Search import Ui_SearchPage
self.window = QtWidgets.QDialog()
self.ui = Ui_SearchPage()
self.ui.setupUi(self.window)
self.window.show()
def setupUi(self, Dialog,name,date,time,loc,cam_id,id):
Dialog.setObjectName("Dialog")
Dialog.resize(700, 700)
Dialog.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.label_bg = QtWidgets.QLabel(Dialog)
self.label_bg.setGeometry(QtCore.QRect(0, 0, 700, 700))
self.label_bg.setStyleSheet("background-image: url(:/newPrefix/BG-FB1.jpg);")
self.label_bg.setText("")
self.label_bg.setObjectName("label_bg")
self.label_5 = QtWidgets.QLabel(Dialog)
self.label_5.setGeometry(QtCore.QRect(60, 470, 121, 31))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.label_5.setFont(font)
self.label_5.setStyleSheet("color: rgb(47, 67, 195);\n"
"color: rgb(0, 0, 0);")
self.label_5.setObjectName("label_5")
self.label_1 = QtWidgets.QLabel(Dialog)
self.label_1.setGeometry(QtCore.QRect(130, 110, 81, 31))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(17)
font.setBold(False)
font.setWeight(50)
self.label_1.setFont(font)
self.label_1.setStyleSheet("color: rgb(9, 13, 84);")
self.label_1.setObjectName("label_1")
self.label_6 = QtWidgets.QLabel(Dialog)
self.label_6.setGeometry(QtCore.QRect(400, 480, 55, 21))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.label_6.setFont(font)
self.label_6.setStyleSheet("color: rgb(47, 67, 195);\n"
"color: rgb(0, 0, 0);")
self.label_6.setObjectName("label_6")
self.result_name = QtWidgets.QLabel(Dialog)
self.result_name.setGeometry(QtCore.QRect(230, 200, 201, 16))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.result_name.setFont(font)
self.result_name.setObjectName("result_name")
self.result_name.setText(name)
self.label_8 = QtWidgets.QLabel(Dialog)
self.label_8.setGeometry(QtCore.QRect(400, 520, 55, 16))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.label_8.setFont(font)
self.label_8.setStyleSheet("color: rgb(47, 67, 195);\n"
"color: rgb(0, 0, 0);")
self.label_8.setObjectName("label_8")
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setGeometry(QtCore.QRect(210, 90, 181, 51))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(35)
self.label_2.setFont(font)
self.label_2.setStyleSheet("color: rgb(9, 13, 84);")
self.label_2.setObjectName("label_2")
self.back = QtWidgets.QPushButton(Dialog)
self.back.setGeometry(QtCore.QRect(440, 600, 93, 28))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.back.setFont(font)
self.back.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))
self.back.setStyleSheet("border-radius : 10;\n"
"background-color: rgb(0,0,0);\n"
"color:rgb(255,255,255);")
self.back.setObjectName("back")
self.back.clicked.connect(Dialog.close)
self.result_cam_id = QtWidgets.QLabel(Dialog)
self.result_cam_id.setGeometry(QtCore.QRect(190, 480, 161, 16))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.result_cam_id.setFont(font)
self.result_cam_id.setObjectName("result_cam_id")
self.result_cam_id.setText(cam_id)
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setGeometry(QtCore.QRect(390, 100, 181, 41))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(17)
self.label_3.setFont(font)
self.label_3.setStyleSheet("color: rgb(9, 13, 84);")
self.label_3.setObjectName("label_3")
self.result_date = QtWidgets.QLabel(Dialog)
self.result_date.setGeometry(QtCore.QRect(480, 520, 161, 16))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.result_date.setFont(font)
self.result_date.setObjectName("result_date")
self.result_date.setText(date)
self.result_time = QtWidgets.QLabel(Dialog)
self.result_time.setGeometry(QtCore.QRect(480, 480, 161, 16))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.result_time.setFont(font)
self.result_time.setObjectName("result_time")
self.result_time.setText(time)
self.result_photo = QtWidgets.QLabel(Dialog)
self.result_photo.setGeometry(QtCore.QRect(230, 250, 200, 200))
self.result_photo.setStyleSheet("border: 0.5px solid rgb(9, 13, 84);\n")
self.result_photo.setText("")
img = "ImageSourceDirectory/" + id + ".jpg"
self.result_photo.setPixmap(QtGui.QPixmap(img))
self.result_photo.setScaledContents(True)
self.result_photo.setObjectName("result_photo")
self.result_loc = QtWidgets.QLabel(Dialog)
self.result_loc.setGeometry(QtCore.QRect(190, 520, 161, 16))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.result_loc.setFont(font)
self.result_loc.setObjectName("result_loc")
self.result_loc.setText(loc)
self.label_4 = QtWidgets.QLabel(Dialog)
self.label_4.setGeometry(QtCore.QRect(100, 200, 71, 21))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.label_4.setFont(font)
self.label_4.setStyleSheet("color: rgb(47, 67, 195);\n"
"color: rgb(0, 0, 0);")
self.label_4.setObjectName("label_4")
self.label_7 = QtWidgets.QLabel(Dialog)
self.label_7.setGeometry(QtCore.QRect(80, 520, 91, 21))
font = QtGui.QFont()
font.setFamily("Arial Rounded MT Bold")
font.setPointSize(12)
self.label_7.setFont(font)
self.label_7.setStyleSheet("color: rgb(47, 67, 195);\n"
"color: rgb(0, 0, 0);")
self.label_7.setObjectName("label_7")
self.result_name.setStyleSheet("color: rgb(255,0,0);\n""")
self.result_cam_id.setStyleSheet("color: rgb(255,0,0);\n""")
self.result_time.setStyleSheet("color: rgb(255,0,0);\n""")
self.result_date.setStyleSheet("color: rgb(255,0,0);\n""")
self.result_loc.setStyleSheet("color: rgb(255,0,0);\n""")
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label_5.setText(_translate("Dialog", "Camera Id:"))
self.label_1.setText(_translate("Dialog", "FACE"))
self.label_6.setText(_translate("Dialog", "Time:"))
self.label_8.setText(_translate("Dialog", "Date:"))
self.label_2.setText(_translate("Dialog", "GRAB"))
self.label_3.setText(_translate("Dialog", "RESULTS"))
self.back.setText(_translate("Dialog", "BACK"))
self.label_4.setText(_translate("Dialog", "Name:"))
self.label_7.setText(_translate("Dialog", "Location:"))
import img_result_rc
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_ResultPage()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())