-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSignCreator_ui.py
328 lines (321 loc) · 18.1 KB
/
SignCreator_ui.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
325
326
327
328
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/SignCreator.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(540, 360)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setMinimumSize(QtCore.QSize(540, 360))
MainWindow.setMaximumSize(QtCore.QSize(540, 360))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("ui\\resources/stop.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(300, 150, 61, 16))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(300, 180, 51, 20))
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(self.centralwidget)
self.label_3.setGeometry(QtCore.QRect(300, 210, 51, 16))
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(self.centralwidget)
self.label_4.setGeometry(QtCore.QRect(300, 240, 51, 21))
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(self.centralwidget)
self.label_5.setGeometry(QtCore.QRect(300, 270, 61, 21))
self.label_5.setObjectName("label_5")
self.label_6 = QtWidgets.QLabel(self.centralwidget)
self.label_6.setGeometry(QtCore.QRect(370, 100, 71, 21))
self.label_6.setAlignment(QtCore.Qt.AlignCenter)
self.label_6.setObjectName("label_6")
self.label_7 = QtWidgets.QLabel(self.centralwidget)
self.label_7.setGeometry(QtCore.QRect(456, 100, 61, 20))
self.label_7.setAlignment(QtCore.Qt.AlignCenter)
self.label_7.setObjectName("label_7")
self.lineEdit_name = QtWidgets.QLineEdit(self.centralwidget)
self.lineEdit_name.setGeometry(QtCore.QRect(110, 270, 161, 20))
self.lineEdit_name.setObjectName("lineEdit_name")
self.label_8 = QtWidgets.QLabel(self.centralwidget)
self.label_8.setGeometry(QtCore.QRect(20, 260, 81, 41))
self.label_8.setObjectName("label_8")
self.comboBox_class = QtWidgets.QComboBox(self.centralwidget)
self.comboBox_class.setGeometry(QtCore.QRect(370, 40, 151, 21))
self.comboBox_class.setObjectName("comboBox_class")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_class.addItem("")
self.comboBox_shape = QtWidgets.QComboBox(self.centralwidget)
self.comboBox_shape.setGeometry(QtCore.QRect(370, 70, 151, 21))
self.comboBox_shape.setObjectName("comboBox_shape")
self.comboBox_shape.addItem("")
self.comboBox_shape.addItem("")
self.comboBox_shape.addItem("")
self.comboBox_shape.addItem("")
self.comboBox_shape.addItem("")
self.comboBox_shape.addItem("")
self.comboBox_shape.addItem("")
self.label_9 = QtWidgets.QLabel(self.centralwidget)
self.label_9.setGeometry(QtCore.QRect(300, 40, 61, 21))
self.label_9.setObjectName("label_9")
self.label_10 = QtWidgets.QLabel(self.centralwidget)
self.label_10.setGeometry(QtCore.QRect(300, 70, 61, 21))
self.label_10.setObjectName("label_10")
self.doubleSpinBox_XS_w = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_XS_w.setGeometry(QtCore.QRect(370, 150, 71, 22))
self.doubleSpinBox_XS_w.setDecimals(4)
self.doubleSpinBox_XS_w.setMaximum(9.99)
self.doubleSpinBox_XS_w.setSingleStep(0.01)
self.doubleSpinBox_XS_w.setStepType(QtWidgets.QAbstractSpinBox.DefaultStepType)
self.doubleSpinBox_XS_w.setProperty("value", 0.4572)
self.doubleSpinBox_XS_w.setObjectName("doubleSpinBox_XS_w")
self.doubleSpinBox_XS_h = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_XS_h.setGeometry(QtCore.QRect(450, 150, 71, 22))
self.doubleSpinBox_XS_h.setDecimals(4)
self.doubleSpinBox_XS_h.setMaximum(9.99)
self.doubleSpinBox_XS_h.setSingleStep(0.01)
self.doubleSpinBox_XS_h.setProperty("value", 0.4572)
self.doubleSpinBox_XS_h.setObjectName("doubleSpinBox_XS_h")
self.doubleSpinBox_S_w = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_S_w.setGeometry(QtCore.QRect(370, 180, 71, 22))
self.doubleSpinBox_S_w.setDecimals(4)
self.doubleSpinBox_S_w.setMaximum(9.99)
self.doubleSpinBox_S_w.setSingleStep(0.01)
self.doubleSpinBox_S_w.setProperty("value", 0.6096)
self.doubleSpinBox_S_w.setObjectName("doubleSpinBox_S_w")
self.doubleSpinBox_S_h = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_S_h.setGeometry(QtCore.QRect(451, 180, 71, 22))
self.doubleSpinBox_S_h.setDecimals(4)
self.doubleSpinBox_S_h.setMaximum(9.99)
self.doubleSpinBox_S_h.setSingleStep(0.01)
self.doubleSpinBox_S_h.setProperty("value", 0.6096)
self.doubleSpinBox_S_h.setObjectName("doubleSpinBox_S_h")
self.doubleSpinBox_M_w = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_M_w.setGeometry(QtCore.QRect(370, 210, 71, 22))
self.doubleSpinBox_M_w.setDecimals(4)
self.doubleSpinBox_M_w.setMaximum(9.99)
self.doubleSpinBox_M_w.setSingleStep(0.01)
self.doubleSpinBox_M_w.setProperty("value", 0.762)
self.doubleSpinBox_M_w.setObjectName("doubleSpinBox_M_w")
self.doubleSpinBox_M_h = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_M_h.setGeometry(QtCore.QRect(451, 210, 71, 22))
self.doubleSpinBox_M_h.setDecimals(4)
self.doubleSpinBox_M_h.setMaximum(9.99)
self.doubleSpinBox_M_h.setSingleStep(0.01)
self.doubleSpinBox_M_h.setProperty("value", 0.762)
self.doubleSpinBox_M_h.setObjectName("doubleSpinBox_M_h")
self.doubleSpinBox_L_w = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_L_w.setGeometry(QtCore.QRect(370, 240, 71, 22))
self.doubleSpinBox_L_w.setDecimals(4)
self.doubleSpinBox_L_w.setMaximum(9.99)
self.doubleSpinBox_L_w.setSingleStep(0.01)
self.doubleSpinBox_L_w.setProperty("value", 0.9144)
self.doubleSpinBox_L_w.setObjectName("doubleSpinBox_L_w")
self.doubleSpinBox_L_h = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_L_h.setGeometry(QtCore.QRect(451, 240, 71, 22))
self.doubleSpinBox_L_h.setDecimals(4)
self.doubleSpinBox_L_h.setMaximum(9.99)
self.doubleSpinBox_L_h.setSingleStep(0.01)
self.doubleSpinBox_L_h.setProperty("value", 0.9144)
self.doubleSpinBox_L_h.setObjectName("doubleSpinBox_L_h")
self.doubleSpinBox_XL_w = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_XL_w.setGeometry(QtCore.QRect(370, 270, 71, 22))
self.doubleSpinBox_XL_w.setDecimals(4)
self.doubleSpinBox_XL_w.setMaximum(9.99)
self.doubleSpinBox_XL_w.setSingleStep(0.01)
self.doubleSpinBox_XL_w.setProperty("value", 1.2192)
self.doubleSpinBox_XL_w.setObjectName("doubleSpinBox_XL_w")
self.doubleSpinBox_XL_h = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox_XL_h.setGeometry(QtCore.QRect(451, 270, 71, 22))
self.doubleSpinBox_XL_h.setDecimals(4)
self.doubleSpinBox_XL_h.setMaximum(9.99)
self.doubleSpinBox_XL_h.setSingleStep(0.01)
self.doubleSpinBox_XL_h.setProperty("value", 1.2192)
self.doubleSpinBox_XL_h.setObjectName("doubleSpinBox_XL_h")
self.label_12 = QtWidgets.QLabel(self.centralwidget)
self.label_12.setGeometry(QtCore.QRect(280, 120, 91, 20))
self.label_12.setObjectName("label_12")
self.lineEdit_pix_w = QtWidgets.QLineEdit(self.centralwidget)
self.lineEdit_pix_w.setGeometry(QtCore.QRect(370, 120, 71, 20))
self.lineEdit_pix_w.setAlignment(QtCore.Qt.AlignCenter)
self.lineEdit_pix_w.setReadOnly(True)
self.lineEdit_pix_w.setObjectName("lineEdit_pix_w")
self.lineEdit_pix_h = QtWidgets.QLineEdit(self.centralwidget)
self.lineEdit_pix_h.setGeometry(QtCore.QRect(450, 120, 71, 20))
self.lineEdit_pix_h.setAlignment(QtCore.Qt.AlignCenter)
self.lineEdit_pix_h.setReadOnly(True)
self.lineEdit_pix_h.setObjectName("lineEdit_pix_h")
self.label_image = QtWidgets.QLabel(self.centralwidget)
self.label_image.setGeometry(QtCore.QRect(20, 10, 251, 251))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_image.sizePolicy().hasHeightForWidth())
self.label_image.setSizePolicy(sizePolicy)
self.label_image.setMinimumSize(QtCore.QSize(251, 251))
self.label_image.setMaximumSize(QtCore.QSize(251, 251))
self.label_image.setText("")
self.label_image.setPixmap(QtGui.QPixmap("ui\\resources/stop.png"))
self.label_image.setScaledContents(True)
self.label_image.setAlignment(QtCore.Qt.AlignCenter)
self.label_image.setObjectName("label_image")
self.label_11 = QtWidgets.QLabel(self.centralwidget)
self.label_11.setGeometry(QtCore.QRect(300, 10, 71, 21))
self.label_11.setObjectName("label_11")
self.comboBox_country = QtWidgets.QComboBox(self.centralwidget)
self.comboBox_country.setGeometry(QtCore.QRect(370, 10, 151, 21))
self.comboBox_country.setObjectName("comboBox_country")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.comboBox_country.addItem("")
self.checkBox = QtWidgets.QCheckBox(self.centralwidget)
self.checkBox.setGeometry(QtCore.QRect(300, 90, 61, 31))
self.checkBox.setLayoutDirection(QtCore.Qt.LeftToRight)
self.checkBox.setText("")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap("ui\\resources/Scale_Chain_Gimp.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.checkBox.setIcon(icon1)
self.checkBox.setIconSize(QtCore.QSize(20, 20))
self.checkBox.setChecked(True)
self.checkBox.setTristate(False)
self.checkBox.setObjectName("checkBox")
self.label_image.raise_()
self.label.raise_()
self.label_2.raise_()
self.label_3.raise_()
self.label_4.raise_()
self.label_5.raise_()
self.label_6.raise_()
self.label_7.raise_()
self.lineEdit_name.raise_()
self.label_8.raise_()
self.comboBox_class.raise_()
self.comboBox_shape.raise_()
self.label_9.raise_()
self.label_10.raise_()
self.doubleSpinBox_XS_w.raise_()
self.doubleSpinBox_XS_h.raise_()
self.doubleSpinBox_S_w.raise_()
self.doubleSpinBox_S_h.raise_()
self.doubleSpinBox_M_w.raise_()
self.doubleSpinBox_M_h.raise_()
self.doubleSpinBox_L_w.raise_()
self.doubleSpinBox_L_h.raise_()
self.doubleSpinBox_XL_w.raise_()
self.doubleSpinBox_XL_h.raise_()
self.label_12.raise_()
self.lineEdit_pix_w.raise_()
self.lineEdit_pix_h.raise_()
self.label_11.raise_()
self.comboBox_country.raise_()
self.checkBox.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 540, 22))
self.menubar.setObjectName("menubar")
self.menuUpload_image = QtWidgets.QMenu(self.menubar)
self.menuUpload_image.setObjectName("menuUpload_image")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.action_Image = QtWidgets.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap("ui\\resources/image.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Image.setIcon(icon2)
self.action_Image.setObjectName("action_Image")
self.action_Save = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap("ui\\resources/save2-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Save.setIcon(icon3)
self.action_Save.setObjectName("action_Save")
self.action_Open = QtWidgets.QAction(MainWindow)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap("ui\\resources/open_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Open.setIcon(icon4)
self.action_Open.setObjectName("action_Open")
self.menuUpload_image.addAction(self.action_Image)
self.menuUpload_image.addAction(self.action_Save)
self.menuUpload_image.addAction(self.action_Open)
self.menubar.addAction(self.menuUpload_image.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", " Sign Creator"))
self.label.setText(_translate("MainWindow", "Size XS:"))
self.label_2.setText(_translate("MainWindow", "Size S:"))
self.label_3.setText(_translate("MainWindow", "Size M:"))
self.label_4.setText(_translate("MainWindow", "Size L:"))
self.label_5.setText(_translate("MainWindow", "Size XL:"))
self.label_6.setText(_translate("MainWindow", "Width"))
self.label_7.setText(_translate("MainWindow", "Height"))
self.label_8.setText(_translate("MainWindow", "Sign Name:"))
self.comboBox_class.setItemText(0, _translate("MainWindow", "My"))
self.comboBox_class.setItemText(1, _translate("MainWindow", "Supplement"))
self.comboBox_class.setItemText(2, _translate("MainWindow", "Advisory"))
self.comboBox_class.setItemText(3, _translate("MainWindow", "Guide"))
self.comboBox_class.setItemText(4, _translate("MainWindow", "Indication"))
self.comboBox_class.setItemText(5, _translate("MainWindow", "Miscellaneous"))
self.comboBox_class.setItemText(6, _translate("MainWindow", "Other"))
self.comboBox_class.setItemText(7, _translate("MainWindow", "Regulatory"))
self.comboBox_class.setItemText(8, _translate("MainWindow", "School"))
self.comboBox_class.setItemText(9, _translate("MainWindow", "Temporary Control Warning"))
self.comboBox_class.setItemText(10, _translate("MainWindow", "Warning"))
self.comboBox_shape.setCurrentText(_translate("MainWindow", "Circular"))
self.comboBox_shape.setItemText(0, _translate("MainWindow", "Circular"))
self.comboBox_shape.setItemText(1, _translate("MainWindow", "Octagonal"))
self.comboBox_shape.setItemText(2, _translate("MainWindow", "Rectangular"))
self.comboBox_shape.setItemText(3, _translate("MainWindow", "Square"))
self.comboBox_shape.setItemText(4, _translate("MainWindow", "Square45"))
self.comboBox_shape.setItemText(5, _translate("MainWindow", "TriangularDown"))
self.comboBox_shape.setItemText(6, _translate("MainWindow", "TriangularUp"))
self.label_9.setText(_translate("MainWindow", "Class"))
self.label_10.setText(_translate("MainWindow", "Shape"))
self.label_12.setText(_translate("MainWindow", "Image Size:"))
self.lineEdit_pix_w.setText(_translate("MainWindow", "1000px"))
self.lineEdit_pix_h.setText(_translate("MainWindow", "1000px"))
self.label_11.setText(_translate("MainWindow", "Country"))
self.comboBox_country.setItemText(0, _translate("MainWindow", "DEU"))
self.comboBox_country.setItemText(1, _translate("MainWindow", "USA"))
self.comboBox_country.setItemText(2, _translate("MainWindow", "AUT"))
self.comboBox_country.setItemText(3, _translate("MainWindow", "CHN"))
self.comboBox_country.setItemText(4, _translate("MainWindow", "FRA"))
self.comboBox_country.setItemText(5, _translate("MainWindow", "GBR"))
self.comboBox_country.setItemText(6, _translate("MainWindow", "JPN"))
self.comboBox_country.setItemText(7, _translate("MainWindow", "KOR"))
self.menuUpload_image.setTitle(_translate("MainWindow", "Menu"))
self.action_Image.setText(_translate("MainWindow", "&Upload image"))
self.action_Image.setToolTip(_translate("MainWindow", "Open the image file"))
self.action_Image.setShortcut(_translate("MainWindow", "Ctrl+I"))
self.action_Save.setText(_translate("MainWindow", "&Save sign"))
self.action_Save.setToolTip(_translate("MainWindow", "Save the traffic sign file"))
self.action_Save.setShortcut(_translate("MainWindow", "Ctrl+S"))
self.action_Open.setText(_translate("MainWindow", "Open file"))
self.action_Open.setToolTip(_translate("MainWindow", "Open the traffic sign file to edit"))
self.action_Open.setShortcut(_translate("MainWindow", "Ctrl+O"))