1、精简部分公共代码到PublicFunc.py中
2、完成了<人工纠正>的部分代码
This commit is contained in:
@ -30,15 +30,18 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.ui = Ui_Signal_Label()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
# 消息弹窗初始化
|
||||
self.msgBox = QMessageBox()
|
||||
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
|
||||
|
||||
self.__read_config__()
|
||||
self.ui.plainTextEdit_root_path.setPlainText(Config["Path"]["Root"])
|
||||
self.seek_sampID(Path(Config["Path"]["Root"]) / Path(ConfigParams.PUBLIC_PATH_ORGBCG_TEXT))
|
||||
|
||||
self.preprocess = None
|
||||
|
||||
# 消息弹窗初始化
|
||||
self.msgBox = QMessageBox()
|
||||
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
|
||||
self.detect_Jpeak = None
|
||||
self.detect_Rpeak = None
|
||||
self.label_check = None
|
||||
|
||||
# 绑定槽函数
|
||||
self.ui.pushButton_open.clicked.connect(self.__slot_btn_open__)
|
||||
@ -46,6 +49,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
self.ui.pushButton_preprocess_ECG.clicked.connect(self.__slot_btn_preprocess__)
|
||||
self.ui.pushButton_detect_Jpeak.clicked.connect(self.__slot_btn_detect_Jpeak__)
|
||||
self.ui.pushButton_detect_Rpeak.clicked.connect(self.__slot_btn_detect_Rpeak__)
|
||||
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__)
|
||||
|
||||
@staticmethod
|
||||
def __read_config__():
|
||||
@ -88,10 +93,11 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
if sender == self.ui.pushButton_preprocess_BCG:
|
||||
mode = "BCG"
|
||||
self.preprocess.show(mode, root_path, sampID)
|
||||
elif sender == self.ui.pushButton_preprocess_ECG:
|
||||
mode = "ECG"
|
||||
self.preprocess.show(mode, root_path, sampID)
|
||||
else:
|
||||
mode = "ModeNotExist"
|
||||
self.preprocess.show(mode, root_path, sampID)
|
||||
|
||||
def __slot_btn_detect_Jpeak__(self):
|
||||
|
||||
@ -107,6 +113,21 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
self.detect_Rpeak.show(root_path, sampID)
|
||||
|
||||
def __slot_btn_label_check__(self):
|
||||
|
||||
self.label_check = MainWindow_detect_Rpeak()
|
||||
|
||||
sender = self.sender()
|
||||
root_path = self.ui.plainTextEdit_root_path.toPlainText()
|
||||
sampID = int(self.ui.comboBox_sampID.currentText())
|
||||
if sender == self.ui.pushButton_label_check_BCG:
|
||||
mode = "BCG"
|
||||
elif sender == self.ui.pushButton_label_check_ECG:
|
||||
mode = "ECG"
|
||||
else:
|
||||
mode = "ModeNotExist"
|
||||
self.label_check.show(mode, root_path, sampID)
|
||||
|
||||
def seek_sampID(self, path):
|
||||
|
||||
if not Path(path).exists():
|
||||
|
||||
Reference in New Issue
Block a user