1、精简部分公共代码到PublicFunc.py中

2、完成了<人工纠正>的部分代码
This commit is contained in:
2025-05-05 20:43:22 +08:00
parent 74f9d357a1
commit 10247fb738
12 changed files with 686 additions and 330 deletions

View File

@ -22,12 +22,12 @@ from PySide6.QtWidgets import (QAbstractSpinBox, QApplication, QCheckBox, QDoubl
QTableWidget, QTableWidgetItem, QTextBrowser, QVBoxLayout,
QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow)
class Ui_MainWindow_label_check(object):
def setupUi(self, MainWindow_label_check):
if not MainWindow_label_check.objectName():
MainWindow_label_check.setObjectName(u"MainWindow_label_check")
MainWindow_label_check.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow_label_check)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
@ -81,6 +81,15 @@ class Ui_MainWindow(object):
self.verticalLayout_2.addItem(self.verticalSpacer)
self.label_mode = QLabel(self.groupBox_left)
self.label_mode.setObjectName(u"label_mode")
font2 = QFont()
font2.setPointSize(14)
self.label_mode.setFont(font2)
self.label_mode.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.verticalLayout_2.addWidget(self.label_mode)
self.groupBox = QGroupBox(self.groupBox_left)
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_2 = QGridLayout(self.groupBox)
@ -341,13 +350,13 @@ class Ui_MainWindow(object):
self.horizontalLayout_3.addWidget(self.checkBox)
self.pushButton = QPushButton(self.groupBox_left)
self.pushButton.setObjectName(u"pushButton")
sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy)
self.pushButton.setFont(font1)
self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy)
self.pushButton_save.setFont(font1)
self.horizontalLayout_3.addWidget(self.pushButton)
self.horizontalLayout_3.addWidget(self.pushButton_save)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
@ -368,9 +377,10 @@ class Ui_MainWindow(object):
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 1)
self.verticalLayout_2.setStretch(3, 1)
self.verticalLayout_2.setStretch(4, 6)
self.verticalLayout_2.setStretch(5, 1)
self.verticalLayout_2.setStretch(4, 1)
self.verticalLayout_2.setStretch(5, 6)
self.verticalLayout_2.setStretch(6, 1)
self.verticalLayout_2.setStretch(7, 1)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
@ -456,52 +466,53 @@ class Ui_MainWindow(object):
self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 6)
self.gridLayout.setColumnStretch(2, 2)
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow)
MainWindow_label_check.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_label_check)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
MainWindow_label_check.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.retranslateUi(MainWindow_label_check)
QMetaObject.connectSlotsByName(MainWindow)
QMetaObject.connectSlotsByName(MainWindow_label_check)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"\u4eba\u5de5\u7ea0\u6b63", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow", u"\u4eba\u5de5\u7ea0\u6b63", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow", u"\u5bfb\u5cf0\u53c2\u6570\u8bbe\u7f6e", None))
self.label_4.setText(QCoreApplication.translate("MainWindow", u"\u6700\u5c0f\u95f4\u9694", None))
self.label_3.setText(QCoreApplication.translate("MainWindow", u"\u6700\u5c0f\u9ad8\u5ea6", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow", u"\u81ea\u52a8\u64ad\u653e", None))
self.pushButton_prev_move.setText(QCoreApplication.translate("MainWindow", u"< <(A)", None))
self.pushButton_pause.setText(QCoreApplication.translate("MainWindow", u"| |(S)", None))
self.pushButton_next_move.setText(QCoreApplication.translate("MainWindow", u"> >(D)", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow", u"\u8bbe\u7f6e", None))
self.label_moveLength_preset_1.setText(QCoreApplication.translate("MainWindow", u"10000", None))
self.label_maxRange_preset_1.setText(QCoreApplication.translate("MainWindow", u"40000", None))
self.radioButton_move_preset_1.setText(QCoreApplication.translate("MainWindow", u"\u9884\u8bbe1", None))
self.label_moveSpeed_preset_3.setText(QCoreApplication.translate("MainWindow", u"500", None))
self.radioButton_move_preset_2.setText(QCoreApplication.translate("MainWindow", u"\u9884\u8bbe2", None))
self.label_maxRange_preset_3.setText(QCoreApplication.translate("MainWindow", u"100000", None))
self.label_maxRange_preset_2.setText(QCoreApplication.translate("MainWindow", u"80000", None))
self.radioButton_move_preset_3.setText(QCoreApplication.translate("MainWindow", u"\u9884\u8bbe3", None))
self.label_moveLength_preset_3.setText(QCoreApplication.translate("MainWindow", u"25000", None))
self.label_moveSpeed_preset_2.setText(QCoreApplication.translate("MainWindow", u"500", None))
self.label_moveLength_preset_2.setText(QCoreApplication.translate("MainWindow", u"20000", None))
self.radioButton_move_custom.setText(QCoreApplication.translate("MainWindow", u"\u81ea\u5b9a\u4e49", None))
self.label_moveSpeed_preset_1.setText(QCoreApplication.translate("MainWindow", u"500", None))
self.label_7.setText(QCoreApplication.translate("MainWindow", u"\u79fb\u52a8\u8ddd\u79bb", None))
self.label_6.setText(QCoreApplication.translate("MainWindow", u"\u6700\u5927\u8303\u56f4", None))
self.label_8.setText(QCoreApplication.translate("MainWindow", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
self.checkBox.setText(QCoreApplication.translate("MainWindow", u"\u7ed8\u5236\u53c2\u8003\u7ebf", None))
self.pushButton.setText(QCoreApplication.translate("MainWindow", u"\u5bfc\u51fa\u6807\u7b7e", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow", u"\u5cf0\u503c\u5750\u6807\u548c\u4fe1\u606f", None))
self.label_9.setText(QCoreApplication.translate("MainWindow", u"\u6570\u636e\u957f\u5ea6(\u70b9\u6570)", None))
self.label_11.setText(QCoreApplication.translate("MainWindow", u"\u7ea0\u6b63\u524d\u5cf0\u503c\u4e2a\u6570", None))
self.label_12.setText(QCoreApplication.translate("MainWindow", u"\u7ea0\u6b63\u540e\u5cf0\u503c\u4e2a\u6570", None))
def retranslateUi(self, MainWindow_label_check):
MainWindow_label_check.setWindowTitle(QCoreApplication.translate("MainWindow_label_check", u"\u4eba\u5de5\u7ea0\u6b63", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u4eba\u5de5\u7ea0\u6b63", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_label_check", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_label_check", u"\u5f00\u59cb\u5bfc\u5165", None))
self.label_mode.setText(QCoreApplication.translate("MainWindow_label_check", u"\u5904\u7406\u7684\u4fe1\u53f7\u7c7b\u578b", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u5bfb\u5cf0\u53c2\u6570\u8bbe\u7f6e", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6700\u5c0f\u95f4\u9694", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6700\u5c0f\u9ad8\u5ea6", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u81ea\u52a8\u64ad\u653e", None))
self.pushButton_prev_move.setText(QCoreApplication.translate("MainWindow_label_check", u"< <(A)", None))
self.pushButton_pause.setText(QCoreApplication.translate("MainWindow_label_check", u"| |(S)", None))
self.pushButton_next_move.setText(QCoreApplication.translate("MainWindow_label_check", u"> >(D)", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u8bbe\u7f6e", None))
self.label_moveLength_preset_1.setText(QCoreApplication.translate("MainWindow_label_check", u"10000", None))
self.label_maxRange_preset_1.setText(QCoreApplication.translate("MainWindow_label_check", u"40000", None))
self.radioButton_move_preset_1.setText(QCoreApplication.translate("MainWindow_label_check", u"\u9884\u8bbe1", None))
self.label_moveSpeed_preset_3.setText(QCoreApplication.translate("MainWindow_label_check", u"500", None))
self.radioButton_move_preset_2.setText(QCoreApplication.translate("MainWindow_label_check", u"\u9884\u8bbe2", None))
self.label_maxRange_preset_3.setText(QCoreApplication.translate("MainWindow_label_check", u"100000", None))
self.label_maxRange_preset_2.setText(QCoreApplication.translate("MainWindow_label_check", u"80000", None))
self.radioButton_move_preset_3.setText(QCoreApplication.translate("MainWindow_label_check", u"\u9884\u8bbe3", None))
self.label_moveLength_preset_3.setText(QCoreApplication.translate("MainWindow_label_check", u"25000", None))
self.label_moveSpeed_preset_2.setText(QCoreApplication.translate("MainWindow_label_check", u"500", None))
self.label_moveLength_preset_2.setText(QCoreApplication.translate("MainWindow_label_check", u"20000", None))
self.radioButton_move_custom.setText(QCoreApplication.translate("MainWindow_label_check", u"\u81ea\u5b9a\u4e49", None))
self.label_moveSpeed_preset_1.setText(QCoreApplication.translate("MainWindow_label_check", u"500", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_label_check", u"\u79fb\u52a8\u8ddd\u79bb", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6700\u5927\u8303\u56f4", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_label_check", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
self.checkBox.setText(QCoreApplication.translate("MainWindow_label_check", u"\u7ed8\u5236\u53c2\u8003\u7ebf", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_label_check", u"\u5bfc\u51fa\u6807\u7b7e", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u5cf0\u503c\u5750\u6807\u548c\u4fe1\u606f", None))
self.label_9.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6570\u636e\u957f\u5ea6(\u70b9\u6570)", None))
self.label_11.setText(QCoreApplication.translate("MainWindow_label_check", u"\u7ea0\u6b63\u524d\u5cf0\u503c\u4e2a\u6570", None))
self.label_12.setText(QCoreApplication.translate("MainWindow_label_check", u"\u7ea0\u6b63\u540e\u5cf0\u503c\u4e2a\u6570", None))
# retranslateUi

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<class>MainWindow_label_check</class>
<widget class="QMainWindow" name="MainWindow_label_check">
<property name="geometry">
<rect>
<x>0</x>
@ -42,7 +42,7 @@
<property name="title">
<string>人工纠正</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,1,1,6,1,1,0">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,1,1,1,6,1,1,0">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -96,6 +96,21 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_mode">
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>处理的信号类型</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
@ -584,7 +599,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<widget class="QPushButton" name="pushButton_save">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>