完成了<体动标注>功能的重构
This commit is contained in:
@ -14,6 +14,7 @@ from func.Module_detect_Rpeak import MainWindow_detect_Rpeak
|
||||
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.utils.Constants import Constants, ConfigParams
|
||||
|
||||
@ -50,6 +51,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.label_check = None
|
||||
self.precisely_align = None
|
||||
self.cut_PSG = None
|
||||
self.artifact_label = None
|
||||
|
||||
# 绑定槽函数
|
||||
self.ui.pushButton_open.clicked.connect(self.__slot_btn_open__)
|
||||
@ -62,6 +64,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.ui.pushButton_label_check_ECG.clicked.connect(self.__slot_btn_label_check__)
|
||||
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__)
|
||||
|
||||
@staticmethod
|
||||
def __read_config__():
|
||||
@ -181,6 +184,16 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
return
|
||||
self.cut_PSG.show(root_path, int(sampID))
|
||||
|
||||
def __slot_btn_artifact_label__(self):
|
||||
self.artifact_label = MainWindow_artifact_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.artifact_label.show(root_path, int(sampID))
|
||||
|
||||
def seek_sampID(self, path):
|
||||
if not Path(path).exists():
|
||||
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_ROOT_PATH_NOT_EXIST, Constants.MSGBOX_TYPE_ERROR)
|
||||
|
||||
Reference in New Issue
Block a user