-
Notifications
You must be signed in to change notification settings - Fork 0
/
PortSetup_child_UI.py
193 lines (187 loc) · 11.1 KB
/
PortSetup_child_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
# Form implementation generated from reading ui file 'C:/Users/Xueyong Lu/AppData/Local/Temp/PortSetup_childwOHESv.ui'
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
class Ui_Dialog_PortSetup(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(313, 366)
Dialog.setStyleSheet("")
self.gridLayout_5 = QtWidgets.QGridLayout(Dialog)
self.gridLayout_5.setObjectName("gridLayout_5")
self.gridLayout_4 = QtWidgets.QGridLayout()
self.gridLayout_4.setObjectName("gridLayout_4")
self.frame_3 = QtWidgets.QFrame(parent=Dialog)
self.frame_3.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
self.frame_3.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
self.frame_3.setObjectName("frame_3")
self.gridLayout_3 = QtWidgets.QGridLayout(self.frame_3)
self.gridLayout_3.setContentsMargins(0, 0, 0, 0)
self.gridLayout_3.setObjectName("gridLayout_3")
self.groupBox = QtWidgets.QGroupBox(parent=self.frame_3)
self.groupBox.setObjectName("groupBox")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox)
self.horizontalLayout.setContentsMargins(-1, 5, -1, -1)
self.horizontalLayout.setObjectName("horizontalLayout")
self.frame = QtWidgets.QFrame(parent=self.groupBox)
self.frame.setMinimumSize(QtCore.QSize(100, 0))
self.frame.setMaximumSize(QtCore.QSize(200, 16777215))
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
self.frame.setObjectName("frame")
self.gridLayout_2 = QtWidgets.QGridLayout(self.frame)
self.gridLayout_2.setContentsMargins(-1, 11, -1, -1)
self.gridLayout_2.setVerticalSpacing(15)
self.gridLayout_2.setObjectName("gridLayout_2")
self.flow_type = QtWidgets.QLabel(parent=self.frame)
self.flow_type.setMinimumSize(QtCore.QSize(0, 25))
self.flow_type.setMaximumSize(QtCore.QSize(16777215, 25))
self.flow_type.setObjectName("flow_type")
self.gridLayout_2.addWidget(self.flow_type, 6, 0, 1, 1)
self.baudrate = QtWidgets.QLabel(parent=self.frame)
self.baudrate.setMinimumSize(QtCore.QSize(0, 25))
self.baudrate.setMaximumSize(QtCore.QSize(16777215, 25))
self.baudrate.setObjectName("baudrate")
self.gridLayout_2.addWidget(self.baudrate, 1, 0, 1, 1)
self.bytesize = QtWidgets.QLabel(parent=self.frame)
self.bytesize.setMinimumSize(QtCore.QSize(0, 25))
self.bytesize.setMaximumSize(QtCore.QSize(16777215, 25))
self.bytesize.setObjectName("bytesize")
self.gridLayout_2.addWidget(self.bytesize, 2, 0, 1, 1)
self.port = QtWidgets.QLabel(parent=self.frame)
self.port.setMinimumSize(QtCore.QSize(0, 25))
self.port.setMaximumSize(QtCore.QSize(16777215, 25))
self.port.setObjectName("port")
self.gridLayout_2.addWidget(self.port, 0, 0, 1, 1)
self.parity = QtWidgets.QLabel(parent=self.frame)
self.parity.setMinimumSize(QtCore.QSize(0, 25))
self.parity.setMaximumSize(QtCore.QSize(16777215, 25))
self.parity.setObjectName("parity")
self.gridLayout_2.addWidget(self.parity, 3, 0, 1, 1)
self.timeout = QtWidgets.QLabel(parent=self.frame)
self.timeout.setMinimumSize(QtCore.QSize(0, 25))
self.timeout.setMaximumSize(QtCore.QSize(16777215, 25))
self.timeout.setObjectName("timeout")
self.gridLayout_2.addWidget(self.timeout, 5, 0, 1, 1)
self.stopbits = QtWidgets.QLabel(parent=self.frame)
self.stopbits.setMinimumSize(QtCore.QSize(0, 25))
self.stopbits.setMaximumSize(QtCore.QSize(16777215, 25))
self.stopbits.setObjectName("stopbits")
self.gridLayout_2.addWidget(self.stopbits, 4, 0, 1, 1)
self.horizontalLayout.addWidget(self.frame)
self.frame_2 = QtWidgets.QFrame(parent=self.groupBox)
self.frame_2.setMinimumSize(QtCore.QSize(150, 0))
self.frame_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
self.frame_2.setObjectName("frame_2")
self.gridLayout = QtWidgets.QGridLayout(self.frame_2)
self.gridLayout.setVerticalSpacing(15)
self.gridLayout.setObjectName("gridLayout")
self.ComboBox_baudrate = QtWidgets.QComboBox(parent=self.frame_2)
self.ComboBox_baudrate.setMinimumSize(QtCore.QSize(0, 25))
self.ComboBox_baudrate.setObjectName("ComboBox_baudrate")
self.ComboBox_baudrate.addItem("")
self.ComboBox_baudrate.addItem("")
self.ComboBox_baudrate.addItem("")
self.ComboBox_baudrate.addItem("")
self.ComboBox_baudrate.addItem("")
self.ComboBox_baudrate.addItem("")
self.gridLayout.addWidget(self.ComboBox_baudrate, 1, 0, 1, 1)
self.ComboBox_data_bits = QtWidgets.QComboBox(parent=self.frame_2)
self.ComboBox_data_bits.setMinimumSize(QtCore.QSize(0, 25))
self.ComboBox_data_bits.setObjectName("ComboBox_data_bits")
self.ComboBox_data_bits.addItem("")
self.ComboBox_data_bits.addItem("")
self.ComboBox_data_bits.addItem("")
self.ComboBox_data_bits.addItem("")
self.gridLayout.addWidget(self.ComboBox_data_bits, 2, 0, 1, 1)
self.ComboBox_port_name = QtWidgets.QComboBox(parent=self.frame_2)
self.ComboBox_port_name.setMinimumSize(QtCore.QSize(0, 25))
self.ComboBox_port_name.setObjectName("ComboBox_port_name")
self.gridLayout.addWidget(self.ComboBox_port_name, 0, 0, 1, 1)
self.ComboBox_parity = QtWidgets.QComboBox(parent=self.frame_2)
self.ComboBox_parity.setMinimumSize(QtCore.QSize(0, 25))
self.ComboBox_parity.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.ComboBox_parity.setSizeIncrement(QtCore.QSize(0, 0))
self.ComboBox_parity.setObjectName("ComboBox_parity")
self.ComboBox_parity.addItem("")
self.ComboBox_parity.addItem("")
self.ComboBox_parity.addItem("")
self.ComboBox_parity.addItem("")
self.ComboBox_parity.addItem("")
self.gridLayout.addWidget(self.ComboBox_parity, 3, 0, 1, 1)
self.ComboBox_stop_bits = QtWidgets.QComboBox(parent=self.frame_2)
self.ComboBox_stop_bits.setMinimumSize(QtCore.QSize(0, 25))
self.ComboBox_stop_bits.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.ComboBox_stop_bits.setSizeIncrement(QtCore.QSize(0, 0))
self.ComboBox_stop_bits.setObjectName("ComboBox_stop_bits")
self.ComboBox_stop_bits.addItem("")
self.ComboBox_stop_bits.addItem("")
self.ComboBox_stop_bits.addItem("")
self.gridLayout.addWidget(self.ComboBox_stop_bits, 4, 0, 1, 1)
self.line_timeout = QtWidgets.QLineEdit(parent=self.frame_2)
self.line_timeout.setMinimumSize(QtCore.QSize(0, 25))
self.line_timeout.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.line_timeout.setSizeIncrement(QtCore.QSize(0, 0))
self.line_timeout.setObjectName("line_timeout")
self.gridLayout.addWidget(self.line_timeout, 5, 0, 1, 1)
self.ComboBox_flow_type = QtWidgets.QComboBox(parent=self.frame_2)
self.ComboBox_flow_type.setMinimumSize(QtCore.QSize(0, 25))
self.ComboBox_flow_type.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.ComboBox_flow_type.setSizeIncrement(QtCore.QSize(0, 0))
self.ComboBox_flow_type.setObjectName("ComboBox_flow_type")
self.ComboBox_flow_type.addItem("")
self.ComboBox_flow_type.addItem("")
self.ComboBox_flow_type.addItem("")
self.gridLayout.addWidget(self.ComboBox_flow_type, 6, 0, 1, 1)
self.horizontalLayout.addWidget(self.frame_2)
spacerItem = QtWidgets.QSpacerItem(1, 1, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.gridLayout_3.addWidget(self.groupBox, 0, 0, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox(parent=self.frame_3)
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setObjectName("buttonBox")
self.gridLayout_3.addWidget(self.buttonBox, 1, 0, 1, 1)
self.gridLayout_4.addWidget(self.frame_3, 0, 0, 1, 1)
self.gridLayout_5.addLayout(self.gridLayout_4, 0, 0, 1, 1)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.groupBox.setTitle(_translate("Dialog", "Port Setup"))
self.flow_type.setText(_translate("Dialog", "Flow Type"))
self.baudrate.setText(_translate("Dialog", "Baudrate"))
self.bytesize.setText(_translate("Dialog", "Data Bits"))
self.port.setText(_translate("Dialog", "Port"))
self.parity.setText(_translate("Dialog", "Parity"))
self.timeout.setText(_translate("Dialog", "Time out"))
self.stopbits.setText(_translate("Dialog", "Stop Bits"))
self.ComboBox_baudrate.setItemText(0, _translate("Dialog", "9600"))
self.ComboBox_baudrate.setItemText(1, _translate("Dialog", "19200"))
self.ComboBox_baudrate.setItemText(2, _translate("Dialog", "38400"))
self.ComboBox_baudrate.setItemText(3, _translate("Dialog", "57600"))
self.ComboBox_baudrate.setItemText(4, _translate("Dialog", "115200"))
self.ComboBox_baudrate.setItemText(5, _translate("Dialog", "Custom"))
self.ComboBox_data_bits.setItemText(0, _translate("Dialog", "5"))
self.ComboBox_data_bits.setItemText(1, _translate("Dialog", "6"))
self.ComboBox_data_bits.setItemText(2, _translate("Dialog", "7"))
self.ComboBox_data_bits.setItemText(3, _translate("Dialog", "8"))
self.ComboBox_parity.setItemText(0, _translate("Dialog", "None"))
self.ComboBox_parity.setItemText(1, _translate("Dialog", "Even"))
self.ComboBox_parity.setItemText(2, _translate("Dialog", "Odd"))
self.ComboBox_parity.setItemText(3, _translate("Dialog", "Mark"))
self.ComboBox_parity.setItemText(4, _translate("Dialog", "Space"))
self.ComboBox_stop_bits.setItemText(0, _translate("Dialog", "1"))
self.ComboBox_stop_bits.setItemText(1, _translate("Dialog", "1.5"))
self.ComboBox_stop_bits.setItemText(2, _translate("Dialog", "2"))
self.ComboBox_flow_type.setItemText(0, _translate("Dialog", "None"))
self.ComboBox_flow_type.setItemText(1, _translate("Dialog", "RTS/ CTS"))
self.ComboBox_flow_type.setItemText(2, _translate("Dialog", "XON/ XOFF"))