-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_ui.py
More file actions
242 lines (233 loc) · 17 KB
/
test_ui.py
File metadata and controls
242 lines (233 loc) · 17 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
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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'test.ui'
#
# Created: Mon Feb 6 21:44:01 2012
# by: PyQt4 UI code generator 4.9
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(728, 349)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(0, 0, 771, 301))
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.tab = QtGui.QWidget()
self.tab.setObjectName(_fromUtf8("tab"))
self.MinHueHorizontalSlider = QtGui.QSlider(self.tab)
self.MinHueHorizontalSlider.setGeometry(QtCore.QRect(140, 20, 160, 29))
self.MinHueHorizontalSlider.setMaximum(255)
self.MinHueHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.MinHueHorizontalSlider.setObjectName(_fromUtf8("MinHueHorizontalSlider"))
self.MinSatHorizontalSlider = QtGui.QSlider(self.tab)
self.MinSatHorizontalSlider.setGeometry(QtCore.QRect(140, 60, 160, 29))
self.MinSatHorizontalSlider.setMaximum(255)
self.MinSatHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.MinSatHorizontalSlider.setObjectName(_fromUtf8("MinSatHorizontalSlider"))
self.MinValHorizontalSlider = QtGui.QSlider(self.tab)
self.MinValHorizontalSlider.setGeometry(QtCore.QRect(140, 100, 160, 29))
self.MinValHorizontalSlider.setMaximum(255)
self.MinValHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.MinValHorizontalSlider.setObjectName(_fromUtf8("MinValHorizontalSlider"))
self.MaxHueHorizontalSlider = QtGui.QSlider(self.tab)
self.MaxHueHorizontalSlider.setGeometry(QtCore.QRect(320, 20, 160, 29))
self.MaxHueHorizontalSlider.setMaximum(255)
self.MaxHueHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.MaxHueHorizontalSlider.setObjectName(_fromUtf8("MaxHueHorizontalSlider"))
self.MaxSatHorizontalSlider = QtGui.QSlider(self.tab)
self.MaxSatHorizontalSlider.setGeometry(QtCore.QRect(320, 60, 160, 29))
self.MaxSatHorizontalSlider.setMaximum(255)
self.MaxSatHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.MaxSatHorizontalSlider.setObjectName(_fromUtf8("MaxSatHorizontalSlider"))
self.MaxValHorizontalSlider = QtGui.QSlider(self.tab)
self.MaxValHorizontalSlider.setGeometry(QtCore.QRect(320, 100, 160, 29))
self.MaxValHorizontalSlider.setMaximum(255)
self.MaxValHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.MaxValHorizontalSlider.setObjectName(_fromUtf8("MaxValHorizontalSlider"))
self.MinHueLabel = QtGui.QLabel(self.tab)
self.MinHueLabel.setGeometry(QtCore.QRect(500, 30, 67, 17))
self.MinHueLabel.setObjectName(_fromUtf8("MinHueLabel"))
self.MaxHueLabel = QtGui.QLabel(self.tab)
self.MaxHueLabel.setGeometry(QtCore.QRect(610, 30, 67, 17))
self.MaxHueLabel.setObjectName(_fromUtf8("MaxHueLabel"))
self.MinSatLabel = QtGui.QLabel(self.tab)
self.MinSatLabel.setGeometry(QtCore.QRect(500, 60, 67, 17))
self.MinSatLabel.setObjectName(_fromUtf8("MinSatLabel"))
self.MaxSatLabel = QtGui.QLabel(self.tab)
self.MaxSatLabel.setGeometry(QtCore.QRect(610, 60, 67, 17))
self.MaxSatLabel.setObjectName(_fromUtf8("MaxSatLabel"))
self.MinValLabel = QtGui.QLabel(self.tab)
self.MinValLabel.setGeometry(QtCore.QRect(500, 100, 67, 17))
self.MinValLabel.setObjectName(_fromUtf8("MinValLabel"))
self.MaxValLabel = QtGui.QLabel(self.tab)
self.MaxValLabel.setGeometry(QtCore.QRect(610, 100, 67, 17))
self.MaxValLabel.setObjectName(_fromUtf8("MaxValLabel"))
self.label = QtGui.QLabel(self.tab)
self.label.setGeometry(QtCore.QRect(20, 30, 67, 17))
self.label.setObjectName(_fromUtf8("label"))
self.label_2 = QtGui.QLabel(self.tab)
self.label_2.setGeometry(QtCore.QRect(20, 60, 81, 17))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.label_7 = QtGui.QLabel(self.tab)
self.label_7.setGeometry(QtCore.QRect(20, 100, 67, 17))
self.label_7.setObjectName(_fromUtf8("label_7"))
self.label_8 = QtGui.QLabel(self.tab)
self.label_8.setGeometry(QtCore.QRect(190, 0, 67, 17))
self.label_8.setObjectName(_fromUtf8("label_8"))
self.label_9 = QtGui.QLabel(self.tab)
self.label_9.setGeometry(QtCore.QRect(360, 0, 67, 17))
self.label_9.setObjectName(_fromUtf8("label_9"))
self.label_12 = QtGui.QLabel(self.tab)
self.label_12.setGeometry(QtCore.QRect(20, 140, 101, 17))
self.label_12.setObjectName(_fromUtf8("label_12"))
self.BeatPeriodHorizontalSlider = QtGui.QSlider(self.tab)
self.BeatPeriodHorizontalSlider.setGeometry(QtCore.QRect(140, 140, 160, 29))
self.BeatPeriodHorizontalSlider.setMaximum(255)
self.BeatPeriodHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.BeatPeriodHorizontalSlider.setObjectName(_fromUtf8("BeatPeriodHorizontalSlider"))
self.BeatPeriodLabel = QtGui.QLabel(self.tab)
self.BeatPeriodLabel.setGeometry(QtCore.QRect(500, 140, 67, 17))
self.BeatPeriodLabel.setObjectName(_fromUtf8("BeatPeriodLabel"))
self.tabWidget.addTab(self.tab, _fromUtf8(""))
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.CannyThresh1HorizontalSlider = QtGui.QSlider(self.tab_2)
self.CannyThresh1HorizontalSlider.setGeometry(QtCore.QRect(210, 10, 160, 29))
self.CannyThresh1HorizontalSlider.setMaximum(100)
self.CannyThresh1HorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.CannyThresh1HorizontalSlider.setObjectName(_fromUtf8("CannyThresh1HorizontalSlider"))
self.label_3 = QtGui.QLabel(self.tab_2)
self.label_3.setGeometry(QtCore.QRect(20, 20, 181, 17))
self.label_3.setObjectName(_fromUtf8("label_3"))
self.label_4 = QtGui.QLabel(self.tab_2)
self.label_4.setGeometry(QtCore.QRect(20, 50, 181, 17))
self.label_4.setObjectName(_fromUtf8("label_4"))
self.label_5 = QtGui.QLabel(self.tab_2)
self.label_5.setGeometry(QtCore.QRect(20, 80, 181, 17))
self.label_5.setObjectName(_fromUtf8("label_5"))
self.CannyThresh2HorizontalSlider = QtGui.QSlider(self.tab_2)
self.CannyThresh2HorizontalSlider.setGeometry(QtCore.QRect(210, 40, 160, 29))
self.CannyThresh2HorizontalSlider.setMinimum(1)
self.CannyThresh2HorizontalSlider.setMaximum(255)
self.CannyThresh2HorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.CannyThresh2HorizontalSlider.setObjectName(_fromUtf8("CannyThresh2HorizontalSlider"))
self.CannyAperatureHorizontalSlider = QtGui.QSlider(self.tab_2)
self.CannyAperatureHorizontalSlider.setGeometry(QtCore.QRect(210, 70, 160, 29))
self.CannyAperatureHorizontalSlider.setMinimum(1)
self.CannyAperatureHorizontalSlider.setMaximum(20)
self.CannyAperatureHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.CannyAperatureHorizontalSlider.setObjectName(_fromUtf8("CannyAperatureHorizontalSlider"))
self.CannyThresh1Label = QtGui.QLabel(self.tab_2)
self.CannyThresh1Label.setGeometry(QtCore.QRect(390, 20, 67, 17))
self.CannyThresh1Label.setObjectName(_fromUtf8("CannyThresh1Label"))
self.CannyThresh2Label = QtGui.QLabel(self.tab_2)
self.CannyThresh2Label.setGeometry(QtCore.QRect(390, 50, 67, 17))
self.CannyThresh2Label.setObjectName(_fromUtf8("CannyThresh2Label"))
self.CannyAperatureLabel = QtGui.QLabel(self.tab_2)
self.CannyAperatureLabel.setGeometry(QtCore.QRect(390, 80, 67, 17))
self.CannyAperatureLabel.setObjectName(_fromUtf8("CannyAperatureLabel"))
self.label_6 = QtGui.QLabel(self.tab_2)
self.label_6.setGeometry(QtCore.QRect(20, 110, 181, 17))
self.label_6.setObjectName(_fromUtf8("label_6"))
self.ContourMinPerimeterHorizontalSlider = QtGui.QSlider(self.tab_2)
self.ContourMinPerimeterHorizontalSlider.setGeometry(QtCore.QRect(210, 100, 160, 29))
self.ContourMinPerimeterHorizontalSlider.setMinimum(1)
self.ContourMinPerimeterHorizontalSlider.setMaximum(1000)
self.ContourMinPerimeterHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.ContourMinPerimeterHorizontalSlider.setObjectName(_fromUtf8("ContourMinPerimeterHorizontalSlider"))
self.ContourMinPerimeterLabel = QtGui.QLabel(self.tab_2)
self.ContourMinPerimeterLabel.setGeometry(QtCore.QRect(390, 110, 67, 17))
self.ContourMinPerimeterLabel.setObjectName(_fromUtf8("ContourMinPerimeterLabel"))
self.label_10 = QtGui.QLabel(self.tab_2)
self.label_10.setGeometry(QtCore.QRect(20, 140, 181, 17))
self.label_10.setObjectName(_fromUtf8("label_10"))
self.ContourMinAreaHorizontalSlider = QtGui.QSlider(self.tab_2)
self.ContourMinAreaHorizontalSlider.setGeometry(QtCore.QRect(210, 130, 160, 29))
self.ContourMinAreaHorizontalSlider.setMinimum(1)
self.ContourMinAreaHorizontalSlider.setMaximum(10000)
self.ContourMinAreaHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.ContourMinAreaHorizontalSlider.setObjectName(_fromUtf8("ContourMinAreaHorizontalSlider"))
self.ContourMinAreaLabel = QtGui.QLabel(self.tab_2)
self.ContourMinAreaLabel.setGeometry(QtCore.QRect(390, 140, 67, 17))
self.ContourMinAreaLabel.setObjectName(_fromUtf8("ContourMinAreaLabel"))
self.label_11 = QtGui.QLabel(self.tab_2)
self.label_11.setGeometry(QtCore.QRect(20, 170, 181, 17))
self.label_11.setObjectName(_fromUtf8("label_11"))
self.ContourDeviationRatioHorizontalSlider = QtGui.QSlider(self.tab_2)
self.ContourDeviationRatioHorizontalSlider.setGeometry(QtCore.QRect(210, 160, 160, 29))
self.ContourDeviationRatioHorizontalSlider.setMinimum(1)
self.ContourDeviationRatioHorizontalSlider.setMaximum(1000)
self.ContourDeviationRatioHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.ContourDeviationRatioHorizontalSlider.setObjectName(_fromUtf8("ContourDeviationRatioHorizontalSlider"))
self.ContourDeviationRatioLabel = QtGui.QLabel(self.tab_2)
self.ContourDeviationRatioLabel.setGeometry(QtCore.QRect(390, 170, 67, 17))
self.ContourDeviationRatioLabel.setObjectName(_fromUtf8("ContourDeviationRatioLabel"))
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 728, 26))
self.menubar.setObjectName(_fromUtf8("menubar"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.MinHueHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.MinHueLabel.setNum)
QtCore.QObject.connect(self.MaxHueHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.MaxHueLabel.setNum)
QtCore.QObject.connect(self.MinSatHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.MinSatLabel.setNum)
QtCore.QObject.connect(self.MaxSatHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.MaxSatLabel.setNum)
QtCore.QObject.connect(self.MaxValHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.MaxValLabel.setNum)
QtCore.QObject.connect(self.MinValHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.MinValLabel.setNum)
QtCore.QObject.connect(self.CannyThresh1HorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.CannyThresh1Label.setNum)
QtCore.QObject.connect(self.CannyThresh2HorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.CannyThresh2Label.setNum)
QtCore.QObject.connect(self.CannyAperatureHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.CannyAperatureLabel.setNum)
QtCore.QObject.connect(self.ContourMinPerimeterHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.ContourMinPerimeterLabel.setNum)
QtCore.QObject.connect(self.ContourMinAreaHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.ContourMinAreaLabel.setNum)
QtCore.QObject.connect(self.ContourDeviationRatioHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.ContourDeviationRatioLabel.setNum)
QtCore.QObject.connect(self.BeatPeriodHorizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.BeatPeriodLabel.setNum)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
self.MinHueLabel.setText(QtGui.QApplication.translate("MainWindow", "MinHueLabel", None, QtGui.QApplication.UnicodeUTF8))
self.MaxHueLabel.setText(QtGui.QApplication.translate("MainWindow", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
self.MinSatLabel.setText(QtGui.QApplication.translate("MainWindow", "MinSatLabel", None, QtGui.QApplication.UnicodeUTF8))
self.MaxSatLabel.setText(QtGui.QApplication.translate("MainWindow", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
self.MinValLabel.setText(QtGui.QApplication.translate("MainWindow", "MinValLabel", None, QtGui.QApplication.UnicodeUTF8))
self.MaxValLabel.setText(QtGui.QApplication.translate("MainWindow", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("MainWindow", "Hue", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Saturation", None, QtGui.QApplication.UnicodeUTF8))
self.label_7.setText(QtGui.QApplication.translate("MainWindow", "Value", None, QtGui.QApplication.UnicodeUTF8))
self.label_8.setText(QtGui.QApplication.translate("MainWindow", "Min", None, QtGui.QApplication.UnicodeUTF8))
self.label_9.setText(QtGui.QApplication.translate("MainWindow", "Max", None, QtGui.QApplication.UnicodeUTF8))
self.label_12.setText(QtGui.QApplication.translate("MainWindow", "Beat Period", None, QtGui.QApplication.UnicodeUTF8))
self.BeatPeriodLabel.setText(QtGui.QApplication.translate("MainWindow", "Beats", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("MainWindow", "ColorFilter", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Canny Threshold 1", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Canny Threshold 2", None, QtGui.QApplication.UnicodeUTF8))
self.label_5.setText(QtGui.QApplication.translate("MainWindow", "Canny Aperature", None, QtGui.QApplication.UnicodeUTF8))
self.CannyThresh1Label.setText(QtGui.QApplication.translate("MainWindow", "Thresh1", None, QtGui.QApplication.UnicodeUTF8))
self.CannyThresh2Label.setText(QtGui.QApplication.translate("MainWindow", "Thresh2", None, QtGui.QApplication.UnicodeUTF8))
self.CannyAperatureLabel.setText(QtGui.QApplication.translate("MainWindow", "Aperature", None, QtGui.QApplication.UnicodeUTF8))
self.label_6.setText(QtGui.QApplication.translate("MainWindow", "Min Perimeter", None, QtGui.QApplication.UnicodeUTF8))
self.ContourMinPerimeterLabel.setText(QtGui.QApplication.translate("MainWindow", "Perimeter", None, QtGui.QApplication.UnicodeUTF8))
self.label_10.setText(QtGui.QApplication.translate("MainWindow", "Min Area", None, QtGui.QApplication.UnicodeUTF8))
self.ContourMinAreaLabel.setText(QtGui.QApplication.translate("MainWindow", "Area", None, QtGui.QApplication.UnicodeUTF8))
self.label_11.setText(QtGui.QApplication.translate("MainWindow", "Deviation/Perimeter", None, QtGui.QApplication.UnicodeUTF8))
self.ContourDeviationRatioLabel.setText(QtGui.QApplication.translate("MainWindow", "Deviation Ratio", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("MainWindow", "Find 4 sided Polygon", None, QtGui.QApplication.UnicodeUTF8))
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())