1、完善命名规范
2、完成<冗余数据切割和标签映射>的全部代码
This commit is contained in:
@ -12,6 +12,7 @@ from func.Module_detect_Jpeak import MainWindow_detect_Jpeak
|
||||
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.utils.Constants import Constants, ConfigParams
|
||||
|
||||
@ -27,7 +28,6 @@ Config = {
|
||||
class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
super(MainWindow, self).__init__()
|
||||
self.ui = Ui_Signal_Label()
|
||||
self.ui.setupUi(self)
|
||||
@ -45,6 +45,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.detect_Rpeak = None
|
||||
self.label_check = None
|
||||
self.precisely_align = None
|
||||
self.cut_PSG = None
|
||||
|
||||
# 绑定槽函数
|
||||
self.ui.pushButton_open.clicked.connect(self.__slot_btn_open__)
|
||||
@ -55,10 +56,10 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.ui.pushButton_label_check_BCG.clicked.connect(self.__slot_btn_label_check__)
|
||||
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__)
|
||||
|
||||
@staticmethod
|
||||
def __read_config__():
|
||||
|
||||
if not Path(ConfigParams.PUBLIC_CONFIG_FILE_PATH).exists():
|
||||
with open(ConfigParams.PUBLIC_CONFIG_FILE_PATH, "w") as f:
|
||||
dump(ConfigParams.PUBLIC_CONFIG_NEW_CONTENT, f)
|
||||
@ -69,12 +70,10 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
|
||||
@staticmethod
|
||||
def __write_config__():
|
||||
|
||||
with open(Path(ConfigParams.PUBLIC_CONFIG_FILE_PATH), "w") as f:
|
||||
dump(Config, f)
|
||||
|
||||
def __slot_btn_open__(self):
|
||||
|
||||
file_dialog = QFileDialog()
|
||||
file_dialog.setFileMode(QFileDialog.Directory)
|
||||
file_dialog.setOption(QFileDialog.ShowDirsOnly, True)
|
||||
@ -89,7 +88,6 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
PublicFunc.msgbox_output(self, Constants.OPERATION_CANCELED, Constants.MSGBOX_TYPE_INFO)
|
||||
|
||||
def __slot_btn_preprocess__(self):
|
||||
|
||||
self.preprocess = MainWindow_preprocess()
|
||||
|
||||
sender = self.sender()
|
||||
@ -104,21 +102,18 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.preprocess.show(mode, root_path, sampID)
|
||||
|
||||
def __slot_btn_detect_Jpeak__(self):
|
||||
|
||||
self.detect_Jpeak = MainWindow_detect_Jpeak()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
self.detect_Jpeak.show(root_path, sampID)
|
||||
|
||||
def __slot_btn_detect_Rpeak__(self):
|
||||
|
||||
self.detect_Rpeak = MainWindow_detect_Rpeak()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
self.detect_Rpeak.show(root_path, sampID)
|
||||
|
||||
def __slot_btn_label_check__(self):
|
||||
|
||||
self.label_check = MainWindow_label_check()
|
||||
|
||||
sender = self.sender()
|
||||
@ -133,14 +128,18 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.label_check.show(mode, root_path, sampID)
|
||||
|
||||
def __slot_btn_precisely_align__(self):
|
||||
|
||||
self.precisely_align = MainWindow_precisely_align()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
self.precisely_align.show(root_path, sampID)
|
||||
|
||||
def seek_sampID(self, path):
|
||||
def __slot_btn_cut_PSG__(self):
|
||||
self.cut_PSG = MainWindow_cut_PSG()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
self.cut_PSG.show(root_path, 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)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user