-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdyn_plot_ui.py
293 lines (285 loc) · 16.6 KB
/
dyn_plot_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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\LC\Desktop\ArduinoPlot-master\ArduinoPlot\dyn_plot.ui'
#
# Created: Thu Apr 02 22:05:04 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(604, 602)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8("title1.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.groupBox_5 = QtGui.QGroupBox(self.centralwidget)
self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.groupBox_5)
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.label = QtGui.QLabel(self.groupBox_5)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.cbParity = QtGui.QComboBox(self.groupBox_5)
self.cbParity.setObjectName(_fromUtf8("cbParity"))
self.gridLayout.addWidget(self.cbParity, 0, 7, 1, 1)
self.label_3 = QtGui.QLabel(self.groupBox_5)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout.addWidget(self.label_3, 0, 4, 1, 1)
self.label_4 = QtGui.QLabel(self.groupBox_5)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.gridLayout.addWidget(self.label_4, 0, 6, 1, 1)
self.label_2 = QtGui.QLabel(self.groupBox_5)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout.addWidget(self.label_2, 0, 2, 1, 1)
self.cbBytesize = QtGui.QComboBox(self.groupBox_5)
self.cbBytesize.setObjectName(_fromUtf8("cbBytesize"))
self.gridLayout.addWidget(self.cbBytesize, 0, 5, 1, 1)
self.cbPort = QtGui.QComboBox(self.groupBox_5)
self.cbPort.setObjectName(_fromUtf8("cbPort"))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.cbPort.addItem(_fromUtf8(""))
self.gridLayout.addWidget(self.cbPort, 0, 1, 1, 1)
self.cbBaudrate = QtGui.QComboBox(self.groupBox_5)
self.cbBaudrate.setObjectName(_fromUtf8("cbBaudrate"))
self.gridLayout.addWidget(self.cbBaudrate, 0, 3, 1, 1)
self.btnDefault = QtGui.QPushButton(self.groupBox_5)
self.btnDefault.setObjectName(_fromUtf8("btnDefault"))
self.gridLayout.addWidget(self.btnDefault, 1, 7, 1, 1)
self.label_5 = QtGui.QLabel(self.groupBox_5)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1)
self.cbStopbits = QtGui.QComboBox(self.groupBox_5)
self.cbStopbits.setObjectName(_fromUtf8("cbStopbits"))
self.gridLayout.addWidget(self.cbStopbits, 1, 1, 1, 1)
self.label_6 = QtGui.QLabel(self.groupBox_5)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.gridLayout.addWidget(self.label_6, 1, 2, 1, 1)
self.spbTimeout = QtGui.QDoubleSpinBox(self.groupBox_5)
self.spbTimeout.setMaximum(9999.0)
self.spbTimeout.setSingleStep(0.01)
self.spbTimeout.setProperty("value", 0.1)
self.spbTimeout.setObjectName(_fromUtf8("spbTimeout"))
self.gridLayout.addWidget(self.spbTimeout, 1, 3, 1, 1)
self.horizontalLayout_3.addLayout(self.gridLayout)
self.verticalLayout.addWidget(self.groupBox_5)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.groupBox = QtGui.QGroupBox(self.centralwidget)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_3 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.rbXminAuto = QtGui.QRadioButton(self.groupBox)
self.rbXminAuto.setChecked(True)
self.rbXminAuto.setObjectName(_fromUtf8("rbXminAuto"))
self.verticalLayout_2.addWidget(self.rbXminAuto)
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.rbXminManu = QtGui.QRadioButton(self.groupBox)
self.rbXminManu.setObjectName(_fromUtf8("rbXminManu"))
self.horizontalLayout_4.addWidget(self.rbXminManu)
self.XminManu = QtGui.QDoubleSpinBox(self.groupBox)
self.XminManu.setEnabled(False)
self.XminManu.setObjectName(_fromUtf8("XminManu"))
self.horizontalLayout_4.addWidget(self.XminManu)
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
self.verticalLayout_3.addLayout(self.verticalLayout_2)
self.horizontalLayout_2.addWidget(self.groupBox)
self.groupBox_2 = QtGui.QGroupBox(self.centralwidget)
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
self.verticalLayout_5 = QtGui.QVBoxLayout(self.groupBox_2)
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.verticalLayout_4 = QtGui.QVBoxLayout()
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.rbXmaxAuto = QtGui.QRadioButton(self.groupBox_2)
self.rbXmaxAuto.setChecked(True)
self.rbXmaxAuto.setObjectName(_fromUtf8("rbXmaxAuto"))
self.verticalLayout_4.addWidget(self.rbXmaxAuto)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.rbXmaxManu = QtGui.QRadioButton(self.groupBox_2)
self.rbXmaxManu.setObjectName(_fromUtf8("rbXmaxManu"))
self.horizontalLayout_5.addWidget(self.rbXmaxManu)
self.XmaxManu = QtGui.QDoubleSpinBox(self.groupBox_2)
self.XmaxManu.setEnabled(False)
self.XmaxManu.setMaximum(9999.0)
self.XmaxManu.setSingleStep(0.01)
self.XmaxManu.setProperty("value", 50.0)
self.XmaxManu.setObjectName(_fromUtf8("XmaxManu"))
self.horizontalLayout_5.addWidget(self.XmaxManu)
self.verticalLayout_4.addLayout(self.horizontalLayout_5)
self.verticalLayout_5.addLayout(self.verticalLayout_4)
self.horizontalLayout_2.addWidget(self.groupBox_2)
self.groupBox_3 = QtGui.QGroupBox(self.centralwidget)
self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
self.verticalLayout_7 = QtGui.QVBoxLayout(self.groupBox_3)
self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7"))
self.verticalLayout_6 = QtGui.QVBoxLayout()
self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6"))
self.rbYminAuto = QtGui.QRadioButton(self.groupBox_3)
self.rbYminAuto.setChecked(True)
self.rbYminAuto.setObjectName(_fromUtf8("rbYminAuto"))
self.verticalLayout_6.addWidget(self.rbYminAuto)
self.horizontalLayout_6 = QtGui.QHBoxLayout()
self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
self.rbYminManu = QtGui.QRadioButton(self.groupBox_3)
self.rbYminManu.setObjectName(_fromUtf8("rbYminManu"))
self.horizontalLayout_6.addWidget(self.rbYminManu)
self.YminManu = QtGui.QDoubleSpinBox(self.groupBox_3)
self.YminManu.setEnabled(False)
self.YminManu.setMaximum(9999.0)
self.YminManu.setSingleStep(0.01)
self.YminManu.setObjectName(_fromUtf8("YminManu"))
self.horizontalLayout_6.addWidget(self.YminManu)
self.verticalLayout_6.addLayout(self.horizontalLayout_6)
self.verticalLayout_7.addLayout(self.verticalLayout_6)
self.horizontalLayout_2.addWidget(self.groupBox_3)
self.groupBox_4 = QtGui.QGroupBox(self.centralwidget)
self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
self.verticalLayout_9 = QtGui.QVBoxLayout(self.groupBox_4)
self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9"))
self.verticalLayout_8 = QtGui.QVBoxLayout()
self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
self.rbYmaxAuto = QtGui.QRadioButton(self.groupBox_4)
self.rbYmaxAuto.setChecked(True)
self.rbYmaxAuto.setObjectName(_fromUtf8("rbYmaxAuto"))
self.verticalLayout_8.addWidget(self.rbYmaxAuto)
self.horizontalLayout_7 = QtGui.QHBoxLayout()
self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
self.rbYmaxManu = QtGui.QRadioButton(self.groupBox_4)
self.rbYmaxManu.setObjectName(_fromUtf8("rbYmaxManu"))
self.horizontalLayout_7.addWidget(self.rbYmaxManu)
self.YmaxManu = QtGui.QDoubleSpinBox(self.groupBox_4)
self.YmaxManu.setEnabled(False)
self.YmaxManu.setMaximum(99999.0)
self.YmaxManu.setSingleStep(0.01)
self.YmaxManu.setProperty("value", 100.0)
self.YmaxManu.setObjectName(_fromUtf8("YmaxManu"))
self.horizontalLayout_7.addWidget(self.YmaxManu)
self.verticalLayout_8.addLayout(self.horizontalLayout_7)
self.verticalLayout_9.addLayout(self.verticalLayout_8)
self.horizontalLayout_2.addWidget(self.groupBox_4)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.btnPause = QtGui.QPushButton(self.centralwidget)
self.btnPause.setObjectName(_fromUtf8("btnPause"))
self.horizontalLayout.addWidget(self.btnPause)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.chbGrid = QtGui.QCheckBox(self.centralwidget)
self.chbGrid.setLayoutDirection(QtCore.Qt.RightToLeft)
self.chbGrid.setChecked(True)
self.chbGrid.setObjectName(_fromUtf8("chbGrid"))
self.horizontalLayout.addWidget(self.chbGrid)
self.chbXlabel = QtGui.QCheckBox(self.centralwidget)
self.chbXlabel.setLayoutDirection(QtCore.Qt.RightToLeft)
self.chbXlabel.setChecked(True)
self.chbXlabel.setObjectName(_fromUtf8("chbXlabel"))
self.horizontalLayout.addWidget(self.chbXlabel)
self.verticalLayout.addLayout(self.horizontalLayout)
self.graphFrame = QtGui.QFrame(self.centralwidget)
self.graphFrame.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.graphFrame.sizePolicy().hasHeightForWidth())
self.graphFrame.setSizePolicy(sizePolicy)
self.graphFrame.setFrameShape(QtGui.QFrame.StyledPanel)
self.graphFrame.setFrameShadow(QtGui.QFrame.Raised)
self.graphFrame.setObjectName(_fromUtf8("graphFrame"))
self.verticalLayout_11 = QtGui.QVBoxLayout(self.graphFrame)
self.verticalLayout_11.setObjectName(_fromUtf8("verticalLayout_11"))
self.graphLayout = QtGui.QVBoxLayout()
self.graphLayout.setObjectName(_fromUtf8("graphLayout"))
self.verticalLayout_11.addLayout(self.graphLayout)
self.verticalLayout.addWidget(self.graphFrame)
MainWindow.setCentralWidget(self.centralwidget)
self.actionSavePNG = QtGui.QAction(MainWindow)
self.actionSavePNG.setObjectName(_fromUtf8("actionSavePNG"))
self.actionExit = QtGui.QAction(MainWindow)
self.actionExit.setObjectName(_fromUtf8("actionExit"))
self.retranslateUi(MainWindow)
self.cbBytesize.setCurrentIndex(-1)
self.cbBaudrate.setCurrentIndex(-1)
self.cbStopbits.setCurrentIndex(-1)
QtCore.QObject.connect(self.rbXminManu, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.XminManu.setEnabled)
QtCore.QObject.connect(self.rbXmaxManu, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.XmaxManu.setEnabled)
QtCore.QObject.connect(self.rbYminManu, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.YminManu.setEnabled)
QtCore.QObject.connect(self.rbYmaxManu, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.YmaxManu.setEnabled)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "Arduino COMReader", None))
self.groupBox_5.setTitle(_translate("MainWindow", "端口设置", None))
self.label.setText(_translate("MainWindow", "端口号:", None))
self.label_3.setText(_translate("MainWindow", "数据位:", None))
self.label_4.setText(_translate("MainWindow", "校验:", None))
self.label_2.setText(_translate("MainWindow", "波特率:", None))
self.cbPort.setItemText(0, _translate("MainWindow", "COM1", None))
self.cbPort.setItemText(1, _translate("MainWindow", "COM2", None))
self.cbPort.setItemText(2, _translate("MainWindow", "COM3", None))
self.cbPort.setItemText(3, _translate("MainWindow", "COM4", None))
self.cbPort.setItemText(4, _translate("MainWindow", "COM5", None))
self.cbPort.setItemText(5, _translate("MainWindow", "COM6", None))
self.cbPort.setItemText(6, _translate("MainWindow", "COM7", None))
self.cbPort.setItemText(7, _translate("MainWindow", "COM8", None))
self.cbPort.setItemText(8, _translate("MainWindow", "COM9", None))
self.cbPort.setItemText(9, _translate("MainWindow", "COM10", None))
self.cbPort.setItemText(10, _translate("MainWindow", "COM11", None))
self.cbPort.setItemText(11, _translate("MainWindow", "COM12", None))
self.cbPort.setItemText(12, _translate("MainWindow", "COM13", None))
self.cbPort.setItemText(13, _translate("MainWindow", "COM14", None))
self.btnDefault.setText(_translate("MainWindow", "还原默认设置", None))
self.label_5.setText(_translate("MainWindow", "停止位:", None))
self.label_6.setText(_translate("MainWindow", "超时:", None))
self.groupBox.setTitle(_translate("MainWindow", "X min", None))
self.rbXminAuto.setText(_translate("MainWindow", "自动", None))
self.rbXminManu.setText(_translate("MainWindow", "手动", None))
self.groupBox_2.setTitle(_translate("MainWindow", "X max", None))
self.rbXmaxAuto.setText(_translate("MainWindow", "自动", None))
self.rbXmaxManu.setText(_translate("MainWindow", "手动", None))
self.groupBox_3.setTitle(_translate("MainWindow", "Y min", None))
self.rbYminAuto.setText(_translate("MainWindow", "自动", None))
self.rbYminManu.setText(_translate("MainWindow", "手动", None))
self.groupBox_4.setTitle(_translate("MainWindow", "Y max", None))
self.rbYmaxAuto.setText(_translate("MainWindow", "自动", None))
self.rbYmaxManu.setText(_translate("MainWindow", "手动", None))
self.btnPause.setText(_translate("MainWindow", "暂停", None))
self.chbGrid.setText(_translate("MainWindow", "显示网格", None))
self.chbXlabel.setText(_translate("MainWindow", "显示x坐标", None))
self.actionSavePNG.setText(_translate("MainWindow", "保存为PNG", None))
self.actionExit.setText(_translate("MainWindow", "Exit", None))
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q", None))