-
Notifications
You must be signed in to change notification settings - Fork 1
/
homeui.py
306 lines (300 loc) · 17.5 KB
/
homeui.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'homeui.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1292, 875)
MainWindow.setAcceptDrops(True)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("p27.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setAutoFillBackground(True)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setEnabled(True)
self.centralwidget.setAutoFillBackground(True)
self.centralwidget.setObjectName("centralwidget")
self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 0, 851, 861))
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.page = QtWidgets.QWidget(self.gridLayoutWidget)
self.page.setObjectName("page")
self.graphicsView = GraphicsView(self.page)
self.graphicsView.setEnabled(True)
self.graphicsView.setGeometry(QtCore.QRect(20, 20, 801, 831))
self.graphicsView.setInteractive(True)
self.graphicsView.setObjectName("graphicsView")
self.gridLayout.addWidget(self.page, 0, 0, 1, 1)
self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(910, 30, 259, 30))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.radioButton_pre = QtWidgets.QRadioButton(self.horizontalLayoutWidget)
self.radioButton_pre.setChecked(True)
self.radioButton_pre.setObjectName("radioButton_pre")
self.horizontalLayout.addWidget(self.radioButton_pre)
self.radioButton_capture = QtWidgets.QRadioButton(self.horizontalLayoutWidget)
self.radioButton_capture.setObjectName("radioButton_capture")
self.horizontalLayout.addWidget(self.radioButton_capture)
self.pushButton_stop = QtWidgets.QPushButton(self.horizontalLayoutWidget)
self.pushButton_stop.setObjectName("pushButton_stop")
self.horizontalLayout.addWidget(self.pushButton_stop)
self.gridLayoutWidget_2 = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget_2.setGeometry(QtCore.QRect(910, 90, 169, 110))
self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget_2)
self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 7, 0, 1, 1)
self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget_2)
self.label_2.setObjectName("label_2")
self.gridLayout_2.addWidget(self.label_2, 5, 0, 1, 1)
self.spinBox_Interval = QtWidgets.QSpinBox(self.gridLayoutWidget_2)
self.spinBox_Interval.setMinimum(0)
self.spinBox_Interval.setMaximum(99999)
self.spinBox_Interval.setSingleStep(10)
self.spinBox_Interval.setProperty("value", 1000)
self.spinBox_Interval.setObjectName("spinBox_Interval")
self.gridLayout_2.addWidget(self.spinBox_Interval, 5, 1, 1, 1)
self.spinBox_3 = QtWidgets.QSpinBox(self.gridLayoutWidget_2)
self.spinBox_3.setMinimum(1)
self.spinBox_3.setObjectName("spinBox_3")
self.gridLayout_2.addWidget(self.spinBox_3, 7, 1, 1, 1)
self.label = QtWidgets.QLabel(self.gridLayoutWidget_2)
self.label.setObjectName("label")
self.gridLayout_2.addWidget(self.label, 4, 0, 1, 1)
self.spinBox_expo = QtWidgets.QSpinBox(self.gridLayoutWidget_2)
self.spinBox_expo.setMinimum(3)
self.spinBox_expo.setMaximum(30000)
self.spinBox_expo.setSingleStep(10)
self.spinBox_expo.setProperty("value", 40)
self.spinBox_expo.setObjectName("spinBox_expo")
self.gridLayout_2.addWidget(self.spinBox_expo, 4, 1, 1, 1)
self.gridLayoutWidget_4 = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget_4.setGeometry(QtCore.QRect(910, 560, 169, 141))
self.gridLayoutWidget_4.setObjectName("gridLayoutWidget_4")
self.gridLayout_4 = QtWidgets.QGridLayout(self.gridLayoutWidget_4)
self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
self.gridLayout_4.setObjectName("gridLayout_4")
self.checkBox_sti_2 = QtWidgets.QCheckBox(self.gridLayoutWidget_4)
self.checkBox_sti_2.setObjectName("checkBox_sti_2")
self.gridLayout_4.addWidget(self.checkBox_sti_2, 0, 0, 1, 1)
self.checkBox = QtWidgets.QCheckBox(self.gridLayoutWidget_4)
self.checkBox.setObjectName("checkBox")
self.gridLayout_4.addWidget(self.checkBox, 1, 0, 1, 1)
self.spinBox = QtWidgets.QSpinBox(self.gridLayoutWidget_4)
self.spinBox.setObjectName("spinBox")
self.gridLayout_4.addWidget(self.spinBox, 1, 1, 1, 1)
self.spinBox_4 = QtWidgets.QSpinBox(self.gridLayoutWidget_4)
self.spinBox_4.setObjectName("spinBox_4")
self.gridLayout_4.addWidget(self.spinBox_4, 3, 1, 1, 1)
self.checkBox_2 = QtWidgets.QCheckBox(self.gridLayoutWidget_4)
self.checkBox_2.setObjectName("checkBox_2")
self.gridLayout_4.addWidget(self.checkBox_2, 2, 0, 1, 1)
self.checkBox_3 = QtWidgets.QCheckBox(self.gridLayoutWidget_4)
self.checkBox_3.setObjectName("checkBox_3")
self.gridLayout_4.addWidget(self.checkBox_3, 3, 0, 1, 1)
self.spinBox_2 = QtWidgets.QSpinBox(self.gridLayoutWidget_4)
self.spinBox_2.setObjectName("spinBox_2")
self.gridLayout_4.addWidget(self.spinBox_2, 2, 1, 1, 1)
self.gridLayoutWidget_3 = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget_3.setGeometry(QtCore.QRect(910, 260, 271, 246))
self.gridLayoutWidget_3.setObjectName("gridLayoutWidget_3")
self.gridLayout_3 = QtWidgets.QGridLayout(self.gridLayoutWidget_3)
self.gridLayout_3.setContentsMargins(0, 0, 0, 0)
self.gridLayout_3.setObjectName("gridLayout_3")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.checkBox_sti = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_sti.setObjectName("checkBox_sti")
self.horizontalLayout_2.addWidget(self.checkBox_sti)
self.pushButton_roi = QtWidgets.QPushButton(self.gridLayoutWidget_3)
self.pushButton_roi.setCheckable(True)
self.pushButton_roi.setAutoRepeat(True)
self.pushButton_roi.setObjectName("pushButton_roi")
self.horizontalLayout_2.addWidget(self.pushButton_roi)
self.gridLayout_3.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
self.gridLayout_5 = QtWidgets.QGridLayout()
self.gridLayout_5.setObjectName("gridLayout_5")
self.gridLayout_7 = QtWidgets.QGridLayout()
self.gridLayout_7.setObjectName("gridLayout_7")
self.line_16 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_16.setFrameShape(QtWidgets.QFrame.VLine)
self.line_16.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_16.setObjectName("line_16")
self.gridLayout_7.addWidget(self.line_16, 8, 1, 1, 1)
self.checkBox_1_blue = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_1_blue.setObjectName("checkBox_1_blue")
self.gridLayout_7.addWidget(self.checkBox_1_blue, 1, 5, 1, 1)
self.checkBox_1_red = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_1_red.setObjectName("checkBox_1_red")
self.gridLayout_7.addWidget(self.checkBox_1_red, 1, 3, 1, 1)
self.spinBox_2_blue = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_2_blue.setMaximum(255)
self.spinBox_2_blue.setObjectName("spinBox_2_blue")
self.gridLayout_7.addWidget(self.spinBox_2_blue, 6, 5, 1, 1)
self.checkBox_worm1 = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_worm1.setObjectName("checkBox_worm1")
self.gridLayout_7.addWidget(self.checkBox_worm1, 3, 0, 1, 1)
self.line_7 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_7.setFrameShape(QtWidgets.QFrame.VLine)
self.line_7.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_7.setObjectName("line_7")
self.gridLayout_7.addWidget(self.line_7, 1, 4, 1, 1)
self.line_15 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_15.setFrameShape(QtWidgets.QFrame.VLine)
self.line_15.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_15.setObjectName("line_15")
self.gridLayout_7.addWidget(self.line_15, 8, 4, 1, 1)
self.spinBox_1_red = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_1_red.setMaximum(255)
self.spinBox_1_red.setObjectName("spinBox_1_red")
self.gridLayout_7.addWidget(self.spinBox_1_red, 5, 3, 1, 1)
self.line_8 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_8.setFrameShape(QtWidgets.QFrame.HLine)
self.line_8.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_8.setObjectName("line_8")
self.gridLayout_7.addWidget(self.line_8, 4, 0, 1, 1)
self.line = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line.setFrameShape(QtWidgets.QFrame.VLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout_7.addWidget(self.line, 3, 1, 1, 1)
self.line_9 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_9.setFrameShape(QtWidgets.QFrame.HLine)
self.line_9.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_9.setObjectName("line_9")
self.gridLayout_7.addWidget(self.line_9, 4, 3, 1, 1)
self.spinBox_0_blue = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_0_blue.setMaximum(255)
self.spinBox_0_blue.setObjectName("spinBox_0_blue")
self.gridLayout_7.addWidget(self.spinBox_0_blue, 3, 5, 1, 1)
self.line_6 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_6.setFrameShape(QtWidgets.QFrame.VLine)
self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_6.setObjectName("line_6")
self.gridLayout_7.addWidget(self.line_6, 1, 1, 1, 1)
self.line_14 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_14.setFrameShape(QtWidgets.QFrame.VLine)
self.line_14.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_14.setObjectName("line_14")
self.gridLayout_7.addWidget(self.line_14, 6, 4, 1, 1)
self.line_12 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_12.setFrameShape(QtWidgets.QFrame.VLine)
self.line_12.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_12.setObjectName("line_12")
self.gridLayout_7.addWidget(self.line_12, 6, 1, 1, 1)
self.spinBox_1_blue = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_1_blue.setMaximum(255)
self.spinBox_1_blue.setObjectName("spinBox_1_blue")
self.gridLayout_7.addWidget(self.spinBox_1_blue, 5, 5, 1, 1)
self.checkBox_worm2 = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_worm2.setObjectName("checkBox_worm2")
self.gridLayout_7.addWidget(self.checkBox_worm2, 5, 0, 1, 1)
self.spinBox_0_red = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_0_red.setMaximum(255)
self.spinBox_0_red.setObjectName("spinBox_0_red")
self.gridLayout_7.addWidget(self.spinBox_0_red, 3, 3, 1, 1)
self.line_13 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_13.setFrameShape(QtWidgets.QFrame.VLine)
self.line_13.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_13.setObjectName("line_13")
self.gridLayout_7.addWidget(self.line_13, 5, 4, 1, 1)
self.line_10 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_10.setFrameShape(QtWidgets.QFrame.HLine)
self.line_10.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_10.setObjectName("line_10")
self.gridLayout_7.addWidget(self.line_10, 4, 5, 1, 1)
self.checkBox_worm3 = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_worm3.setObjectName("checkBox_worm3")
self.gridLayout_7.addWidget(self.checkBox_worm3, 6, 0, 1, 1)
self.spinBox_3_blue = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_3_blue.setMaximum(255)
self.spinBox_3_blue.setObjectName("spinBox_3_blue")
self.gridLayout_7.addWidget(self.spinBox_3_blue, 8, 5, 1, 1)
self.spinBox_2_red = QtWidgets.QSpinBox(self.gridLayoutWidget_3)
self.spinBox_2_red.setMaximum(255)
self.spinBox_2_red.setObjectName("spinBox_2_red")
self.gridLayout_7.addWidget(self.spinBox_2_red, 6, 3, 1, 1)
self.checkBox_worm4 = QtWidgets.QCheckBox(self.gridLayoutWidget_3)
self.checkBox_worm4.setObjectName("checkBox_worm4")
self.gridLayout_7.addWidget(self.checkBox_worm4, 8, 0, 1, 1)
self.line_11 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_11.setFrameShape(QtWidgets.QFrame.VLine)
self.line_11.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_11.setObjectName("line_11")
self.gridLayout_7.addWidget(self.line_11, 5, 1, 1, 1)
self.line_5 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_5.setFrameShape(QtWidgets.QFrame.HLine)
self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_5.setObjectName("line_5")
self.gridLayout_7.addWidget(self.line_5, 2, 5, 1, 1)
self.line_2 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.gridLayout_7.addWidget(self.line_2, 3, 4, 1, 1)
self.line_4 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_4.setFrameShape(QtWidgets.QFrame.HLine)
self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_4.setObjectName("line_4")
self.gridLayout_7.addWidget(self.line_4, 2, 0, 1, 1)
self.line_3 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_3.setObjectName("line_3")
self.gridLayout_7.addWidget(self.line_3, 2, 3, 1, 1)
self.line_17 = QtWidgets.QFrame(self.gridLayoutWidget_3)
self.line_17.setFrameShape(QtWidgets.QFrame.HLine)
self.line_17.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_17.setObjectName("line_17")
self.gridLayout_7.addWidget(self.line_17, 0, 3, 1, 1)
self.gridLayout_5.addLayout(self.gridLayout_7, 0, 3, 1, 1)
self.gridLayout_3.addLayout(self.gridLayout_5, 8, 0, 1, 1)
self.spinBox_3_red = QtWidgets.QSpinBox(self.centralwidget)
self.spinBox_3_red.setGeometry(QtCore.QRect(1010, 460, 77, 32))
self.spinBox_3_red.setMaximum(255)
self.spinBox_3_red.setObjectName("spinBox_3_red")
self.gridLayoutWidget.raise_()
self.horizontalLayoutWidget.raise_()
self.gridLayoutWidget_2.raise_()
self.gridLayoutWidget_4.raise_()
self.gridLayoutWidget_3.raise_()
self.spinBox_3_red.raise_()
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.graphicsView.setToolTip(_translate("MainWindow", "Apply now ROI "))
self.radioButton_pre.setText(_translate("MainWindow", "Preview"))
self.radioButton_capture.setText(_translate("MainWindow", "Capture"))
self.pushButton_stop.setText(_translate("MainWindow", "Stop"))
self.label_3.setText(_translate("MainWindow", "Number"))
self.label_2.setText(_translate("MainWindow", "Interval[ms]"))
self.label.setText(_translate("MainWindow", "Exposure[ms]"))
self.checkBox_sti_2.setText(_translate("MainWindow", "Power LED"))
self.checkBox.setText(_translate("MainWindow", "395nm"))
self.checkBox_2.setText(_translate("MainWindow", "470nm"))
self.checkBox_3.setText(_translate("MainWindow", "540nm"))
self.checkBox_sti.setText(_translate("MainWindow", "Start Projecte"))
self.pushButton_roi.setText(_translate("MainWindow", "Set ROIs"))
self.checkBox_1_blue.setText(_translate("MainWindow", "Blue"))
self.checkBox_1_red.setText(_translate("MainWindow", "Red"))
self.checkBox_worm1.setText(_translate("MainWindow", "Worm 1"))
self.checkBox_worm2.setText(_translate("MainWindow", "Worm 2"))
self.checkBox_worm3.setText(_translate("MainWindow", "Worm 3"))
self.checkBox_worm4.setText(_translate("MainWindow", "Worm 4"))
from pyqtgraph import GraphicsView