1 Star 0 Fork 7

brian/qt-uart-Python

forked from wsp/qt-uart-Python 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ui_Serial.py 15.62 KB
一键复制 编辑 原始数据 按行查看 历史
WSP 提交于 2023-01-12 00:23 . 添加打包
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'ui_Serial.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
import res_rc
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(792, 457)
icon = QIcon()
icon.addFile(u":/image/images/uart_icon.ico", QSize(), QIcon.Normal, QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout_2 = QGridLayout(self.centralwidget)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.verticalLayout_3 = QVBoxLayout()
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.tB_Serial_Data_RX_Show = QTextBrowser(self.centralwidget)
self.tB_Serial_Data_RX_Show.setObjectName(u"tB_Serial_Data_RX_Show")
self.tB_Serial_Data_RX_Show.setMinimumSize(QSize(0, 160))
self.verticalLayout_3.addWidget(self.tB_Serial_Data_RX_Show)
self.gridLayout_2.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setObjectName(u"verticalLayout")
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.cBox_Serial_Port_Number = QComboBox(self.centralwidget)
self.cBox_Serial_Port_Number.setObjectName(u"cBox_Serial_Port_Number")
sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(2)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cBox_Serial_Port_Number.sizePolicy().hasHeightForWidth())
self.cBox_Serial_Port_Number.setSizePolicy(sizePolicy)
self.cBox_Serial_Port_Number.setMinimumSize(QSize(90, 0))
self.horizontalLayout_2.addWidget(self.cBox_Serial_Port_Number)
self.label_Serial_Port_Number = QLabel(self.centralwidget)
self.label_Serial_Port_Number.setObjectName(u"label_Serial_Port_Number")
sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
sizePolicy1.setHorizontalStretch(1)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_Serial_Port_Number.sizePolicy().hasHeightForWidth())
self.label_Serial_Port_Number.setSizePolicy(sizePolicy1)
self.label_Serial_Port_Number.setMinimumSize(QSize(60, 0))
self.horizontalLayout_2.addWidget(self.label_Serial_Port_Number)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.cBox_Serial_Baud_Rate = QComboBox(self.centralwidget)
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.addItem("")
self.cBox_Serial_Baud_Rate.setObjectName(u"cBox_Serial_Baud_Rate")
sizePolicy.setHeightForWidth(self.cBox_Serial_Baud_Rate.sizePolicy().hasHeightForWidth())
self.cBox_Serial_Baud_Rate.setSizePolicy(sizePolicy)
self.cBox_Serial_Baud_Rate.setMinimumSize(QSize(90, 0))
self.horizontalLayout_3.addWidget(self.cBox_Serial_Baud_Rate)
self.label_Serial_Baud_Rate = QLabel(self.centralwidget)
self.label_Serial_Baud_Rate.setObjectName(u"label_Serial_Baud_Rate")
sizePolicy1.setHeightForWidth(self.label_Serial_Baud_Rate.sizePolicy().hasHeightForWidth())
self.label_Serial_Baud_Rate.setSizePolicy(sizePolicy1)
self.label_Serial_Baud_Rate.setMinimumSize(QSize(60, 0))
self.horizontalLayout_3.addWidget(self.label_Serial_Baud_Rate)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.cBox_Serial_Data_Bit = QComboBox(self.centralwidget)
self.cBox_Serial_Data_Bit.addItem("")
self.cBox_Serial_Data_Bit.addItem("")
self.cBox_Serial_Data_Bit.addItem("")
self.cBox_Serial_Data_Bit.addItem("")
self.cBox_Serial_Data_Bit.setObjectName(u"cBox_Serial_Data_Bit")
sizePolicy.setHeightForWidth(self.cBox_Serial_Data_Bit.sizePolicy().hasHeightForWidth())
self.cBox_Serial_Data_Bit.setSizePolicy(sizePolicy)
self.cBox_Serial_Data_Bit.setMinimumSize(QSize(90, 0))
self.horizontalLayout_4.addWidget(self.cBox_Serial_Data_Bit)
self.label_Serial_Data_Bit = QLabel(self.centralwidget)
self.label_Serial_Data_Bit.setObjectName(u"label_Serial_Data_Bit")
sizePolicy1.setHeightForWidth(self.label_Serial_Data_Bit.sizePolicy().hasHeightForWidth())
self.label_Serial_Data_Bit.setSizePolicy(sizePolicy1)
self.label_Serial_Data_Bit.setMinimumSize(QSize(60, 0))
self.horizontalLayout_4.addWidget(self.label_Serial_Data_Bit)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.cBox_Serial_Stop_Bit = QComboBox(self.centralwidget)
self.cBox_Serial_Stop_Bit.addItem("")
self.cBox_Serial_Stop_Bit.addItem("")
self.cBox_Serial_Stop_Bit.addItem("")
self.cBox_Serial_Stop_Bit.setObjectName(u"cBox_Serial_Stop_Bit")
sizePolicy.setHeightForWidth(self.cBox_Serial_Stop_Bit.sizePolicy().hasHeightForWidth())
self.cBox_Serial_Stop_Bit.setSizePolicy(sizePolicy)
self.cBox_Serial_Stop_Bit.setMinimumSize(QSize(90, 0))
self.horizontalLayout_5.addWidget(self.cBox_Serial_Stop_Bit)
self.label_Serial_Stop_Bit = QLabel(self.centralwidget)
self.label_Serial_Stop_Bit.setObjectName(u"label_Serial_Stop_Bit")
sizePolicy1.setHeightForWidth(self.label_Serial_Stop_Bit.sizePolicy().hasHeightForWidth())
self.label_Serial_Stop_Bit.setSizePolicy(sizePolicy1)
self.label_Serial_Stop_Bit.setMinimumSize(QSize(60, 0))
self.horizontalLayout_5.addWidget(self.label_Serial_Stop_Bit)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.horizontalLayout_6 = QHBoxLayout()
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
self.cBox_Serial_Check_Bit = QComboBox(self.centralwidget)
self.cBox_Serial_Check_Bit.addItem("")
self.cBox_Serial_Check_Bit.addItem("")
self.cBox_Serial_Check_Bit.addItem("")
self.cBox_Serial_Check_Bit.setObjectName(u"cBox_Serial_Check_Bit")
sizePolicy.setHeightForWidth(self.cBox_Serial_Check_Bit.sizePolicy().hasHeightForWidth())
self.cBox_Serial_Check_Bit.setSizePolicy(sizePolicy)
self.cBox_Serial_Check_Bit.setMinimumSize(QSize(90, 0))
self.horizontalLayout_6.addWidget(self.cBox_Serial_Check_Bit)
self.label_Serial_Check_Bit = QLabel(self.centralwidget)
self.label_Serial_Check_Bit.setObjectName(u"label_Serial_Check_Bit")
sizePolicy1.setHeightForWidth(self.label_Serial_Check_Bit.sizePolicy().hasHeightForWidth())
self.label_Serial_Check_Bit.setSizePolicy(sizePolicy1)
self.label_Serial_Check_Bit.setMinimumSize(QSize(60, 0))
self.horizontalLayout_6.addWidget(self.label_Serial_Check_Bit)
self.verticalLayout.addLayout(self.horizontalLayout_6)
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.verticalLayout_2 = QVBoxLayout()
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalLayout_2.setSizeConstraint(QLayout.SetMinAndMaxSize)
self.verticalLayout_2.setContentsMargins(0, -1, -1, -1)
self.Label_Serial_name = QLabel(self.centralwidget)
self.Label_Serial_name.setObjectName(u"Label_Serial_name")
sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.Label_Serial_name.sizePolicy().hasHeightForWidth())
self.Label_Serial_name.setSizePolicy(sizePolicy2)
font = QFont()
font.setFamily(u"\u5e7c\u5706")
font.setPointSize(18)
self.Label_Serial_name.setFont(font)
self.Label_Serial_name.setFocusPolicy(Qt.NoFocus)
self.Label_Serial_name.setLayoutDirection(Qt.LeftToRight)
self.Label_Serial_name.setTextFormat(Qt.AutoText)
self.Label_Serial_name.setAlignment(Qt.AlignCenter)
self.verticalLayout_2.addWidget(self.Label_Serial_name)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.lEdit_Serial_Send_Data = QLineEdit(self.centralwidget)
self.lEdit_Serial_Send_Data.setObjectName(u"lEdit_Serial_Send_Data")
self.horizontalLayout.addWidget(self.lEdit_Serial_Send_Data)
self.pBtn_Serial_Send_Data = QPushButton(self.centralwidget)
self.pBtn_Serial_Send_Data.setObjectName(u"pBtn_Serial_Send_Data")
self.pBtn_Serial_Send_Data.setMaximumSize(QSize(80, 16777215))
self.horizontalLayout.addWidget(self.pBtn_Serial_Send_Data)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.horizontalLayout_7 = QHBoxLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
self.pBtn_Serial_Open = QPushButton(self.centralwidget)
self.pBtn_Serial_Open.setObjectName(u"pBtn_Serial_Open")
self.pBtn_Serial_Open.setAutoDefault(False)
self.pBtn_Serial_Open.setFlat(False)
self.horizontalLayout_7.addWidget(self.pBtn_Serial_Open)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(self.horizontalSpacer)
self.pBtn_Serial_Close = QPushButton(self.centralwidget)
self.pBtn_Serial_Close.setObjectName(u"pBtn_Serial_Close")
self.horizontalLayout_7.addWidget(self.pBtn_Serial_Close)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(self.horizontalSpacer_2)
self.pBtn_Serial_Clear_RX_Data = QPushButton(self.centralwidget)
self.pBtn_Serial_Clear_RX_Data.setObjectName(u"pBtn_Serial_Clear_RX_Data")
self.horizontalLayout_7.addWidget(self.pBtn_Serial_Clear_RX_Data)
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(self.horizontalSpacer_3)
self.pBtn_Serial_Clear_TX_Data = QPushButton(self.centralwidget)
self.pBtn_Serial_Clear_TX_Data.setObjectName(u"pBtn_Serial_Clear_TX_Data")
self.horizontalLayout_7.addWidget(self.pBtn_Serial_Clear_TX_Data)
self.verticalLayout_2.addLayout(self.horizontalLayout_7)
self.gridLayout.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
self.cBox_Serial_Baud_Rate.setCurrentIndex(3)
self.cBox_Serial_Data_Bit.setCurrentIndex(3)
self.cBox_Serial_Stop_Bit.setCurrentIndex(0)
self.pBtn_Serial_Open.setDefault(False)
QMetaObject.connectSlotsByName(MainWindow)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Python \u4e32\u53e3\u52a9\u624b", None))
self.label_Serial_Port_Number.setText(QCoreApplication.translate("MainWindow", u"\u4e32\u53e3\u53f7", None))
self.cBox_Serial_Baud_Rate.setItemText(0, QCoreApplication.translate("MainWindow", u"1200", None))
self.cBox_Serial_Baud_Rate.setItemText(1, QCoreApplication.translate("MainWindow", u"2400", None))
self.cBox_Serial_Baud_Rate.setItemText(2, QCoreApplication.translate("MainWindow", u"4800", None))
self.cBox_Serial_Baud_Rate.setItemText(3, QCoreApplication.translate("MainWindow", u"9600", None))
self.cBox_Serial_Baud_Rate.setItemText(4, QCoreApplication.translate("MainWindow", u"19200", None))
self.cBox_Serial_Baud_Rate.setItemText(5, QCoreApplication.translate("MainWindow", u"38400", None))
self.cBox_Serial_Baud_Rate.setItemText(6, QCoreApplication.translate("MainWindow", u"57600", None))
self.cBox_Serial_Baud_Rate.setItemText(7, QCoreApplication.translate("MainWindow", u"115200", None))
self.label_Serial_Baud_Rate.setText(QCoreApplication.translate("MainWindow", u"\u6ce2\u7279\u7387", None))
self.cBox_Serial_Data_Bit.setItemText(0, QCoreApplication.translate("MainWindow", u"5", None))
self.cBox_Serial_Data_Bit.setItemText(1, QCoreApplication.translate("MainWindow", u"6", None))
self.cBox_Serial_Data_Bit.setItemText(2, QCoreApplication.translate("MainWindow", u"7", None))
self.cBox_Serial_Data_Bit.setItemText(3, QCoreApplication.translate("MainWindow", u"8", None))
self.label_Serial_Data_Bit.setText(QCoreApplication.translate("MainWindow", u"\u6570\u636e\u4f4d", None))
self.cBox_Serial_Stop_Bit.setItemText(0, QCoreApplication.translate("MainWindow", u"1", None))
self.cBox_Serial_Stop_Bit.setItemText(1, QCoreApplication.translate("MainWindow", u"1.5", None))
self.cBox_Serial_Stop_Bit.setItemText(2, QCoreApplication.translate("MainWindow", u"2", None))
self.label_Serial_Stop_Bit.setText(QCoreApplication.translate("MainWindow", u"\u505c\u6b62\u4f4d", None))
self.cBox_Serial_Check_Bit.setItemText(0, QCoreApplication.translate("MainWindow", u"\u65e0", None))
self.cBox_Serial_Check_Bit.setItemText(1, QCoreApplication.translate("MainWindow", u"\u5947\u6821\u9a8c", None))
self.cBox_Serial_Check_Bit.setItemText(2, QCoreApplication.translate("MainWindow", u"\u5076\u68c0\u9a8c", None))
self.label_Serial_Check_Bit.setText(QCoreApplication.translate("MainWindow", u"\u6821\u9a8c\u4f4d", None))
self.Label_Serial_name.setText(QCoreApplication.translate("MainWindow", u"WSP-\u81ea\u5236Python\u4e32\u53e3\u52a9\u624b", None))
self.pBtn_Serial_Send_Data.setText(QCoreApplication.translate("MainWindow", u"\u53d1\u9001\u6570\u636e", None))
self.pBtn_Serial_Open.setText(QCoreApplication.translate("MainWindow", u"\u6253\u5f00\u4e32\u53e3", None))
self.pBtn_Serial_Close.setText(QCoreApplication.translate("MainWindow", u"\u5173\u95ed\u4e32\u53e3", None))
self.pBtn_Serial_Clear_RX_Data.setText(QCoreApplication.translate("MainWindow", u"\u6e05\u7a7a\u63a5\u6536\u6570\u636e", None))
self.pBtn_Serial_Clear_TX_Data.setText(QCoreApplication.translate("MainWindow", u"\u6e05\u7a7a\u53d1\u9001\u6570\u636e", None))
# retranslateUi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/brianen/qt-uart-python.git
[email protected]:brianen/qt-uart-python.git
brianen
qt-uart-python
qt-uart-Python
master

搜索帮助