优化了重置绘图的代码
This commit is contained in:
@ -1000,31 +1000,38 @@ class MainWindow_SA_label(QMainWindow):
|
||||
self.ui.spinBox_correctEnd.setValue(Config["BCG_EP"])
|
||||
|
||||
def reset_axes(self):
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
self.ax2.clear()
|
||||
self.ax3.clear()
|
||||
self.ax4.clear()
|
||||
self.ax5.clear()
|
||||
self.ax6.clear()
|
||||
self.ax0.grid(True)
|
||||
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
self.ax1.grid(True)
|
||||
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax1.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax2 is not None:
|
||||
self.ax2.clear()
|
||||
self.ax2.grid(True)
|
||||
self.ax2.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax2.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax3 is not None:
|
||||
self.ax3.clear()
|
||||
self.ax3.grid(True)
|
||||
self.ax3.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax3.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax4 is not None:
|
||||
self.ax4.clear()
|
||||
self.ax4.grid(True)
|
||||
self.ax4.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax4.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax5 is not None:
|
||||
self.ax5.clear()
|
||||
self.ax5.grid(True)
|
||||
self.ax5.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax5.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax6 is not None:
|
||||
self.ax6.clear()
|
||||
self.ax6.grid(True)
|
||||
self.ax6.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
|
||||
|
||||
@ -592,9 +592,6 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(2/6)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
self.__reset__()
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
# 获取存档
|
||||
PublicFunc.progressbar_update(self, 3, 6, Constants.LOADING_ARCHIVE, 50)
|
||||
result = self.data.get_archive()
|
||||
@ -929,11 +926,13 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
PublicFunc.text_output(self.ui, f"{Constants.ARTIFACT_LABEL_JUMP_ARTIFACT}{str(self.pressed_number)}", Constants.TIPS_TYPE_INFO)
|
||||
|
||||
def reset_axes(self):
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
self.ax0.grid(True)
|
||||
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
self.ax1.grid(True)
|
||||
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
|
||||
|
||||
@ -670,11 +670,13 @@ class MainWindow_label_check(QMainWindow):
|
||||
PublicFunc.text_output(self.ui, f"{Constants.LABEL_CHECK_JUMP_X_INDEX}{str(int(x))}", Constants.TIPS_TYPE_INFO)
|
||||
|
||||
def reset_axes(self):
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
self.ax0.grid(True)
|
||||
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
self.ax1.grid(True)
|
||||
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ from func.Module_label_check import MainWindow_label_check
|
||||
from func.Module_precisely_align import MainWindow_precisely_align
|
||||
from func.Module_cut_PSG import MainWindow_cut_PSG
|
||||
from func.Module_artifact_label import MainWindow_artifact_label
|
||||
from func.Module_resp_quality_label import MainWindow_resp_quality_label
|
||||
from func.Module_SA_label import MainWindow_SA_label
|
||||
|
||||
from func.utils.Constants import Constants, ConfigParams
|
||||
@ -62,7 +63,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.precisely_align = None
|
||||
self.cut_PSG = None
|
||||
self.artifact_label = None
|
||||
|
||||
self.resp_quality_label = None
|
||||
self.SA_label = None
|
||||
|
||||
# 绑定槽函数
|
||||
@ -77,6 +78,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.ui.pushButton_precisely_align.clicked.connect(self.__slot_btn_precisely_align__)
|
||||
self.ui.pushButton_cut_PSG.clicked.connect(self.__slot_btn_cut_PSG__)
|
||||
self.ui.pushButton_artifact_label.clicked.connect(self.__slot_btn_artifact_label__)
|
||||
self.ui.pushButton_resp_quality_label.clicked.connect(self.__slot_btn_resp_quality_label__)
|
||||
self.ui.pushButton_SA_label.clicked.connect(self.__slot_btn_SA_label__)
|
||||
|
||||
@staticmethod
|
||||
@ -222,6 +224,18 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
# 默认最大化显示而非固定分辨率
|
||||
self.artifact_label.showMaximized()
|
||||
|
||||
def __slot_btn_resp_quality_label__(self):
|
||||
self.resp_quality_label = MainWindow_resp_quality_label()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
sampID = self.ui.comboBox_sampID.currentText()
|
||||
if not self.check_root_path():
|
||||
return
|
||||
if not self.check_sampID():
|
||||
return
|
||||
self.resp_quality_label.show(root_path, int(sampID))
|
||||
# 默认最大化显示而非固定分辨率
|
||||
self.resp_quality_label.showMaximized()
|
||||
|
||||
def __slot_btn_SA_label__(self):
|
||||
self.SA_label = MainWindow_SA_label()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
|
||||
@ -385,6 +385,7 @@ class MainWindow_preprocess(QMainWindow):
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def reset_axes(self):
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
self.ax0.grid(True)
|
||||
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
|
||||
Reference in New Issue
Block a user