-
Notifications
You must be signed in to change notification settings - Fork 4
/
ui.py
323 lines (317 loc) · 17.6 KB
/
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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'window.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# 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(1272, 911)
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(10)
MainWindow.setFont(font)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("ico.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setWindowOpacity(3.0)
MainWindow.setIconSize(QtCore.QSize(100, 100))
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.verticalLayout_13 = QtWidgets.QVBoxLayout()
self.verticalLayout_13.setObjectName("verticalLayout_13")
self.verticalLayout.addLayout(self.verticalLayout_13)
self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox.setObjectName("groupBox")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox)
self.horizontalLayout.setObjectName("horizontalLayout")
self.groupBox_2 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_2.setObjectName("groupBox_2")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.radioButton = QtWidgets.QRadioButton(self.groupBox_2)
self.radioButton.setCheckable(True)
self.radioButton.setChecked(True)
self.radioButton.setAutoRepeat(False)
self.radioButton.setObjectName("radioButton")
self.verticalLayout_2.addWidget(self.radioButton)
self.radioButton_2 = QtWidgets.QRadioButton(self.groupBox_2)
self.radioButton_2.setObjectName("radioButton_2")
self.verticalLayout_2.addWidget(self.radioButton_2)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.horizontalLayout.addWidget(self.groupBox_2)
self.groupBox_8 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_8.setObjectName("groupBox_8")
self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.groupBox_8)
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
self.horizontalLayout_9.setObjectName("horizontalLayout_9")
self.pushButton = QtWidgets.QPushButton(self.groupBox_8)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout_9.addWidget(self.pushButton)
self.verticalLayout_8.addLayout(self.horizontalLayout_9)
self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
self.horizontalLayout_10.setObjectName("horizontalLayout_10")
self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_8)
self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout_10.addWidget(self.pushButton_2)
self.verticalLayout_8.addLayout(self.horizontalLayout_10)
self.horizontalLayout.addWidget(self.groupBox_8)
self.groupBox_7 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_7.setObjectName("groupBox_7")
self.verticalLayout_14 = QtWidgets.QVBoxLayout(self.groupBox_7)
self.verticalLayout_14.setContentsMargins(11, 11, 11, -1)
self.verticalLayout_14.setObjectName("verticalLayout_14")
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.label = QtWidgets.QLabel(self.groupBox_7)
self.label.setObjectName("label")
self.horizontalLayout_6.addWidget(self.label)
self.lineEdit = QtWidgets.QLineEdit(self.groupBox_7)
self.lineEdit.setInputMask("")
self.lineEdit.setFrame(False)
self.lineEdit.setCursorPosition(2)
self.lineEdit.setDragEnabled(False)
self.lineEdit.setPlaceholderText("")
self.lineEdit.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle)
self.lineEdit.setObjectName("lineEdit")
self.horizontalLayout_6.addWidget(self.lineEdit)
self.verticalLayout_14.addLayout(self.horizontalLayout_6)
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.label_4 = QtWidgets.QLabel(self.groupBox_7)
self.label_4.setObjectName("label_4")
self.horizontalLayout_7.addWidget(self.label_4)
self.label_10 = QtWidgets.QLabel(self.groupBox_7)
self.label_10.setObjectName("label_10")
self.horizontalLayout_7.addWidget(self.label_10)
self.horizontalSlider = QtWidgets.QSlider(self.groupBox_7)
self.horizontalSlider.setMaximum(10)
self.horizontalSlider.setPageStep(5)
self.horizontalSlider.setProperty("value", 2)
self.horizontalSlider.setSliderPosition(2)
self.horizontalSlider.setTracking(True)
self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider.setInvertedControls(False)
self.horizontalSlider.setTickPosition(QtWidgets.QSlider.TicksAbove)
self.horizontalSlider.setTickInterval(1)
self.horizontalSlider.setObjectName("horizontalSlider")
self.horizontalLayout_7.addWidget(self.horizontalSlider)
self.horizontalLayout_7.setStretch(0, 1)
self.horizontalLayout_7.setStretch(1, 1)
self.horizontalLayout_7.setStretch(2, 5)
self.verticalLayout_14.addLayout(self.horizontalLayout_7)
self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
self.checkBox = QtWidgets.QCheckBox(self.groupBox_7)
self.checkBox.setChecked(True)
self.checkBox.setObjectName("checkBox")
self.horizontalLayout_8.addWidget(self.checkBox)
self.checkBox_2 = QtWidgets.QCheckBox(self.groupBox_7)
self.checkBox_2.setChecked(True)
self.checkBox_2.setObjectName("checkBox_2")
self.horizontalLayout_8.addWidget(self.checkBox_2)
self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox_7)
self.checkBox_3.setObjectName("checkBox_3")
self.horizontalLayout_8.addWidget(self.checkBox_3)
self.verticalLayout_14.addLayout(self.horizontalLayout_8)
self.verticalLayout_14.setStretch(0, 1)
self.verticalLayout_14.setStretch(1, 1)
self.horizontalLayout.addWidget(self.groupBox_7)
self.groupBox_3 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_3.setObjectName("groupBox_3")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox_3)
self.horizontalLayout_2.setContentsMargins(20, -1, 20, -1)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.verticalLayout_5 = QtWidgets.QVBoxLayout()
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.label_2 = QtWidgets.QLabel(self.groupBox_3)
self.label_2.setObjectName("label_2")
self.verticalLayout_5.addWidget(self.label_2)
self.label_3 = QtWidgets.QLabel(self.groupBox_3)
self.label_3.setObjectName("label_3")
self.verticalLayout_5.addWidget(self.label_3)
self.horizontalLayout_2.addLayout(self.verticalLayout_5)
self.verticalLayout_6 = QtWidgets.QVBoxLayout()
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.doubleSpinBox_1 = QtWidgets.QDoubleSpinBox(self.groupBox_3)
self.doubleSpinBox_1.setDecimals(2)
self.doubleSpinBox_1.setMinimum(-999.0)
self.doubleSpinBox_1.setMaximum(999.99)
self.doubleSpinBox_1.setObjectName("doubleSpinBox_1")
self.verticalLayout_6.addWidget(self.doubleSpinBox_1)
self.doubleSpinBox_2 = QtWidgets.QDoubleSpinBox(self.groupBox_3)
self.doubleSpinBox_2.setDecimals(2)
self.doubleSpinBox_2.setMinimum(-999.0)
self.doubleSpinBox_2.setMaximum(999.99)
self.doubleSpinBox_2.setObjectName("doubleSpinBox_2")
self.verticalLayout_6.addWidget(self.doubleSpinBox_2)
self.horizontalLayout_2.addLayout(self.verticalLayout_6)
self.horizontalLayout_2.setStretch(0, 1)
self.horizontalLayout_2.setStretch(1, 4)
self.horizontalLayout.addWidget(self.groupBox_3)
self.groupBox_4 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_4.setObjectName("groupBox_4")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.groupBox_4)
self.horizontalLayout_4.setContentsMargins(20, -1, 20, -1)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.verticalLayout_7 = QtWidgets.QVBoxLayout()
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.label_5 = QtWidgets.QLabel(self.groupBox_4)
self.label_5.setObjectName("label_5")
self.verticalLayout_7.addWidget(self.label_5)
self.label_6 = QtWidgets.QLabel(self.groupBox_4)
self.label_6.setObjectName("label_6")
self.verticalLayout_7.addWidget(self.label_6)
self.horizontalLayout_4.addLayout(self.verticalLayout_7)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.doubleSpinBox_3 = QtWidgets.QDoubleSpinBox(self.groupBox_4)
self.doubleSpinBox_3.setDecimals(2)
self.doubleSpinBox_3.setMinimum(-999.0)
self.doubleSpinBox_3.setMaximum(999.99)
self.doubleSpinBox_3.setObjectName("doubleSpinBox_3")
self.verticalLayout_3.addWidget(self.doubleSpinBox_3)
self.doubleSpinBox_4 = QtWidgets.QDoubleSpinBox(self.groupBox_4)
self.doubleSpinBox_4.setDecimals(2)
self.doubleSpinBox_4.setMinimum(-999.0)
self.doubleSpinBox_4.setMaximum(999.99)
self.doubleSpinBox_4.setObjectName("doubleSpinBox_4")
self.verticalLayout_3.addWidget(self.doubleSpinBox_4)
self.horizontalLayout_4.addLayout(self.verticalLayout_3)
self.horizontalLayout_4.setStretch(0, 1)
self.horizontalLayout_4.setStretch(1, 4)
self.horizontalLayout.addWidget(self.groupBox_4)
self.groupBox_5 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_5.setObjectName("groupBox_5")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox_5)
self.horizontalLayout_3.setContentsMargins(20, -1, 20, -1)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.verticalLayout_9 = QtWidgets.QVBoxLayout()
self.verticalLayout_9.setObjectName("verticalLayout_9")
self.label_8 = QtWidgets.QLabel(self.groupBox_5)
self.label_8.setObjectName("label_8")
self.verticalLayout_9.addWidget(self.label_8)
self.label_9 = QtWidgets.QLabel(self.groupBox_5)
self.label_9.setObjectName("label_9")
self.verticalLayout_9.addWidget(self.label_9)
self.horizontalLayout_3.addLayout(self.verticalLayout_9)
self.verticalLayout_10 = QtWidgets.QVBoxLayout()
self.verticalLayout_10.setObjectName("verticalLayout_10")
self.doubleSpinBox_5 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
self.doubleSpinBox_5.setDecimals(2)
self.doubleSpinBox_5.setMinimum(-999.0)
self.doubleSpinBox_5.setMaximum(999.99)
self.doubleSpinBox_5.setObjectName("doubleSpinBox_5")
self.verticalLayout_10.addWidget(self.doubleSpinBox_5)
self.doubleSpinBox_6 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
self.doubleSpinBox_6.setDecimals(2)
self.doubleSpinBox_6.setMinimum(-999.0)
self.doubleSpinBox_6.setMaximum(999.99)
self.doubleSpinBox_6.setObjectName("doubleSpinBox_6")
self.verticalLayout_10.addWidget(self.doubleSpinBox_6)
self.horizontalLayout_3.addLayout(self.verticalLayout_10)
self.horizontalLayout_3.setStretch(0, 1)
self.horizontalLayout_3.setStretch(1, 4)
self.horizontalLayout.addWidget(self.groupBox_5)
self.groupBox_6 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_6.setObjectName("groupBox_6")
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.groupBox_6)
self.horizontalLayout_5.setContentsMargins(20, -1, 20, -1)
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.verticalLayout_12 = QtWidgets.QVBoxLayout()
self.verticalLayout_12.setObjectName("verticalLayout_12")
self.label_11 = QtWidgets.QLabel(self.groupBox_6)
self.label_11.setObjectName("label_11")
self.verticalLayout_12.addWidget(self.label_11)
self.label_12 = QtWidgets.QLabel(self.groupBox_6)
self.label_12.setObjectName("label_12")
self.verticalLayout_12.addWidget(self.label_12)
self.horizontalLayout_5.addLayout(self.verticalLayout_12)
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.doubleSpinBox_7 = QtWidgets.QDoubleSpinBox(self.groupBox_6)
self.doubleSpinBox_7.setDecimals(2)
self.doubleSpinBox_7.setMinimum(-999.0)
self.doubleSpinBox_7.setMaximum(999.99)
self.doubleSpinBox_7.setObjectName("doubleSpinBox_7")
self.verticalLayout_4.addWidget(self.doubleSpinBox_7)
self.doubleSpinBox_8 = QtWidgets.QDoubleSpinBox(self.groupBox_6)
self.doubleSpinBox_8.setDecimals(2)
self.doubleSpinBox_8.setMinimum(-999.0)
self.doubleSpinBox_8.setMaximum(999.99)
self.doubleSpinBox_8.setObjectName("doubleSpinBox_8")
self.verticalLayout_4.addWidget(self.doubleSpinBox_8)
self.horizontalLayout_5.addLayout(self.verticalLayout_4)
self.horizontalLayout_5.setStretch(0, 1)
self.horizontalLayout_5.setStretch(1, 4)
self.horizontalLayout.addWidget(self.groupBox_6)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 1)
self.horizontalLayout.setStretch(2, 2)
self.horizontalLayout.setStretch(3, 2)
self.horizontalLayout.setStretch(4, 2)
self.horizontalLayout.setStretch(5, 2)
self.horizontalLayout.setStretch(6, 2)
self.verticalLayout.addWidget(self.groupBox)
self.verticalLayout.setStretch(0, 4)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1272, 26))
self.menubar.setObjectName("menubar")
self.menuabout = QtWidgets.QMenu(self.menubar)
self.menuabout.setObjectName("menuabout")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.action = QtWidgets.QAction(MainWindow)
self.action.setObjectName("action")
self.menuabout.addAction(self.action)
self.menubar.addAction(self.menuabout.menuAction())
self.retranslateUi(MainWindow)
self.horizontalSlider.valueChanged['int'].connect(self.label_10.setNum)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.radioButton, self.radioButton_2)
MainWindow.setTabOrder(self.radioButton_2, self.doubleSpinBox_2)
MainWindow.setTabOrder(self.doubleSpinBox_2, self.doubleSpinBox_4)
MainWindow.setTabOrder(self.doubleSpinBox_4, self.doubleSpinBox_5)
MainWindow.setTabOrder(self.doubleSpinBox_5, self.doubleSpinBox_6)
MainWindow.setTabOrder(self.doubleSpinBox_6, self.doubleSpinBox_8)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Curves Displayer"))
self.groupBox.setTitle(_translate("MainWindow", "Control Panel"))
self.groupBox_2.setTitle(_translate("MainWindow", "Curves"))
self.radioButton.setText(_translate("MainWindow", "Bezier"))
self.radioButton_2.setText(_translate("MainWindow", "B-Spline"))
self.groupBox_8.setTitle(_translate("MainWindow", "Operate"))
self.pushButton.setText(_translate("MainWindow", "Reset"))
self.pushButton_2.setText(_translate("MainWindow", "Fix"))
self.groupBox_7.setTitle(_translate("MainWindow", "Style"))
self.label.setText(_translate("MainWindow", "Mark:"))
self.lineEdit.setText(_translate("MainWindow", "k-"))
self.label_4.setText(_translate("MainWindow", "Size: "))
self.label_10.setText(_translate("MainWindow", "2"))
self.checkBox.setText(_translate("MainWindow", "Guide Line"))
self.checkBox_2.setText(_translate("MainWindow", "Points"))
self.checkBox_3.setText(_translate("MainWindow", "Grid"))
self.groupBox_3.setTitle(_translate("MainWindow", "Blue Point"))
self.label_2.setText(_translate("MainWindow", "X:"))
self.label_3.setText(_translate("MainWindow", "Y:"))
self.groupBox_4.setTitle(_translate("MainWindow", "Red Point"))
self.label_5.setText(_translate("MainWindow", "X:"))
self.label_6.setText(_translate("MainWindow", "Y:"))
self.groupBox_5.setTitle(_translate("MainWindow", "Green Point"))
self.label_8.setText(_translate("MainWindow", "X:"))
self.label_9.setText(_translate("MainWindow", "Y:"))
self.groupBox_6.setTitle(_translate("MainWindow", "Yellow Point"))
self.label_11.setText(_translate("MainWindow", "X:"))
self.label_12.setText(_translate("MainWindow", "Y:"))
self.menuabout.setTitle(_translate("MainWindow", "about"))
self.action.setText(_translate("MainWindow", "author information"))