-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathui_CameraView.py
324 lines (318 loc) · 17.6 KB
/
ui_CameraView.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'CameraView.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_CameraView(object):
def setupUi(self, CameraView):
CameraView.setObjectName("CameraView")
CameraView.resize(762, 597)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(CameraView.sizePolicy().hasHeightForWidth())
CameraView.setSizePolicy(sizePolicy)
self.verticalLayout = QtWidgets.QVBoxLayout(CameraView)
self.verticalLayout.setObjectName("verticalLayout")
self.frameLabel = FrameLabel(CameraView)
self.frameLabel.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.frameLabel.sizePolicy().hasHeightForWidth())
self.frameLabel.setSizePolicy(sizePolicy)
self.frameLabel.setMouseTracking(True)
self.frameLabel.setAutoFillBackground(True)
self.frameLabel.setFrameShape(QtWidgets.QFrame.Box)
self.frameLabel.setAlignment(QtCore.Qt.AlignCenter)
self.frameLabel.setObjectName("frameLabel")
self.verticalLayout.addWidget(self.frameLabel)
self.line = QtWidgets.QFrame(CameraView)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.verticalLayout.addWidget(self.line)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.label_4 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_4.setFont(font)
self.label_4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.label_4.setObjectName("label_4")
self.gridLayout.addWidget(self.label_4, 1, 0, 1, 1)
self.label_5 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_5.setFont(font)
self.label_5.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.label_5.setObjectName("label_5")
self.gridLayout.addWidget(self.label_5, 2, 0, 1, 1)
self.imageBufferBar = QtWidgets.QProgressBar(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.imageBufferBar.sizePolicy().hasHeightForWidth())
self.imageBufferBar.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.imageBufferBar.setFont(font)
self.imageBufferBar.setProperty("value", 0)
self.imageBufferBar.setObjectName("imageBufferBar")
self.gridLayout.addWidget(self.imageBufferBar, 7, 1, 1, 1)
self.roiLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.roiLabel.sizePolicy().hasHeightForWidth())
self.roiLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.roiLabel.setFont(font)
self.roiLabel.setText("")
self.roiLabel.setObjectName("roiLabel")
self.gridLayout.addWidget(self.roiLabel, 5, 1, 1, 1)
self.imageBufferLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.imageBufferLabel.sizePolicy().hasHeightForWidth())
self.imageBufferLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.imageBufferLabel.setFont(font)
self.imageBufferLabel.setText("")
self.imageBufferLabel.setAlignment(QtCore.Qt.AlignCenter)
self.imageBufferLabel.setObjectName("imageBufferLabel")
self.gridLayout.addWidget(self.imageBufferLabel, 7, 2, 1, 1)
self.label_7 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
self.label_7.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_7.setFont(font)
self.label_7.setObjectName("label_7")
self.gridLayout.addWidget(self.label_7, 6, 0, 1, 1)
self.nFramesProcessedLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.nFramesProcessedLabel.sizePolicy().hasHeightForWidth())
self.nFramesProcessedLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.nFramesProcessedLabel.setFont(font)
self.nFramesProcessedLabel.setText("")
self.nFramesProcessedLabel.setAlignment(QtCore.Qt.AlignCenter)
self.nFramesProcessedLabel.setObjectName("nFramesProcessedLabel")
self.gridLayout.addWidget(self.nFramesProcessedLabel, 4, 2, 1, 1)
self.captureRateLabel = QtWidgets.QLabel(CameraView)
self.captureRateLabel.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.captureRateLabel.sizePolicy().hasHeightForWidth())
self.captureRateLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.captureRateLabel.setFont(font)
self.captureRateLabel.setText("")
self.captureRateLabel.setObjectName("captureRateLabel")
self.gridLayout.addWidget(self.captureRateLabel, 3, 1, 1, 1)
self.label_6 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
self.label_6.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_6.setFont(font)
self.label_6.setObjectName("label_6")
self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
self.label_1 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_1.sizePolicy().hasHeightForWidth())
self.label_1.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_1.setFont(font)
self.label_1.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.label_1.setObjectName("label_1")
self.gridLayout.addWidget(self.label_1, 7, 0, 1, 1)
self.nFramesCapturedLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.nFramesCapturedLabel.sizePolicy().hasHeightForWidth())
self.nFramesCapturedLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.nFramesCapturedLabel.setFont(font)
self.nFramesCapturedLabel.setText("")
self.nFramesCapturedLabel.setAlignment(QtCore.Qt.AlignCenter)
self.nFramesCapturedLabel.setObjectName("nFramesCapturedLabel")
self.gridLayout.addWidget(self.nFramesCapturedLabel, 3, 2, 1, 1)
self.label_3 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
self.label_2 = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
font.setWeight(75)
self.label_2.setFont(font)
self.label_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1)
self.cameraResolutionLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cameraResolutionLabel.sizePolicy().hasHeightForWidth())
self.cameraResolutionLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.cameraResolutionLabel.setFont(font)
self.cameraResolutionLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.cameraResolutionLabel.setObjectName("cameraResolutionLabel")
self.gridLayout.addWidget(self.cameraResolutionLabel, 2, 1, 1, 1)
self.mouseCursorPosLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.mouseCursorPosLabel.sizePolicy().hasHeightForWidth())
self.mouseCursorPosLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.mouseCursorPosLabel.setFont(font)
self.mouseCursorPosLabel.setText("")
self.mouseCursorPosLabel.setObjectName("mouseCursorPosLabel")
self.gridLayout.addWidget(self.mouseCursorPosLabel, 6, 1, 1, 1)
self.deviceUrlLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.deviceUrlLabel.sizePolicy().hasHeightForWidth())
self.deviceUrlLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.deviceUrlLabel.setFont(font)
self.deviceUrlLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.deviceUrlLabel.setObjectName("deviceUrlLabel")
self.gridLayout.addWidget(self.deviceUrlLabel, 1, 1, 1, 1)
self.processingRateLabel = QtWidgets.QLabel(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.processingRateLabel.sizePolicy().hasHeightForWidth())
self.processingRateLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.processingRateLabel.setFont(font)
self.processingRateLabel.setText("")
self.processingRateLabel.setObjectName("processingRateLabel")
self.gridLayout.addWidget(self.processingRateLabel, 4, 1, 1, 1)
self.clearImageBufferButton = QtWidgets.QPushButton(CameraView)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.clearImageBufferButton.sizePolicy().hasHeightForWidth())
self.clearImageBufferButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.clearImageBufferButton.setFont(font)
self.clearImageBufferButton.setObjectName("clearImageBufferButton")
self.gridLayout.addWidget(self.clearImageBufferButton, 7, 3, 1, 1)
self.startButton = QtWidgets.QPushButton(CameraView)
self.startButton.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.startButton.sizePolicy().hasHeightForWidth())
self.startButton.setSizePolicy(sizePolicy)
self.startButton.setObjectName("startButton")
self.gridLayout.addWidget(self.startButton, 3, 3, 1, 1)
self.pauseButton = QtWidgets.QPushButton(CameraView)
self.pauseButton.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth())
self.pauseButton.setSizePolicy(sizePolicy)
self.pauseButton.setObjectName("pauseButton")
self.gridLayout.addWidget(self.pauseButton, 4, 3, 1, 1)
self.reconnectButton = QtWidgets.QPushButton(CameraView)
self.reconnectButton.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.reconnectButton.sizePolicy().hasHeightForWidth())
self.reconnectButton.setSizePolicy(sizePolicy)
self.reconnectButton.setObjectName("reconnectButton")
self.gridLayout.addWidget(self.reconnectButton, 1, 3, 1, 1)
self.gridLayout.setColumnStretch(0, 1)
self.gridLayout.setColumnStretch(1, 1)
self.gridLayout.setColumnStretch(2, 1)
self.gridLayout.setColumnStretch(3, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.verticalLayout.setStretch(0, 1)
self.retranslateUi(CameraView)
QtCore.QMetaObject.connectSlotsByName(CameraView)
def retranslateUi(self, CameraView):
_translate = QtCore.QCoreApplication.translate
CameraView.setWindowTitle(_translate("CameraView", "Form"))
self.label_4.setText(_translate("CameraView", "Camera Device Url:"))
self.label_5.setText(_translate("CameraView", "Camera Resolution:"))
self.label_7.setText(_translate("CameraView", "Cursor:"))
self.label_6.setText(_translate("CameraView", "ROI:"))
self.label_1.setText(_translate("CameraView", "Image Buffer:"))
self.label_3.setText(_translate("CameraView", "Processing Rate:"))
self.label_2.setText(_translate("CameraView", "Capture Rate:"))
self.clearImageBufferButton.setText(_translate("CameraView", "Clear Image Buffer"))
self.startButton.setText(_translate("CameraView", "Start"))
self.pauseButton.setText(_translate("CameraView", "Pause"))
self.reconnectButton.setText(_translate("CameraView", "Reconnect"))
from FrameLabel import FrameLabel