Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import PyQt5
- # Form implementation generated from reading ui file 'Lab1.ui'
- #
- # Created by: PyQt5 UI code generator 5.15.9
- #
- # 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
- from COMPort import COMPort
- import threading
- import re
- class UiMainWindow(object):
- input_port_name: str
- output_port_name: str
- ports_baudrate: int
- input_port: COMPort
- output_port: COMPort
- accept_flag: bool
- change_port_name_flag: bool
- change_port_speed_flag: bool
- numbers_bytes: int
- total_numbers_bytes: int
- def __init__(self, main_window):
- self.input_port_name = "????"
- self.output_port_name = "????"
- self.ports_baudrate = 0
- self.accept_flag = False
- self.change_port_name_flag = False
- self.numbers_bytes = 0
- self.total_numbers_bytes = 0
- # InitComPorts
- self.input_port = COMPort(self.input_port_name, self.ports_baudrate)
- self.output_port = COMPort(self.output_port_name, self.ports_baudrate)
- # InitWidget
- self.centralwidget = QtWidgets.QWidget(main_window)
- self.lbl_input = QtWidgets.QLabel(self.centralwidget)
- self.le_input_entry = QtWidgets.QLineEdit(self.centralwidget)
- self.lbl_input_port = QtWidgets.QLabel(self.centralwidget)
- self.lbl_output = QtWidgets.QLabel(self.centralwidget)
- self.le_output_entry = QtWidgets.QLineEdit(self.centralwidget)
- self.lbl_output_port = QtWidgets.QLabel(self.centralwidget)
- self.lbl_accept_flag = QtWidgets.QLabel(self.centralwidget)
- self.hLine = QtWidgets.QFrame(self.centralwidget)
- self.vLine = QtWidgets.QFrame(self.centralwidget)
- self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
- self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
- self.btn_accept_output = QtWidgets.QPushButton(self.gridLayoutWidget)
- self.btn_noaccept_output = QtWidgets.QPushButton(self.gridLayoutWidget)
- self.btn_clear_output = QtWidgets.QPushButton(self.gridLayoutWidget)
- self.btn_send_input = QtWidgets.QPushButton(self.centralwidget)
- self.btn_clear_input = QtWidgets.QPushButton(self.centralwidget)
- self.combobox_ports = QtWidgets.QComboBox(self.centralwidget)
- self.lbl_com_ports = QtWidgets.QLabel(self.centralwidget)
- self.lbl_debug = QtWidgets.QLabel(self.centralwidget)
- self.txt_debug = QtWidgets.QTextEdit(self.centralwidget)
- self.btn_create_ports = QtWidgets.QPushButton(self.centralwidget)
- self.combobox_speed = QtWidgets.QComboBox(self.centralwidget)
- self.lbl_com_ports_state = QtWidgets.QLabel(self.centralwidget)
- self.lbl_input_state = QtWidgets.QLabel(self.centralwidget)
- self.lbl_input_state_2 = QtWidgets.QLabel(self.centralwidget)
- self.txt_input_state = QtWidgets.QTextBrowser(self.centralwidget)
- self.txt_output_state = QtWidgets.QTextBrowser(self.centralwidget)
- # InitInformationAboutComPortState
- self.update_state_text(self.txt_input_state, self.input_port.port_name)
- self.update_state_text(self.txt_output_state, self.output_port.port_name)
- def setupUi(self, mainWindow):
- mainWindow.setObjectName("mainWindow")
- mainWindow.setEnabled(True)
- mainWindow.resize(805, 585)
- mainWindow.setMouseTracking(False)
- mainWindow.setStyleSheet("background-color: rgb(255, 234, 179);")
- self.centralwidget.setObjectName("centralwidget")
- self.lbl_input.setGeometry(QtCore.QRect(108, 30, 175, 30))
- font = QtGui.QFont()
- font.setPointSize(14)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_input.setFont(font)
- self.lbl_input.setStyleSheet("background-color: rgb(255, 234, 179);")
- self.lbl_input.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)
- self.lbl_input.setObjectName("lbl_input")
- self.le_input_entry.setGeometry(QtCore.QRect(25, 70, 350, 40))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.le_input_entry.setFont(font)
- self.le_input_entry.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.le_input_entry.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.le_input_entry.setMaxLength(30)
- self.le_input_entry.setClearButtonEnabled(True)
- self.le_input_entry.setObjectName("le_input_entry")
- self.lbl_input_port.setGeometry(QtCore.QRect(320, 30, 51, 30))
- font = QtGui.QFont()
- font.setPointSize(10)
- font.setBold(False)
- font.setWeight(50)
- self.lbl_input_port.setFont(font)
- self.lbl_input_port.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_input_port.setObjectName("lbl_input_port")
- self.lbl_output.setGeometry(QtCore.QRect(510, 30, 175, 30))
- font = QtGui.QFont()
- font.setPointSize(14)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_output.setFont(font)
- self.lbl_output.setStyleSheet("background-color: rgb(255, 234, 179);")
- self.lbl_output.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_output.setObjectName("lbl_output")
- self.le_output_entry.setGeometry(QtCore.QRect(425, 70, 350, 40))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.le_output_entry.setFont(font)
- self.le_output_entry.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.le_output_entry.setReadOnly(True)
- self.le_output_entry.setObjectName("le_output_entry")
- self.lbl_output_port.setGeometry(QtCore.QRect(720, 30, 51, 30))
- font = QtGui.QFont()
- font.setPointSize(10)
- font.setBold(False)
- font.setWeight(50)
- self.lbl_output_port.setFont(font)
- self.lbl_output_port.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_output_port.setObjectName("lbl_output_port")
- self.lbl_accept_flag.setGeometry(QtCore.QRect(435, 30, 55, 30))
- font = QtGui.QFont()
- font.setPointSize(10)
- self.lbl_accept_flag.setFont(font)
- self.lbl_accept_flag.setObjectName("lbl_accept_flag")
- self.hLine.setGeometry(QtCore.QRect(0, 182, 801, 20))
- self.hLine.setFrameShape(QtWidgets.QFrame.HLine)
- self.hLine.setFrameShadow(QtWidgets.QFrame.Sunken)
- self.hLine.setObjectName("hLine")
- self.vLine.setGeometry(QtCore.QRect(400, 0, 3, 600))
- self.vLine.setFrameShape(QtWidgets.QFrame.VLine)
- self.vLine.setFrameShadow(QtWidgets.QFrame.Sunken)
- self.vLine.setObjectName("vLine")
- self.gridLayoutWidget.setGeometry(QtCore.QRect(430, 120, 341, 61))
- self.gridLayoutWidget.setObjectName("gridLayoutWidget")
- self.gridLayout.setContentsMargins(0, 0, 0, 0)
- self.gridLayout.setObjectName("gridLayout")
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.btn_accept_output.sizePolicy().hasHeightForWidth())
- self.btn_accept_output.setSizePolicy(sizePolicy)
- font = QtGui.QFont()
- font.setPointSize(11)
- self.btn_accept_output.setFont(font)
- self.btn_accept_output.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.btn_accept_output.setMouseTracking(False)
- self.btn_accept_output.setStyleSheet("background-color: rgb(79, 198, 0);")
- self.btn_accept_output.setIconSize(QtCore.QSize(20, 20))
- self.btn_accept_output.setObjectName("btn_accept_output")
- self.gridLayout.addWidget(self.btn_accept_output, 0, 0, 1, 1)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.btn_noaccept_output.sizePolicy().hasHeightForWidth())
- self.btn_noaccept_output.setSizePolicy(sizePolicy)
- font = QtGui.QFont()
- font.setPointSize(11)
- self.btn_noaccept_output.setFont(font)
- self.btn_noaccept_output.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.btn_noaccept_output.setStyleSheet("background-color: rgb(230, 230, 0);")
- self.btn_noaccept_output.setObjectName("btn_noaccept_output")
- self.gridLayout.addWidget(self.btn_noaccept_output, 0, 1, 1, 1)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.btn_clear_output.sizePolicy().hasHeightForWidth())
- self.btn_clear_output.setSizePolicy(sizePolicy)
- font = QtGui.QFont()
- font.setPointSize(11)
- self.btn_clear_output.setFont(font)
- self.btn_clear_output.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.btn_clear_output.setMouseTracking(False)
- self.btn_clear_output.setStyleSheet("background-color: rgb(239, 0, 0);")
- self.btn_clear_output.setObjectName("btn_clear_output")
- self.gridLayout.addWidget(self.btn_clear_output, 0, 2, 1, 1)
- self.btn_send_input.setGeometry(QtCore.QRect(70, 137, 93, 31))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.btn_send_input.setFont(font)
- self.btn_send_input.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.btn_send_input.setMouseTracking(False)
- self.btn_send_input.setStyleSheet("background-color: rgb(79, 198, 0);")
- self.btn_send_input.setObjectName("btn_send_input")
- self.btn_clear_input.setGeometry(QtCore.QRect(230, 137, 93, 31))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.btn_clear_input.setFont(font)
- self.btn_clear_input.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.btn_clear_input.setMouseTracking(False)
- self.btn_clear_input.setStyleSheet("background-color: rgb(239, 0, 0);")
- self.btn_clear_input.setObjectName("btn_clear_input")
- self.combobox_ports.setGeometry(QtCore.QRect(30, 244, 180, 30))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.combobox_ports.setFont(font)
- self.combobox_ports.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.combobox_ports.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.combobox_ports.setObjectName("combobox_ports")
- self.combobox_ports.addItem("")
- self.combobox_ports.addItem("")
- self.lbl_com_ports.setGeometry(QtCore.QRect(30, 210, 320, 20))
- font = QtGui.QFont()
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_com_ports.setFont(font)
- self.lbl_com_ports.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_com_ports.setObjectName("lbl_com_ports")
- self.lbl_debug.setGeometry(QtCore.QRect(430, 210, 345, 30))
- font = QtGui.QFont()
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_debug.setFont(font)
- self.lbl_debug.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_debug.setObjectName("lbl_debug")
- self.txt_debug.setGeometry(QtCore.QRect(444, 250, 321, 300))
- font = QtGui.QFont()
- font.setPointSize(10)
- self.txt_debug.setFont(font)
- self.txt_debug.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.txt_debug.setReadOnly(True)
- self.txt_debug.setObjectName("txt_debug")
- self.btn_create_ports.setGeometry(QtCore.QRect(229, 254, 141, 50))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.btn_create_ports.setFont(font)
- self.btn_create_ports.setStyleSheet("background-color: rgb(79, 198, 0);")
- self.btn_create_ports.setObjectName("btn_create_ports")
- self.combobox_speed.setGeometry(QtCore.QRect(30, 290, 180, 30))
- font = QtGui.QFont()
- font.setPointSize(11)
- self.combobox_speed.setFont(font)
- self.combobox_speed.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.combobox_speed.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.combobox_speed.setObjectName("combobox_speed")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.combobox_speed.addItem("")
- self.lbl_com_ports_state.setGeometry(QtCore.QRect(30, 340, 320, 20))
- font = QtGui.QFont()
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_com_ports_state.setFont(font)
- self.lbl_com_ports_state.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_com_ports_state.setObjectName("lbl_com_ports_state")
- self.lbl_input_state.setGeometry(QtCore.QRect(40, 370, 150, 30))
- font = QtGui.QFont()
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_input_state.setFont(font)
- self.lbl_input_state.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_input_state.setObjectName("lbl_input_state")
- self.lbl_input_state_2.setGeometry(QtCore.QRect(210, 370, 150, 30))
- font = QtGui.QFont()
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.lbl_input_state_2.setFont(font)
- self.lbl_input_state_2.setAlignment(QtCore.Qt.AlignCenter)
- self.lbl_input_state_2.setObjectName("lbl_input_state_2")
- self.txt_input_state.setGeometry(QtCore.QRect(40, 410, 150, 140))
- font = QtGui.QFont()
- font.setPointSize(10)
- self.txt_input_state.setFont(font)
- self.txt_input_state.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.txt_input_state.setObjectName("txt_input_state")
- self.txt_output_state.setGeometry(QtCore.QRect(210, 410, 150, 140))
- font = QtGui.QFont()
- font.setPointSize(10)
- self.txt_output_state.setFont(font)
- self.txt_output_state.setStyleSheet("background-color: rgb(255, 250, 188);")
- self.txt_output_state.setObjectName("txt_output_state")
- mainWindow.setCentralWidget(self.centralwidget)
- self.retranslateUi(mainWindow)
- QtCore.QMetaObject.connectSlotsByName(mainWindow)
- def combo_box_ports_changed(self):
- selected_text = self.combobox_ports.currentText()
- if selected_text == "COM2 <=> COM3":
- if self.input_port_name == "COM2" and self.output_port_name == "COM3":
- self.change_port_name_flag = False
- else:
- self.logger(f"Changed a new pair of COM-ports: COM2, COM3")
- self.change_port_name_flag = True
- self.input_port_name = "COM2"
- self.output_port_name = "COM3"
- elif selected_text == "COM1 <=> COM4":
- if self.input_port_name == "COM1" and self.output_port_name == "COM4":
- self.change_port_name_flag = False
- else:
- self.logger(f"Changed a new pair of COM-ports: COM1, COM4")
- self.change_port_name_flag = True
- self.input_port_name = "COM1"
- self.output_port_name = "COM4"
- def combo_box_speed_changed(self):
- old_ports_speed: int = self.ports_baudrate
- selected_text = self.combobox_speed.currentText()
- match = re.search(r'(\d+)', selected_text)
- if match:
- self.ports_baudrate = int(match.group())
- else:
- print("ComboBoxSpeedError")
- if old_ports_speed == self.ports_baudrate:
- self.change_port_speed_flag = False
- else:
- self.logger(f"Baudrate has been changed from {old_ports_speed} to {self.ports_baudrate} baud")
- self.change_port_speed_flag = True
- def logger(self, data: str):
- self.txt_debug.append(f"{data}")
- self.txt_debug.append("------------------------------------------------")
- def create_pair_ports(self):
- print(self.input_port_name)
- print(self.output_port_name)
- if (self.change_port_name_flag or self.change_port_speed_flag) and self.input_port.init_flag:
- self.close_pair_ports()
- if (self.input_port_name != "????" and self.ports_baudrate != 0 and
- (self.change_port_name_flag or self.change_port_speed_flag)):
- self.input_port.port_name = self.input_port_name
- self.input_port.baudrate = self.ports_baudrate
- self.update_state_text(self.txt_input_state, self.input_port.port_name)
- # Create input COM-port
- self.input_port.SetParamCOMPort()
- self.lbl_input_port.setText(self.input_port_name)
- self.logger(f"Create input port {self.input_port_name}")
- if (self.output_port_name != "????" and self.ports_baudrate != 0 and
- (self.change_port_name_flag or self.change_port_speed_flag)):
- self.output_port.port_name = self.output_port_name
- self.output_port.baudrate = self.ports_baudrate
- self.update_state_text(self.txt_output_state, self.output_port.port_name)
- # Create output COM-port
- self.output_port.SetParamCOMPort()
- self.lbl_output_port.setText(self.output_port_name)
- self.logger(f"Create input port {self.output_port_name}")
- def close_pair_ports(self):
- if self.accept_flag:
- self.noaccept_data()
- self.input_port.CloseCOMPort()
- self.output_port.CloseCOMPort()
- self.total_numbers_bytes = 0
- self.numbers_bytes = 0
- self.logger(f"Close COM-ports: {self.input_port_name}, {self.output_port_name}")
- def send_data(self):
- if self.input_port.init_flag:
- data = self.le_input_entry.text()
- self.input_port.WriteToPort(data)
- self.numbers_bytes = len(data)
- self.total_numbers_bytes += self.numbers_bytes
- self.update_state_text(self.txt_input_state, self.input_port.port_name)
- self.logger(f"The message has been sent")
- self.clear_input_data()
- else:
- self.logger("The input port was not created")
- def clear_input_data(self):
- self.logger(f"The input field has been cleared")
- self.le_input_entry.clear()
- def thread_read_data(self):
- while True:
- data = self.output_port.ReadFromPort()
- if data != b'':
- self.upgrade_text(data.decode('utf-8'))
- if self.accept_flag is False:
- break
- def upgrade_text(self, data: str):
- self.le_output_entry.setText(self.le_output_entry.text() + data)
- self.txt_output_state.append(
- f"Port: \n{self.output_port.port_name} \nBaudrate: \n{self.output_port.baudrate} бод\n" +
- f"One: {self.numbers_bytes} bytes\nAll: {self.total_numbers_bytes} bytes")
- def accept_data(self):
- if self.output_port.init_flag:
- self.accept_flag = True
- self.logger("The read THREAD has been created")
- thread = threading.Thread(target=self.thread_read_data)
- thread.daemon = True
- thread.start()
- self.lbl_accept_flag.setText("TRUE")
- else:
- self.logger("The output port was not created")
- def noaccept_data(self):
- self.accept_flag = False
- self.logger("The read THREAD has been delete")
- self.lbl_accept_flag.setText("FALSE")
- def clear_output_data(self):
- self.logger(f"The output field has been cleared")
- self.le_output_entry.clear()
- def update_state_text(self, widget: QtWidgets.QTextBrowser, port_name: str):
- widget.setText("Port: \n" + port_name + "\n" +
- "Baudrate: \n" + f"{self.ports_baudrate} бод\n" +
- f"One: {self.numbers_bytes} bytes\n" +
- f"All: {self.total_numbers_bytes} bytes")
- def add_function(self):
- self.combobox_ports.activated.connect(lambda: self.combo_box_ports_changed())
- self.combobox_speed.activated.connect(lambda: self.combo_box_speed_changed())
- self.btn_send_input.clicked.connect(lambda: self.send_data())
- self.btn_clear_input.clicked.connect(lambda: self.clear_input_data())
- self.le_input_entry.returnPressed.connect(lambda: self.send_data())
- self.btn_accept_output.clicked.connect(lambda: self.accept_data())
- self.btn_noaccept_output.clicked.connect(lambda: self.noaccept_data())
- self.btn_clear_output.clicked.connect(lambda: self.clear_output_data())
- self.btn_create_ports.clicked.connect(lambda: self.create_pair_ports())
- def retranslateUi(self, mainWindow):
- _translate = QtCore.QCoreApplication.translate
- mainWindow.setWindowTitle(_translate("mainWindow", "COM ports program"))
- self.lbl_input.setText(_translate("mainWindow", "Input"))
- self.le_input_entry.setPlaceholderText(_translate("mainWindow", "Введите сообщение для отправки:"))
- self.lbl_input_port.setText(_translate("mainWindow", "????"))
- self.lbl_output.setText(_translate("mainWindow", "Output"))
- self.le_output_entry.setPlaceholderText(_translate("mainWindow", "Сообщение:"))
- self.lbl_output_port.setText(_translate("mainWindow", "????"))
- self.lbl_accept_flag.setText(_translate("mainWindow", "FALSE"))
- self.btn_accept_output.setText(_translate("mainWindow", "Accept"))
- self.btn_noaccept_output.setText(_translate("mainWindow", "No accept"))
- self.btn_clear_output.setText(_translate("mainWindow", "Clear"))
- self.btn_send_input.setText(_translate("mainWindow", "Send"))
- self.btn_clear_input.setText(_translate("mainWindow", "Clear"))
- self.combobox_ports.setItemText(0, _translate("mainWindow", "COM1 <=> COM4"))
- self.combobox_ports.setItemText(1, _translate("mainWindow", "COM2 <=> COM3"))
- self.lbl_com_ports.setText(_translate("mainWindow", "Настройка COM-портов:"))
- self.lbl_debug.setText(_translate("mainWindow", "DEBUG"))
- self.txt_debug.setPlaceholderText(_translate("mainWindow", "Ход работы программы:"))
- self.btn_create_ports.setText(_translate("mainWindow", "Create pair"))
- self.combobox_speed.setItemText(0, _translate("mainWindow", "50 бод"))
- self.combobox_speed.setItemText(1, _translate("mainWindow", "75 бод"))
- self.combobox_speed.setItemText(2, _translate("mainWindow", "110 бод"))
- self.combobox_speed.setItemText(3, _translate("mainWindow", "150 бод"))
- self.combobox_speed.setItemText(4, _translate("mainWindow", "300 бод"))
- self.combobox_speed.setItemText(5, _translate("mainWindow", "600 бод"))
- self.combobox_speed.setItemText(6, _translate("mainWindow", "1200 бод"))
- self.combobox_speed.setItemText(7, _translate("mainWindow", "2400 бод"))
- self.combobox_speed.setItemText(8, _translate("mainWindow", "4800 бод"))
- self.combobox_speed.setItemText(9, _translate("mainWindow", "9600 бод"))
- self.combobox_speed.setItemText(10, _translate("mainWindow", "19200 бод"))
- self.combobox_speed.setItemText(11, _translate("mainWindow", "38400 бод"))
- self.combobox_speed.setItemText(12, _translate("mainWindow", "57500 бод"))
- self.combobox_speed.setItemText(13, _translate("mainWindow", "115200 бод"))
- self.lbl_com_ports_state.setText(_translate("mainWindow", "Состояния COM-портов:"))
- self.lbl_input_state.setText(_translate("mainWindow", "Input"))
- self.lbl_input_state_2.setText(_translate("mainWindow", "Output"))
- self.txt_input_state.setPlaceholderText(_translate("mainWindow", "Состояние:"))
- self.txt_output_state.setPlaceholderText(_translate("mainWindow", "Состояние:"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement