源碼程序開發相關環境:
PyQt55.15.2
PyQt5-sip12.10.1
pyserial3.5
pywin32-ctypes0.2.0
requests2.28.0
typing-extensions4.2.0
urllib31.26.9
yarg0.1.9
zipp==3.8.0
主界面部分代碼:
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# 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
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(700, 906)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox.setGeometry(QtCore.QRect(40, 20, 301, 101))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox.setFont(font)
self.groupBox.setStyleSheet("")
self.groupBox.setObjectName("groupBox")
self.pushButton_7 = QtWidgets.QPushButton(self.groupBox)
self.pushButton_7.setGeometry(QtCore.QRect(40, 22, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_7.setFont(font)
self.pushButton_7.setStyleSheet("")
self.pushButton_7.setObjectName("pushButton_7")
self.pushButton_8 = QtWidgets.QPushButton(self.groupBox)
self.pushButton_8.setGeometry(QtCore.QRect(170, 20, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_8.setFont(font)
self.pushButton_8.setStyleSheet("")
self.pushButton_8.setObjectName("pushButton_8")
self.pushButton_9 = QtWidgets.QPushButton(self.groupBox)
self.pushButton_9.setGeometry(QtCore.QRect(170, 60, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_9.setFont(font)
self.pushButton_9.setStyleSheet("")
self.pushButton_9.setObjectName("pushButton_9")
self.label_16 = QtWidgets.QLabel(self.groupBox)
self.label_16.setGeometry(QtCore.QRect(40, 60, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.label_16.setFont(font)
self.label_16.setStyleSheet("")
self.label_16.setObjectName("label_16")
self.label_17 = QtWidgets.QLabel(self.groupBox)
self.label_17.setGeometry(QtCore.QRect(110, 60, 54, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.label_17.setFont(font)
self.label_17.setStyleSheet("")
self.label_17.setObjectName("label_17")
self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_2.setGeometry(QtCore.QRect(350, 310, 311, 161))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_2.setFont(font)
self.groupBox_2.setStyleSheet("")
self.groupBox_2.setObjectName("groupBox_2")
self.lineEdit_1 = QtWidgets.QLineEdit(self.groupBox_2)
self.lineEdit_1.setGeometry(QtCore.QRect(20, 50, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_1.setFont(font)
self.lineEdit_1.setStyleSheet("")
self.lineEdit_1.setObjectName("lineEdit_1")
self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox_2)
self.lineEdit_2.setGeometry(QtCore.QRect(100, 50, 61, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_2.setFont(font)
self.lineEdit_2.setStyleSheet("")
self.lineEdit_2.setObjectName("lineEdit_2")
self.lineEdit_3 = QtWidgets.QLineEdit(self.groupBox_2)
self.lineEdit_3.setGeometry(QtCore.QRect(170, 50, 61, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_3.setFont(font)
self.lineEdit_3.setStyleSheet("")
self.lineEdit_3.setObjectName("lineEdit_3")
self.label = QtWidgets.QLabel(self.groupBox_2)
self.label.setGeometry(QtCore.QRect(20, 21, 81, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label.setFont(font)
self.label.setStyleSheet("")
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.groupBox_2)
self.label_2.setGeometry(QtCore.QRect(100, 21, 71, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_2.setFont(font)
self.label_2.setStyleSheet("")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(self.groupBox_2)
self.label_3.setGeometry(QtCore.QRect(170, 21, 81, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_3.setFont(font)
self.label_3.setStyleSheet("")
self.label_3.setObjectName("label_3")
self.pushButton_5 = QtWidgets.QPushButton(self.groupBox_2)
self.pushButton_5.setGeometry(QtCore.QRect(240, 50, 51, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_5.setFont(font)
self.pushButton_5.setStyleSheet("")
self.pushButton_5.setObjectName("pushButton_5")
self.lineEdit_4 = QtWidgets.QLineEdit(self.groupBox_2)
self.lineEdit_4.setGeometry(QtCore.QRect(20, 110, 271, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.lineEdit_4.setFont(font)
self.lineEdit_4.setStyleSheet("")
self.lineEdit_4.setObjectName("lineEdit_4")
self.label_4 = QtWidgets.QLabel(self.groupBox_2)
self.label_4.setGeometry(QtCore.QRect(20, 85, 71, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.label_4.setFont(font)
self.label_4.setStyleSheet("")
self.label_4.setObjectName("label_4")
self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_3.setGeometry(QtCore.QRect(40, 310, 301, 161))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_3.setFont(font)
self.groupBox_3.setStyleSheet("")
self.groupBox_3.setObjectName("groupBox_3")
self.label_5 = QtWidgets.QLabel(self.groupBox_3)
self.label_5.setGeometry(QtCore.QRect(20, 25, 81, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_5.setFont(font)
self.label_5.setStyleSheet("")
self.label_5.setObjectName("label_5")
self.lineEdit_5 = QtWidgets.QLineEdit(self.groupBox_3)
self.lineEdit_5.setGeometry(QtCore.QRect(20, 50, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_5.setFont(font)
self.lineEdit_5.setStyleSheet("")
self.lineEdit_5.setObjectName("lineEdit_5")
self.label_6 = QtWidgets.QLabel(self.groupBox_3)
self.label_6.setGeometry(QtCore.QRect(170, 25, 61, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_6.setFont(font)
self.label_6.setStyleSheet("")
self.label_6.setObjectName("label_6")
self.pushButton_6 = QtWidgets.QPushButton(self.groupBox_3)
self.pushButton_6.setGeometry(QtCore.QRect(230, 50, 51, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_6.setFont(font)
self.pushButton_6.setStyleSheet("")
self.pushButton_6.setObjectName("pushButton_6")
self.lineEdit_6 = QtWidgets.QLineEdit(self.groupBox_3)
self.lineEdit_6.setGeometry(QtCore.QRect(100, 50, 61, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_6.setFont(font)
self.lineEdit_6.setStyleSheet("")
self.lineEdit_6.setObjectName("lineEdit_6")
self.lineEdit_7 = QtWidgets.QLineEdit(self.groupBox_3)
self.lineEdit_7.setGeometry(QtCore.QRect(170, 50, 51, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_7.setFont(font)
self.lineEdit_7.setStyleSheet("")
self.lineEdit_7.setObjectName("lineEdit_7")
self.label_7 = QtWidgets.QLabel(self.groupBox_3)
self.label_7.setGeometry(QtCore.QRect(100, 25, 71, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_7.setFont(font)
self.label_7.setStyleSheet("")
self.label_7.setObjectName("label_7")
self.label_8 = QtWidgets.QLabel(self.groupBox_3)
self.label_8.setGeometry(QtCore.QRect(20, 85, 71, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.label_8.setFont(font)
self.label_8.setStyleSheet("")
self.label_8.setObjectName("label_8")
self.lineEdit_8 = QtWidgets.QLineEdit(self.groupBox_3)
self.lineEdit_8.setGeometry(QtCore.QRect(20, 110, 261, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_8.setFont(font)
self.lineEdit_8.setStyleSheet("")
self.lineEdit_8.setObjectName("lineEdit_8")
self.groupBox_5 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_5.setGeometry(QtCore.QRect(40, 610, 301, 261))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_5.setFont(font)
self.groupBox_5.setStyleSheet("")
self.groupBox_5.setObjectName("groupBox_5")
self.textBrowser = QtWidgets.QTextBrowser(self.groupBox_5)
self.textBrowser.setGeometry(QtCore.QRect(10, 30, 281, 121))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.textBrowser.setFont(font)
self.textBrowser.setStyleSheet("")
self.textBrowser.setObjectName("textBrowser")
self.groupBox_8 = QtWidgets.QGroupBox(self.groupBox_5)
self.groupBox_8.setGeometry(QtCore.QRect(10, 160, 281, 91))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_8.setFont(font)
self.groupBox_8.setStyleSheet("")
self.groupBox_8.setObjectName("groupBox_8")
self.lineEdit_14 = QtWidgets.QLineEdit(self.groupBox_8)
self.lineEdit_14.setGeometry(QtCore.QRect(10, 20, 261, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_14.setFont(font)
self.lineEdit_14.setStyleSheet("")
self.lineEdit_14.setObjectName("lineEdit_14")
self.pushButton_3 = QtWidgets.QPushButton(self.groupBox_8)
self.pushButton_3.setGeometry(QtCore.QRect(10, 60, 75, 23))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_3.setFont(font)
self.pushButton_3.setStyleSheet("")
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton_4 = QtWidgets.QPushButton(self.groupBox_8)
self.pushButton_4.setGeometry(QtCore.QRect(160, 60, 111, 23))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_4.setFont(font)
self.pushButton_4.setStyleSheet("")
self.pushButton_4.setObjectName("pushButton_4")
self.pushButton_10 = QtWidgets.QPushButton(self.groupBox_5)
self.pushButton_10.setGeometry(QtCore.QRect(190, 0, 101, 23))
self.pushButton_10.setObjectName("pushButton_10")
self.groupBox_6 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_6.setGeometry(QtCore.QRect(350, 610, 311, 261))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_6.setFont(font)
self.groupBox_6.setStyleSheet("")
self.groupBox_6.setObjectName("groupBox_6")
self.textBrowser_2 = QtWidgets.QTextBrowser(self.groupBox_6)
self.textBrowser_2.setGeometry(QtCore.QRect(10, 30, 291, 221))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.textBrowser_2.setFont(font)
self.textBrowser_2.setStyleSheet("")
self.textBrowser_2.setObjectName("textBrowser_2")
self.pushButton_16 = QtWidgets.QPushButton(self.groupBox_6)
self.pushButton_16.setGeometry(QtCore.QRect(200, 0, 101, 23))
self.pushButton_16.setObjectName("pushButton_16")
self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_4.setGeometry(QtCore.QRect(350, 20, 311, 101))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_4.setFont(font)
self.groupBox_4.setStyleSheet("")
self.groupBox_4.setObjectName("groupBox_4")
self.pushButton = QtWidgets.QPushButton(self.groupBox_4)
self.pushButton.setGeometry(QtCore.QRect(20, 50, 75, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton.setFont(font)
self.pushButton.setStyleSheet("")
self.pushButton.setObjectName("pushButton")
self.lineEdit_9 = QtWidgets.QLineEdit(self.groupBox_4)
self.lineEdit_9.setGeometry(QtCore.QRect(110, 50, 181, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_9.setFont(font)
self.lineEdit_9.setStyleSheet("")
self.lineEdit_9.setObjectName("lineEdit_9")
self.label_9 = QtWidgets.QLabel(self.groupBox_4)
self.label_9.setGeometry(QtCore.QRect(110, 25, 91, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.label_9.setFont(font)
self.label_9.setStyleSheet("")
self.label_9.setObjectName("label_9")
self.groupBox_7 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_7.setGeometry(QtCore.QRect(40, 130, 301, 171))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_7.setFont(font)
self.groupBox_7.setStyleSheet("")
self.groupBox_7.setObjectName("groupBox_7")
self.lineEdit_10 = QtWidgets.QLineEdit(self.groupBox_7)
self.lineEdit_10.setGeometry(QtCore.QRect(20, 60, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_10.setFont(font)
self.lineEdit_10.setStyleSheet("")
self.lineEdit_10.setObjectName("lineEdit_10")
self.lineEdit_11 = QtWidgets.QLineEdit(self.groupBox_7)
self.lineEdit_11.setGeometry(QtCore.QRect(120, 60, 111, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_11.setFont(font)
self.lineEdit_11.setStyleSheet("")
self.lineEdit_11.setObjectName("lineEdit_11")
self.lineEdit_12 = QtWidgets.QLineEdit(self.groupBox_7)
self.lineEdit_12.setGeometry(QtCore.QRect(20, 120, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_12.setFont(font)
self.lineEdit_12.setStyleSheet("")
self.lineEdit_12.setObjectName("lineEdit_12")
self.lineEdit_13 = QtWidgets.QLineEdit(self.groupBox_7)
self.lineEdit_13.setGeometry(QtCore.QRect(120, 120, 171, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_13.setFont(font)
self.lineEdit_13.setStyleSheet("")
self.lineEdit_13.setObjectName("lineEdit_13")
self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_7)
self.pushButton_2.setGeometry(QtCore.QRect(240, 60, 51, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_2.setFont(font)
self.pushButton_2.setStyleSheet("")
self.pushButton_2.setObjectName("pushButton_2")
self.label_10 = QtWidgets.QLabel(self.groupBox_7)
self.label_10.setGeometry(QtCore.QRect(20, 35, 81, 21))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_10.setFont(font)
self.label_10.setStyleSheet("")
self.label_10.setObjectName("label_10")
self.label_11 = QtWidgets.QLabel(self.groupBox_7)
self.label_11.setGeometry(QtCore.QRect(120, 30, 111, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_11.setFont(font)
self.label_11.setStyleSheet("")
self.label_11.setObjectName("label_11")
self.label_12 = QtWidgets.QLabel(self.groupBox_7)
self.label_12.setGeometry(QtCore.QRect(20, 90, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_12.setFont(font)
self.label_12.setStyleSheet("")
self.label_12.setObjectName("label_12")
self.label_13 = QtWidgets.QLabel(self.groupBox_7)
self.label_13.setGeometry(QtCore.QRect(120, 90, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_13.setFont(font)
self.label_13.setStyleSheet("")
self.label_13.setObjectName("label_13")
self.groupBox_9 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_9.setGeometry(QtCore.QRect(350, 130, 311, 171))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_9.setFont(font)
self.groupBox_9.setStyleSheet("")
self.groupBox_9.setObjectName("groupBox_9")
self.label_14 = QtWidgets.QLabel(self.groupBox_9)
self.label_14.setGeometry(QtCore.QRect(20, 20, 91, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_14.setFont(font)
self.label_14.setStyleSheet("")
self.label_14.setObjectName("label_14")
self.lineEdit_15 = QtWidgets.QLineEdit(self.groupBox_9)
self.lineEdit_15.setGeometry(QtCore.QRect(20, 50, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.lineEdit_15.setFont(font)
self.lineEdit_15.setStyleSheet("")
self.lineEdit_15.setObjectName("lineEdit_15")
self.groupBox_10 = QtWidgets.QGroupBox(self.groupBox_9)
self.groupBox_10.setGeometry(QtCore.QRect(110, 20, 181, 141))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.groupBox_10.setFont(font)
self.groupBox_10.setStyleSheet("")
self.groupBox_10.setObjectName("groupBox_10")
self.pushButton_11 = QtWidgets.QPushButton(self.groupBox_10)
self.pushButton_11.setGeometry(QtCore.QRect(90, 20, 75, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_11.setFont(font)
self.pushButton_11.setStyleSheet("")
self.pushButton_11.setObjectName("pushButton_11")
self.pushButton_12 = QtWidgets.QPushButton(self.groupBox_10)
self.pushButton_12.setGeometry(QtCore.QRect(90, 60, 75, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_12.setFont(font)
self.pushButton_12.setStyleSheet("")
self.pushButton_12.setObjectName("pushButton_12")
self.pushButton_13 = QtWidgets.QPushButton(self.groupBox_10)
self.pushButton_13.setGeometry(QtCore.QRect(10, 20, 75, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_13.setFont(font)
self.pushButton_13.setStyleSheet("")
self.pushButton_13.setObjectName("pushButton_13")
self.pushButton_14 = QtWidgets.QPushButton(self.groupBox_10)
self.pushButton_14.setGeometry(QtCore.QRect(10, 60, 75, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_14.setFont(font)
self.pushButton_14.setStyleSheet("")
self.pushButton_14.setObjectName("pushButton_14")
self.pushButton_15 = QtWidgets.QPushButton(self.groupBox_10)
self.pushButton_15.setGeometry(QtCore.QRect(10, 100, 75, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_15.setFont(font)
self.pushButton_15.setStyleSheet("")
self.pushButton_15.setObjectName("pushButton_15")
self.groupBox_13 = QtWidgets.QGroupBox(self.groupBox_9)
self.groupBox_13.setGeometry(QtCore.QRect(10, 90, 91, 71))
self.groupBox_13.setObjectName("groupBox_13")
self.widget_0 = QtWidgets.QWidget(self.groupBox_13)
self.widget_0.setGeometry(QtCore.QRect(10, 20, 16, 16))
self.widget_0.setStyleSheet("background-color:green;opacity:50; ")
self.widget_0.setObjectName("widget_0")
self.widget_2 = QtWidgets.QWidget(self.groupBox_13)
self.widget_2.setGeometry(QtCore.QRect(50, 50, 16, 16))
self.widget_2.setStyleSheet("background-color:green;opacity:50; ")
self.widget_2.setObjectName("widget_3")
self.widget_3 = QtWidgets.QWidget(self.groupBox_13)
self.widget_3.setGeometry(QtCore.QRect(10, 50, 16, 16))
self.widget_3.setStyleSheet("background-color:green;opacity:50; ")
self.widget_3.setObjectName("widget_2")
self.widget_1 = QtWidgets.QWidget(self.groupBox_13)
self.widget_1.setGeometry(QtCore.QRect(50, 20, 16, 16))
self.widget_1.setStyleSheet("background-color:green;opacity:50; ")
self.widget_1.setObjectName("widget_1")
self.label_15 = QtWidgets.QLabel(self.groupBox_13)
self.label_15.setGeometry(QtCore.QRect(30, 20, 21, 16))
self.label_15.setObjectName("label_15")
self.label_22 = QtWidgets.QLabel(self.groupBox_13)
self.label_22.setGeometry(QtCore.QRect(70, 20, 21, 16))
self.label_22.setObjectName("label_22")
self.label_23 = QtWidgets.QLabel(self.groupBox_13)
self.label_23.setGeometry(QtCore.QRect(30, 50, 21, 16))
self.label_23.setObjectName("label_23")
self.label_24 = QtWidgets.QLabel(self.groupBox_13)
self.label_24.setGeometry(QtCore.QRect(70, 50, 21, 16))
self.label_24.setObjectName("label_24")
self.groupBox_11 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_11.setGeometry(QtCore.QRect(40, 470, 621, 61))
font = QtGui.QFont()
font.setFamily("Microsoft JhengHei UI")
self.groupBox_11.setFont(font)
self.groupBox_11.setObjectName("groupBox_11")
self.lineEdit = QtWidgets.QLineEdit(self.groupBox_11)
self.lineEdit.setGeometry(QtCore.QRect(130, 20, 101, 31))
self.lineEdit.setObjectName("lineEdit")
self.pushButton_17 = QtWidgets.QPushButton(self.groupBox_11)
self.pushButton_17.setGeometry(QtCore.QRect(480, 20, 90, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_17.setFont(font)
self.pushButton_17.setObjectName("pushButton_17")
self.label_18 = QtWidgets.QLabel(self.groupBox_11)
self.label_18.setGeometry(QtCore.QRect(50, 20, 81, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_18.setFont(font)
self.label_18.setStyleSheet("")
self.label_18.setObjectName("label_18")
self.label_19 = QtWidgets.QLabel(self.groupBox_11)
self.label_19.setGeometry(QtCore.QRect(260, 20, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_19.setFont(font)
self.label_19.setStyleSheet("")
self.label_19.setObjectName("label_19")
self.comboBox_4 = QtWidgets.QComboBox(self.groupBox_11)
self.comboBox_4.setGeometry(QtCore.QRect(330, 20, 101, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.comboBox_4.setFont(font)
self.comboBox_4.setObjectName("comboBox_4")
self.groupBox_12 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_12.setGeometry(QtCore.QRect(40, 540, 621, 61))
font = QtGui.QFont()
font.setFamily("Microsoft JhengHei UI")
self.groupBox_12.setFont(font)
self.groupBox_12.setObjectName("groupBox_12")
self.lineEdit_17 = QtWidgets.QLineEdit(self.groupBox_12)
self.lineEdit_17.setGeometry(QtCore.QRect(130, 20, 101, 31))
self.lineEdit_17.setObjectName("lineEdit_17")
self.pushButton_18 = QtWidgets.QPushButton(self.groupBox_12)
self.pushButton_18.setGeometry(QtCore.QRect(480, 20, 90, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
self.pushButton_18.setFont(font)
self.pushButton_18.setObjectName("pushButton_18")
self.label_20 = QtWidgets.QLabel(self.groupBox_12)
self.label_20.setGeometry(QtCore.QRect(50, 20, 81, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_20.setFont(font)
self.label_20.setStyleSheet("")
self.label_20.setObjectName("label_20")
self.label_21 = QtWidgets.QLabel(self.groupBox_12)
self.label_21.setGeometry(QtCore.QRect(260, 20, 71, 31))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(8)
self.label_21.setFont(font)
self.label_21.setStyleSheet("")
self.label_21.setObjectName("label_21")
self.lineEdit_18 = QtWidgets.QLineEdit(self.groupBox_12)
self.lineEdit_18.setGeometry(QtCore.QRect(330, 20, 101, 31))
self.lineEdit_18.setObjectName("lineEdit_18")
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "中繼繼電器MODBUS通信測試專用工具"))
self.groupBox.setTitle(_translate("MainWindow", "串口設置"))
self.pushButton_7.setText(_translate("MainWindow", "串口設置"))
self.pushButton_8.setText(_translate("MainWindow", "串口開"))
self.pushButton_9.setText(_translate("MainWindow", "串口關"))
self.label_16.setText(_translate("MainWindow", "當前狀態:"))
self.label_17.setText(_translate("MainWindow", "待機"))
self.groupBox_2.setTitle(_translate("MainWindow", "讀取指令-03H"))
self.label.setText(_translate("MainWindow", "被測模塊地址"))
self.label_2.setText(_translate("MainWindow", "寄存器地址"))
self.label_3.setText(_translate("MainWindow", "寄存器數量"))
self.pushButton_5.setText(_translate("MainWindow", "讀取"))
self.label_4.setText(_translate("MainWindow", "讀取結果"))
self.groupBox_3.setTitle(_translate("MainWindow", "寫入指令-06H"))
self.label_5.setText(_translate("MainWindow", "被測模塊地址"))
self.label_6.setText(_translate("MainWindow", "寫入值"))
self.pushButton_6.setText(_translate("MainWindow", "寫入"))
self.label_7.setText(_translate("MainWindow", "寄存器地址"))
self.label_8.setText(_translate("MainWindow", "寫入結果"))
self.groupBox_5.setTitle(_translate("MainWindow", "發送 >>>"))
self.groupBox_8.setTitle(_translate("MainWindow", "自定義發送 >>>"))
self.pushButton_3.setText(_translate("MainWindow", "發送"))
self.pushButton_4.setText(_translate("MainWindow", "CRC校驗發送"))
self.pushButton_10.setText(_translate("MainWindow", "清空發送數據"))
self.groupBox_6.setTitle(_translate("MainWindow", "接收 <<<"))
self.pushButton_16.setText(_translate("MainWindow", "清空接收數據"))
self.groupBox_4.setTitle(_translate("MainWindow", "讀取原始地址"))
self.pushButton.setText(_translate("MainWindow", "開始讀取"))
self.label_9.setText(_translate("MainWindow", "讀取結果"))
self.groupBox_7.setTitle(_translate("MainWindow", "寫入多個模塊數據"))
self.pushButton_2.setText(_translate("MainWindow", "寫入"))
self.label_10.setText(_translate("MainWindow", "被測模塊地址"))
self.label_11.setText(_translate("MainWindow", "寄存器起始地址"))
self.label_12.setText(_translate("MainWindow", "被測模塊數量"))
self.label_13.setText(_translate("MainWindow", "寫入值"))
self.groupBox_9.setTitle(_translate("MainWindow", "繼電器輸出控制"))
self.label_14.setText(_translate("MainWindow", "被測模塊地址"))
self.groupBox_10.setTitle(_translate("MainWindow", "開關"))
self.pushButton_11.setText(_translate("MainWindow", "第2路合"))
self.pushButton_12.setText(_translate("MainWindow", "第0路合"))
self.pushButton_13.setText(_translate("MainWindow", "第1路合"))
self.pushButton_14.setText(_translate("MainWindow", "第3路合"))
self.pushButton_15.setText(_translate("MainWindow", "全部分"))
self.groupBox_13.setTitle(_translate("MainWindow", "開關狀態"))
self.label_15.setText(_translate("MainWindow", "1"))
self.label_22.setText(_translate("MainWindow", "2"))
self.label_23.setText(_translate("MainWindow", "3"))
self.label_24.setText(_translate("MainWindow", "0"))
self.groupBox_11.setTitle(_translate("MainWindow", "修改波特率"))
self.pushButton_17.setText(_translate("MainWindow", "修改波特率"))
self.label_18.setText(_translate("MainWindow", "被測模塊地址:"))
self.label_19.setText(_translate("MainWindow", "目標波特率:"))
self.groupBox_12.setTitle(_translate("MainWindow", "修改模塊地址"))
self.pushButton_18.setText(_translate("MainWindow", "修改模塊地址"))
self.label_20.setText(_translate("MainWindow", "模塊舊地址:"))
self.label_21.setText(_translate("MainWindow", "模塊新地址:"))
完整部分代碼資料參考鏈接
抖音號:shucai.wulian