Merge branch 'master' into cxh_dev
This commit is contained in:
@ -41,6 +41,7 @@ ButtonState = {
|
||||
"pushButton_quick_remark_input_noNormalRespBetweenArtifact": False,
|
||||
"pushButton_quick_remark_input_lowSignalNoiseRatio": False,
|
||||
"pushButton_quick_remark_input_changeOnMiddle": False,
|
||||
"pushButton_save": False,
|
||||
"pushButton_prev": False,
|
||||
"pushButton_next": False,
|
||||
"pushButton_confirmLabel": False,
|
||||
@ -62,6 +63,7 @@ ButtonState = {
|
||||
"pushButton_quick_remark_input_noNormalRespBetweenArtifact": False,
|
||||
"pushButton_quick_remark_input_lowSignalNoiseRatio": False,
|
||||
"pushButton_quick_remark_input_changeOnMiddle": False,
|
||||
"pushButton_save": False,
|
||||
"pushButton_prev": False,
|
||||
"pushButton_next": False,
|
||||
"pushButton_confirmLabel": False,
|
||||
@ -752,6 +754,7 @@ class MainWindow_SA_label(QMainWindow):
|
||||
ButtonState["Current"]["pushButton_quick_remark_input_noNormalRespBetweenArtifact"] = True
|
||||
ButtonState["Current"]["pushButton_quick_remark_input_lowSignalNoiseRatio"] = True
|
||||
ButtonState["Current"]["pushButton_quick_remark_input_changeOnMiddle"] = True
|
||||
ButtonState["Current"]["pushButton_save"] = True
|
||||
ButtonState["Current"]["pushButton_prev"] = True
|
||||
ButtonState["Current"]["pushButton_next"] = True
|
||||
ButtonState["Current"]["pushButton_confirmLabel"] = True
|
||||
|
||||
@ -490,15 +490,22 @@ class MainWindow_approximately_align(QMainWindow):
|
||||
def __slot_btn_CutOff__(self):
|
||||
PublicFunc.__disableAllButton__(self, ButtonState)
|
||||
|
||||
Config["orgBcgConfig"].update({"PreA": self.ui.spinBox_orgBcgPreA.value(),
|
||||
"PreCut": self.ui.spinBox_orgBcgPreCut.value(),
|
||||
"PostCut": self.ui.spinBox_orgBcgPostCut.value()})
|
||||
Config["PSGConfig"].update({"PreA": self.ui.spinBox_PSGPreA.value(),
|
||||
"PreCut": self.ui.spinBox_PSGPreCut.value(),
|
||||
"PostCut": self.ui.spinBox_PSGPostCut.value()})
|
||||
if self.ui.spinBox_orgBcgPreA.value() + self.ui.spinBox_orgBcgPostCut.value() >= len(self.data.processed_downsample_orgBcg):
|
||||
result = Result().failure(
|
||||
info=Constants.OPERATION_FAILURE + Constants.FAILURE_REASON["OrgBCG_Cut_Length_Not_Correct"])
|
||||
elif self.ui.spinBox_PSGPreCut.value() + self.ui.spinBox_PSGPostCut.value() >= len(self.data.processed_downsample_Tho):
|
||||
result = Result().failure(
|
||||
info=Constants.OPERATION_FAILURE + Constants.FAILURE_REASON["PSG_Cut_Length_Not_Correct"])
|
||||
else:
|
||||
Config["orgBcgConfig"].update({"PreA": self.ui.spinBox_orgBcgPreA.value(),
|
||||
"PreCut": self.ui.spinBox_orgBcgPreCut.value(),
|
||||
"PostCut": self.ui.spinBox_orgBcgPostCut.value()})
|
||||
Config["PSGConfig"].update({"PreA": self.ui.spinBox_PSGPreA.value(),
|
||||
"PreCut": self.ui.spinBox_PSGPreCut.value(),
|
||||
"PostCut": self.ui.spinBox_PSGPostCut.value()})
|
||||
|
||||
PublicFunc.progressbar_update(self, 1, 1, Constants.DRAWING_DATA, 0)
|
||||
result = self.__plot__()
|
||||
PublicFunc.progressbar_update(self, 1, 1, Constants.DRAWING_DATA, 0)
|
||||
result = self.__plot__()
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
|
||||
@ -9,7 +9,7 @@ from PySide6.QtWidgets import QMessageBox, QMainWindow, QApplication, QTableWidg
|
||||
from matplotlib import gridspec, patches
|
||||
from matplotlib.backends.backend_qt import NavigationToolbar2QT
|
||||
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg
|
||||
from numpy import array, append, sum as np_sum, nonzero
|
||||
from numpy import array, sum as np_sum, nonzero
|
||||
from numpy.fft import fft, fftfreq
|
||||
from overrides import overrides
|
||||
from pandas import read_csv, DataFrame, concat
|
||||
@ -33,6 +33,7 @@ ButtonState = {
|
||||
"Default": {
|
||||
"pushButton_input_setting": True,
|
||||
"pushButton_input": True,
|
||||
"pushButton_save": False,
|
||||
"pushButton_prev_move": False,
|
||||
"pushButton_pause": False,
|
||||
"pushButton_next_move": False,
|
||||
@ -46,6 +47,7 @@ ButtonState = {
|
||||
"Current": {
|
||||
"pushButton_input_setting": True,
|
||||
"pushButton_input": True,
|
||||
"pushButton_save": False,
|
||||
"pushButton_prev_move": False,
|
||||
"pushButton_pause": False,
|
||||
"pushButton_next_move": False,
|
||||
@ -270,6 +272,7 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
self.ui.pushButton_type_4.clicked.connect(self.__slot_btn_label__)
|
||||
self.ui.pushButton_type_5.clicked.connect(self.__slot_btn_label__)
|
||||
self.ui.pushButton_delete.clicked.connect(self.__slot_btn_delete_label__)
|
||||
self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__)
|
||||
self.ui.pushButton_prev_move.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.pushButton_pause.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.pushButton_next_move.clicked.connect(self.__slot_btn_move__)
|
||||
@ -644,6 +647,7 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
ButtonState["Current"]["pushButton_input_setting"] = False
|
||||
ButtonState["Current"]["pushButton_prev_move"] = True
|
||||
ButtonState["Current"]["pushButton_next_move"] = True
|
||||
ButtonState["Current"]["pushButton_save"] = True
|
||||
ButtonState["Current"]["pushButton_pause"] = True
|
||||
ButtonState["Current"]["pushButton_type_1"] = True
|
||||
ButtonState["Current"]["pushButton_type_2"] = True
|
||||
@ -652,9 +656,25 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
ButtonState["Current"]["pushButton_type_5"] = True
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_save__(self):
|
||||
PublicFunc.__disableAllButton__(self, ButtonState)
|
||||
|
||||
# 保存
|
||||
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
|
||||
result = self.save()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_label__(self):
|
||||
sender = self.sender()
|
||||
flag = False
|
||||
select_row = []
|
||||
select_type = array([0, 0, 0, 0, 0])
|
||||
flagf = False
|
||||
@ -853,14 +873,15 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
result = self.data.save(amount, duration)
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
info = result.info
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return result
|
||||
|
||||
def __slot_btn_delete_label__(self):
|
||||
if self.pressed_number is not None:
|
||||
|
||||
@ -228,6 +228,7 @@ class MainWindow_bcg_quality_label(QMainWindow):
|
||||
|
||||
self.ui.pushButton_input_setting.clicked.connect(self.setting.show)
|
||||
self.ui.pushButton_input.clicked.connect(self.__slot_btn_input__)
|
||||
self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__)
|
||||
self.ui.pushButton_prev.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.pushButton_next.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.tableWidget_a1.cellDoubleClicked.connect(self.__slot_tablewidget_on_cell_double_clicked__)
|
||||
@ -483,6 +484,23 @@ class MainWindow_bcg_quality_label(QMainWindow):
|
||||
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_save__(self):
|
||||
PublicFunc.__disableAllButton__(self, ButtonState)
|
||||
|
||||
# 保存
|
||||
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
|
||||
result = result = self.data.save("手动保存")
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_move__(self):
|
||||
sender = self.sender()
|
||||
|
||||
@ -654,12 +672,13 @@ class MainWindow_bcg_quality_label(QMainWindow):
|
||||
self.update_tableWidget()
|
||||
result = self.data.save(label)
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
|
||||
info = result.info
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_invalid_signal_label__(self):
|
||||
reply = QMessageBox.question(self, Constants.QUESTION_TITLE,
|
||||
@ -677,12 +696,13 @@ class MainWindow_bcg_quality_label(QMainWindow):
|
||||
self.update_tableWidget()
|
||||
result = self.data.save("无效信号标注")
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
|
||||
info = result.info
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_Ctype_signal_label__(self):
|
||||
reply = QMessageBox.question(self, Constants.QUESTION_TITLE,
|
||||
@ -700,12 +720,13 @@ class MainWindow_bcg_quality_label(QMainWindow):
|
||||
self.update_tableWidget()
|
||||
result = self.data.save("C类信号标注")
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
|
||||
info = result.info
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_checkBox_highlight_longest_continuous__(self):
|
||||
self.__plot__()
|
||||
@ -965,8 +986,6 @@ class Data():
|
||||
Config["Path"]["Input_BCG"] = str(Path(Config["Path"]["Input_BCG"]).parent)
|
||||
if Path(Config["Path"]["Input_Artifact"]).is_file():
|
||||
Config["Path"]["Input_Artifact"] = str(Path(Config["Path"]["Input_Artifact"]).parent)
|
||||
if Path(Config["Path"]["Save"]).is_file():
|
||||
Config["Path"]["Save"] = str(Path(Config["Path"]["Save"]).parent)
|
||||
|
||||
result = PublicFunc.examine_file(Config["Path"]["Input_BCG"], Filename.BCG_SYNC, Params.ENDSWITH_TXT)
|
||||
if result.status:
|
||||
|
||||
@ -111,13 +111,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.BCG_FILTER +
|
||||
str(self.ui.spinBox_input_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_PSG_TEXT /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.JPEAK_REVISE +
|
||||
str(self.ui.spinBox_input_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
|
||||
|
||||
class MainWindow_detect_Jpeak(QMainWindow):
|
||||
@ -357,14 +350,17 @@ class MainWindow_detect_Jpeak(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.peak.reshape(-1)))
|
||||
chunk_size = Params.DETECT_JPEAK_SAVE_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -474,8 +470,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
|
||||
@ -108,13 +108,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.ECG_FILTER +
|
||||
str(self.ui.spinBox_input_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_PSG_TEXT /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.RPEAK_FINAL +
|
||||
str(self.ui.spinBox_input_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
|
||||
|
||||
class MainWindow_detect_Rpeak(QMainWindow):
|
||||
@ -353,14 +346,17 @@ class MainWindow_detect_Rpeak(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.peak.reshape(-1)))
|
||||
chunk_size = Params.DETECT_RPEAK_SAVE_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -464,8 +460,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
|
||||
@ -33,6 +33,7 @@ ButtonState = {
|
||||
"Default": {
|
||||
"pushButton_input_setting": True,
|
||||
"pushButton_input": True,
|
||||
"pushButton_save": False,
|
||||
"pushButton_prev_move": False,
|
||||
"pushButton_pause": False,
|
||||
"pushButton_next_move": False
|
||||
@ -40,6 +41,7 @@ ButtonState = {
|
||||
"Current": {
|
||||
"pushButton_input_setting": True,
|
||||
"pushButton_input": True,
|
||||
"pushButton_save": False,
|
||||
"pushButton_prev_move": False,
|
||||
"pushButton_pause": False,
|
||||
"pushButton_next_move": False
|
||||
@ -172,13 +174,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.JPEAK_REVISE +
|
||||
str(self.ui.spinBox_input_freq_signal.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_ORGBCG_TEXT /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.JPEAK_REVISE_CORRECTED +
|
||||
str(self.ui.spinBox_input_freq_signal.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
elif self.mode == "ECG":
|
||||
self.ui.plainTextEdit_file_path_input_signal.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
@ -194,13 +189,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.RPEAK_FINAL +
|
||||
str(self.ui.spinBox_input_freq_signal.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_PSG_TEXT /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.RPEAK_FINAL_CORRECTED +
|
||||
str(self.ui.spinBox_input_freq_signal.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
else:
|
||||
raise ValueError("模式不存在")
|
||||
|
||||
@ -306,6 +294,7 @@ class MainWindow_label_check(QMainWindow):
|
||||
|
||||
self.ui.pushButton_input.clicked.connect(self.__slot_btn_input__)
|
||||
self.ui.pushButton_input_setting.clicked.connect(self.setting.show)
|
||||
self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__)
|
||||
self.ui.pushButton_prev_move.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.pushButton_pause.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.pushButton_next_move.clicked.connect(self.__slot_btn_move__)
|
||||
@ -547,11 +536,29 @@ class MainWindow_label_check(QMainWindow):
|
||||
action.setEnabled(True)
|
||||
ButtonState["Current"]["pushButton_input"] = False
|
||||
ButtonState["Current"]["pushButton_input_setting"] = False
|
||||
ButtonState["Current"]["pushButton_save"] = True
|
||||
ButtonState["Current"]["pushButton_prev_move"] = True
|
||||
ButtonState["Current"]["pushButton_next_move"] = True
|
||||
ButtonState["Current"]["pushButton_pause"] = True
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_save__(self):
|
||||
PublicFunc.__disableAllButton__(self, ButtonState)
|
||||
|
||||
# 保存
|
||||
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
|
||||
result = self.data.save()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_move__(self):
|
||||
if self.data is None:
|
||||
return
|
||||
@ -825,12 +832,13 @@ class MainWindow_label_check(QMainWindow):
|
||||
self.__update_tableWidget_and_info__()
|
||||
result = self.data.save()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
|
||||
info = result.info
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
# 移除矩形patch
|
||||
if self.figToolbar.rect_patch_ax0 is not None and self.figToolbar.rect_patch_ax1 is not None:
|
||||
self.figToolbar.rect_patch_ax0.remove()
|
||||
@ -910,8 +918,6 @@ class Data:
|
||||
Config["Path"]["Input_Peak"] = str(Path(Config["Path"]["Input_Peak"]).parent)
|
||||
if Path(Config["Path"]["Input_Approximately_Align"]).is_file():
|
||||
Config["Path"]["Input_Approximately_Align"] = str(Path(Config["Path"]["Input_Approximately_Align"]).parent)
|
||||
if Path(Config["Path"]["Save"]).is_file():
|
||||
Config["Path"]["Save"] = str(Path(Config["Path"]["Save"]).parent)
|
||||
|
||||
result = PublicFunc.examine_file(Config["Path"]["Input_Signal"], signal, Params.ENDSWITH_TXT)
|
||||
if result.status:
|
||||
@ -927,7 +933,6 @@ class Data:
|
||||
Filename.APPROXIMATELY_ALIGN_INFO + Params.ENDSWITH_CSV))
|
||||
Config["Path"]["Save"] = str(
|
||||
Path(Config["Path"]["Save"]) / Path(save + str(Config["InputConfig"]["Freq"]) + Params.ENDSWITH_TXT))
|
||||
|
||||
if not Path(Config["Path"]["Input_Peak"]).exists():
|
||||
return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
|
||||
peak + ":" +
|
||||
|
||||
@ -254,41 +254,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.ECG_FILTER +
|
||||
str(self.ui.spinBox_input_freq_ECG.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save_orgBcg.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_ORGBCG_ALIGNED /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.ORGBCG_SYNC +
|
||||
str(self.ui.spinBox_input_freq_orgBcg.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save_BCG.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_ORGBCG_ALIGNED /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.BCG_SYNC +
|
||||
str(self.ui.spinBox_input_freq_BCG.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save_ECG.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_PSG_ALIGNED /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.ECG_SYNC +
|
||||
str(self.ui.spinBox_input_freq_ECG.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save_Jpeak.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_ORGBCG_ALIGNED /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.JPEAK_SYNC +
|
||||
str(self.ui.spinBox_input_freq_BCG.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save_Rpeak.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_PSG_ALIGNED /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.RPEAK_SYNC +
|
||||
str(self.ui.spinBox_input_freq_ECG.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
|
||||
|
||||
class MainWindow_precisely_align(QMainWindow):
|
||||
@ -860,14 +825,17 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.res_orgBcg.reshape(-1)))
|
||||
chunk_size = Params.PRECISELY_ALIGN_SAVE_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save_OrgBCG"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.res_orgBcg.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_res_orgBcg(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save_OrgBCG"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.res_orgBcg.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_res_orgBcg(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(2/6)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -882,14 +850,17 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.res_BCG.reshape(-1)))
|
||||
chunk_size = Params.PRECISELY_ALIGN_SAVE_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save_BCG"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.res_BCG.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_res_BCG(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save_BCG"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.res_BCG.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_res_BCG(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(3/6)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -904,14 +875,17 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.cut_ECG.reshape(-1)))
|
||||
chunk_size = Params.PRECISELY_ALIGN_SAVE_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save_ECG"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.cut_ECG.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_cut_ECG(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save_ECG"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.cut_ECG.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_cut_ECG(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(4/6)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -926,14 +900,17 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.cut_Jpeak.reshape(-1)))
|
||||
chunk_size = Params.PRECISELY_ALIGN_SAVE_PEAK_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save_Jpeak"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.cut_Jpeak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_Jpeak(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save_Jpeak"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.cut_Jpeak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_Jpeak(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(5/6)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -948,14 +925,17 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.cut_Rpeak.reshape(-1)))
|
||||
chunk_size = Params.PRECISELY_ALIGN_SAVE_PEAK_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save_Rpeak"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.cut_Rpeak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_Rpeak(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save_Rpeak"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.cut_Rpeak.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save_Rpeak(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(6/6)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -2065,8 +2045,6 @@ class Data:
|
||||
DataFrame(save_data).to_csv(Config["Path"]["Save_AlignInfo"], index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_ALIGNINFO_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
@ -2091,8 +2069,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save_OrgBCG"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
@ -2112,8 +2088,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save_BCG"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_RES_BCG_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
@ -2133,8 +2107,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save_ECG"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_CUT_ECG_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
@ -2154,8 +2126,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save_Jpeak"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_CUT_JPEAK_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
@ -2175,8 +2145,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save_Rpeak"], mode='a', index=False, header=False)
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_CUT_RPEAK_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
|
||||
@ -129,13 +129,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.ORGBCG_RAW +
|
||||
str(self.ui.spinBox_input_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_ORGBCG_TEXT /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.BCG_FILTER +
|
||||
str(self.ui.spinBox_output_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
elif self.mode == "ECG":
|
||||
self.ui.plainTextEdit_file_path_input.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
@ -144,13 +137,6 @@ class SettingWindow(QMainWindow):
|
||||
Path(Filename.ECG_RAW +
|
||||
str(self.ui.spinBox_input_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
self.ui.plainTextEdit_file_path_save.setPlainText(
|
||||
str((Path(self.root_path) /
|
||||
Filename.PATH_PSG_TEXT /
|
||||
Path(str(self.sampID)) /
|
||||
Path(Filename.ECG_FILTER +
|
||||
str(self.ui.spinBox_output_freq.value()) +
|
||||
Params.ENDSWITH_TXT))))
|
||||
else:
|
||||
raise ValueError("模式不存在")
|
||||
|
||||
@ -366,14 +352,17 @@ class MainWindow_preprocess(QMainWindow):
|
||||
|
||||
total_rows = len(DataFrame(self.data.processed_data.reshape(-1)))
|
||||
chunk_size = Params.PREPROCESS_SAVE_CHUNK_SIZE
|
||||
with open(Config["Path"]["Save"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.processed_data.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
try:
|
||||
with open(Config["Path"]["Save"], 'w') as f:
|
||||
for start in range(0, total_rows, chunk_size):
|
||||
end = min(start + chunk_size, total_rows)
|
||||
chunk = DataFrame(self.data.processed_data.reshape(-1)).iloc[start:end]
|
||||
result = self.data.save(chunk)
|
||||
progress = int((end / total_rows) * 100)
|
||||
self.progressbar.setValue(progress)
|
||||
QApplication.processEvents()
|
||||
except FileNotFoundError as e:
|
||||
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
@ -408,6 +397,7 @@ class Data:
|
||||
save = Filename.ECG_FILTER
|
||||
else:
|
||||
raise ValueError("模式不存在")
|
||||
|
||||
if Path(Config["Path"]["Input"]).is_file():
|
||||
Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
|
||||
|
||||
@ -494,8 +484,6 @@ class Data:
|
||||
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False, float_format='%.4f')
|
||||
except PermissionError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
|
||||
except FileNotFoundError as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
|
||||
except Exception as e:
|
||||
return Result().failure(info=Constants.SAVE_FAILURE +
|
||||
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
|
||||
|
||||
@ -43,7 +43,8 @@ ButtonState = {
|
||||
"pushButton_invalid": False,
|
||||
"pushButton_reset": False,
|
||||
"pushButton_prev": False,
|
||||
"pushButton_next": False
|
||||
"pushButton_next": False,
|
||||
"pushButton_save": False
|
||||
},
|
||||
"Current": {
|
||||
"pushButton_input_setting": True,
|
||||
@ -57,7 +58,8 @@ ButtonState = {
|
||||
"pushButton_invalid": False,
|
||||
"pushButton_reset": False,
|
||||
"pushButton_prev": False,
|
||||
"pushButton_next": False
|
||||
"pushButton_next": False,
|
||||
"pushButton_save": False
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,6 +278,7 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
self.ui.pushButton_input_and_label.clicked.connect(self.__slot_btn_input_and_label__)
|
||||
self.ui.pushButton_autoqualitylabel_recalculate.clicked.connect(self.__slot_btn_autoqualitylabel_recalculate__)
|
||||
self.ui.pushButton_refilter_orgBcg.clicked.connect(self.__slot_btn_refilter_orgBcg__)
|
||||
self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__)
|
||||
self.ui.pushButton_prev.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.pushButton_next.clicked.connect(self.__slot_btn_move__)
|
||||
self.ui.tableWidget_labeled.cellDoubleClicked.connect(self.__slot_tableWidget_on_cell_double_clicked__)
|
||||
@ -573,6 +576,7 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
ButtonState["Current"]["pushButton_reset"] = False
|
||||
ButtonState["Current"]["pushButton_prev"] = False
|
||||
ButtonState["Current"]["pushButton_next"] = False
|
||||
ButtonState["Current"]["pushButton_save"] = False
|
||||
for action in self.figToolbar._actions.values():
|
||||
action.setEnabled(True)
|
||||
self.figToolbar.action_Label_Multiple.setEnabled(False)
|
||||
@ -619,6 +623,7 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
ButtonState["Current"]["pushButton_reset"] = False
|
||||
ButtonState["Current"]["pushButton_prev"] = False
|
||||
ButtonState["Current"]["pushButton_next"] = False
|
||||
ButtonState["Current"]["pushButton_save"] = False
|
||||
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
@ -740,6 +745,7 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
ButtonState["Current"]["pushButton_reset"] = True
|
||||
ButtonState["Current"]["pushButton_prev"] = True
|
||||
ButtonState["Current"]["pushButton_next"] = True
|
||||
ButtonState["Current"]["pushButton_save"] = True
|
||||
for action in self.figToolbar._actions.values():
|
||||
action.setEnabled(True)
|
||||
for action in self.figToolbar_spectrum._actions.values():
|
||||
@ -824,6 +830,35 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_save__(self):
|
||||
PublicFunc.__disableAllButton__(self, ButtonState)
|
||||
|
||||
# 保存
|
||||
PublicFunc.progressbar_update(self, 1, 2, Constants.SAVING_DATA, 0)
|
||||
result = self.data.save_resp_quality_label()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(1/2)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(1/2)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
# 保存
|
||||
PublicFunc.progressbar_update(self, 2, 2, Constants.SAVING_DATA, 50)
|
||||
result = self.data.save_tho_peak()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
info = f"{Filename.RESP_QUALITY_LABEL}和{Filename.THO_PEAK}保存成功"
|
||||
PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
|
||||
def __slot_btn_move__(self):
|
||||
sender = self.sender()
|
||||
|
||||
@ -944,6 +979,12 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
self.data.resp_quality_label[Config["CurrentPartNum"] - 1] = -1
|
||||
else:
|
||||
raise ValueError("发射信号不存在")
|
||||
PublicFunc.text_output(self.ui, str(Config["CurrentPartNum"]) +
|
||||
Constants.RESP_QUALITY_LABEL_LABEL_SUCCESSFULLY +
|
||||
"," + Constants.RESP_QUALITY_LABEL_LABEL_TYPE +
|
||||
Constants.RESP_QUALITY_LABEL_KEY_VALUE[
|
||||
self.data.resp_quality_label[Config["CurrentPartNum"] - 1]],
|
||||
Constants.TIPS_TYPE_INFO)
|
||||
result = self.data.save_resp_quality_label()
|
||||
self.update_tableWidget()
|
||||
if not result.status:
|
||||
@ -953,11 +994,6 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
return
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
|
||||
PublicFunc.text_output(self.ui, str(Config["CurrentPartNum"]) +
|
||||
Constants.RESP_QUALITY_LABEL_LABEL_SUCCESSFULLY +
|
||||
"," + Constants.RESP_QUALITY_LABEL_LABEL_TYPE +
|
||||
Constants.RESP_QUALITY_LABEL_KEY_VALUE[self.data.resp_quality_label[Config["CurrentPartNum"] - 1]],
|
||||
Constants.TIPS_TYPE_INFO)
|
||||
|
||||
def __slot_lineEdit_filter__(self, filter_text):
|
||||
sender = self.sender()
|
||||
@ -1212,12 +1248,12 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
|
||||
result = self.data.save_tho_peak()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
PublicFunc.finish_operation(self, ButtonState)
|
||||
return
|
||||
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
|
||||
else:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
|
||||
info = result.info
|
||||
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
|
||||
|
||||
# 移除矩形patch
|
||||
if self.figToolbar.rect_patch_ax1 is not None:
|
||||
@ -1276,10 +1312,6 @@ class Data():
|
||||
Config["Path"]["Input_Tho"] = str(Path(Config["Path"]["Input_Tho"]).parent)
|
||||
if Path(Config["Path"]["Input_Artifact"]).is_file():
|
||||
Config["Path"]["Input_Artifact"] = str(Path(Config["Path"]["Input_Artifact"]).parent)
|
||||
if Path(Config["Path"]["Save_Resp_quality_label"]).is_file():
|
||||
Config["Path"]["Save_Resp_quality_label"] = str(Path(Config["Path"]["Save_Resp_quality_label"]).parent)
|
||||
if Path(Config["Path"]["Save_Tho_peak"]).is_file():
|
||||
Config["Path"]["Save_Tho_peak"] = str(Path(Config["Path"]["Save_Tho_peak"]).parent)
|
||||
|
||||
result = PublicFunc.examine_file(Config["Path"]["Input_Tho"], Filename.THO_SYNC, Params.ENDSWITH_TXT)
|
||||
if result.status:
|
||||
@ -1371,10 +1403,6 @@ class Data():
|
||||
Config["Path"]["Input_Tho"] = str(Path(Config["Path"]["Input_Tho"]).parent)
|
||||
if Path(Config["Path"]["Input_Artifact"]).is_file():
|
||||
Config["Path"]["Input_Artifact"] = str(Path(Config["Path"]["Input_Artifact"]).parent)
|
||||
if Path(Config["Path"]["Save_Resp_quality_label"]).is_file():
|
||||
Config["Path"]["Save_Resp_quality_label"] = str(Path(Config["Path"]["Save_Resp_quality_label"]).parent)
|
||||
if Path(Config["Path"]["Save_Tho_peak"]).is_file():
|
||||
Config["Path"]["Save_Tho_peak"] = str(Path(Config["Path"]["Save_Tho_peak"]).parent)
|
||||
|
||||
result = PublicFunc.examine_file(Config["Path"]["Input_OrgBCG"], Filename.ORGBCG_SYNC, Params.ENDSWITH_TXT)
|
||||
if result.status:
|
||||
|
||||
@ -159,8 +159,8 @@ class Params:
|
||||
"Freq": 1000
|
||||
},
|
||||
"Filter": {
|
||||
"BandPassLow": 2,
|
||||
"BandPassHigh": 15
|
||||
"BandPassLow": 1,
|
||||
"BandPassHigh": 25
|
||||
},
|
||||
"PeaksValue": 200,
|
||||
"DetectMethod": ""
|
||||
|
||||
@ -105,13 +105,15 @@ class Constants:
|
||||
"Align_Label_SALabel_Format_not_Correct": "(映射标签时SA Label中的文件格式不正确)",
|
||||
"Filename_Format_not_Correct": "(文件名格式不正确)",
|
||||
"Method_Not_Exist": "(检测方法不存在)",
|
||||
"Data_Length_not_Correct": "(orgBcg和BCG长度不匹配)",
|
||||
"Data_Length_not_Correct": "(OrgBCG和BCG长度不匹配)",
|
||||
"Artifact_Format_Not_Correct": "(体动长度或格式不正确)",
|
||||
"Data_Length_Not_Correct": "(信号长度不正确)",
|
||||
"Filter_Args_Not_Correct": "(滤波器参数输入不正确,上下截止频率都要大于0,且上截止频率应大于下截止频率)",
|
||||
"Interval_Args_Not_Correct": "(间期参数输入不正确,上间期阈值应大于下间期阈值)",
|
||||
"Save_Permission_Denied": "(所保存的文件正在被其他进程使用)",
|
||||
"Save_File_Not_Found": "(保存路径不存在)",
|
||||
"OrgBCG_Cut_Length_Not_Correct": "(OrgBCG的切割长度不正确,Pre+Post长度大于信号长度)",
|
||||
"PSG_Cut_Length_Not_Correct": "(PSG的切割长度不正确,Pre+Post长度大于信号长度)",
|
||||
|
||||
"Open_Data_Exception": "(打开数据异常)",
|
||||
"Process_Exception": "(处理异常)",
|
||||
@ -146,7 +148,7 @@ class Constants:
|
||||
"Label_Format_Exception": "(获取标签格式异常)",
|
||||
"Calculate_Peak_Exception": "(计算峰值异常)",
|
||||
|
||||
"res_orgBcg_Not_Exist": "(切割后orgBcg不存在)",
|
||||
"res_orgBcg_Not_Exist": "(切割后OrgBCG不存在)",
|
||||
"res_BCG_Not_Exist": "(切割后BCG不存在)",
|
||||
"cut_ECG_Not_Exist": "(切割后ECG不存在)",
|
||||
"cut_Jpeak_Not_Exist": "(切割后J峰不存在)",
|
||||
@ -287,9 +289,9 @@ class Constants:
|
||||
PRECISELY_ALIGN_SAVING_ALIGNINFO_FINISHED: str = "保存对齐信息完成"
|
||||
PRECISELY_ALIGN_SAVING_ALIGNINFO_FAILURE: str = "保存对齐信息失败"
|
||||
|
||||
PRECISELY_ALIGN_SAVING_RES_ORGBCG: str = "正在保存切割后orgBcg"
|
||||
PRECISELY_ALIGN_SAVING_RES_ORGBCG_FINISHED: str = "保存切割后orgBcg完成"
|
||||
PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE: str = "保存切割后orgBcg失败"
|
||||
PRECISELY_ALIGN_SAVING_RES_ORGBCG: str = "正在保存切割后OrgBCG"
|
||||
PRECISELY_ALIGN_SAVING_RES_ORGBCG_FINISHED: str = "保存切割后OrgBCG完成"
|
||||
PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE: str = "保存切割后OrgBCG失败"
|
||||
|
||||
PRECISELY_ALIGN_SAVING_RES_BCG: str = "正在保存切割后BCG"
|
||||
PRECISELY_ALIGN_SAVING_RES_BCG_FINISHED: str = "保存切割后BCG完成"
|
||||
|
||||
@ -389,6 +389,17 @@ class Ui_MainWindow_artifact_label(object):
|
||||
|
||||
self.verticalLayout_2.addItem(self.verticalSpacer_3)
|
||||
|
||||
self.pushButton_save = QPushButton(self.groupBox_left)
|
||||
self.pushButton_save.setObjectName(u"pushButton_save")
|
||||
sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
|
||||
sizePolicy4.setHorizontalStretch(0)
|
||||
sizePolicy4.setVerticalStretch(0)
|
||||
sizePolicy4.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_save.setSizePolicy(sizePolicy4)
|
||||
self.pushButton_save.setFont(font1)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.pushButton_save)
|
||||
|
||||
self.groupBox_4 = QGroupBox(self.groupBox_left)
|
||||
self.groupBox_4.setObjectName(u"groupBox_4")
|
||||
self.verticalLayout_6 = QVBoxLayout(self.groupBox_4)
|
||||
@ -407,6 +418,8 @@ class Ui_MainWindow_artifact_label(object):
|
||||
self.verticalLayout_2.setStretch(3, 1)
|
||||
self.verticalLayout_2.setStretch(4, 6)
|
||||
self.verticalLayout_2.setStretch(5, 1)
|
||||
self.verticalLayout_2.setStretch(6, 1)
|
||||
self.verticalLayout_2.setStretch(7, 3)
|
||||
|
||||
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
|
||||
|
||||
@ -448,9 +461,6 @@ class Ui_MainWindow_artifact_label(object):
|
||||
|
||||
self.pushButton_type_1 = QPushButton(self.groupBox_right)
|
||||
self.pushButton_type_1.setObjectName(u"pushButton_type_1")
|
||||
sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
|
||||
sizePolicy4.setHorizontalStretch(0)
|
||||
sizePolicy4.setVerticalStretch(0)
|
||||
sizePolicy4.setHeightForWidth(self.pushButton_type_1.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_type_1.setSizePolicy(sizePolicy4)
|
||||
font2 = QFont()
|
||||
@ -708,6 +718,7 @@ class Ui_MainWindow_artifact_label(object):
|
||||
self.label_7.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u8ddd\u79bb", None))
|
||||
self.label_6.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u6700\u5927\u8303\u56f4", None))
|
||||
self.label_8.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
|
||||
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u624b\u52a8\u4fdd\u5b58", None))
|
||||
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u65e5\u5fd7", None))
|
||||
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u64cd\u4f5c\u548c\u4fe1\u606f", None))
|
||||
self.pushButton_type_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5267\u70c8\u4f53\u52a8", None))
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<property name="title">
|
||||
<string>体动标注</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,3,1,6,1,0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,3,1,6,1,1,3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -676,6 +676,24 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_save">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>手动保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
|
||||
@ -312,6 +312,14 @@ class Ui_MainWindow_bcg_quality_label(object):
|
||||
|
||||
self.verticalLayout_2.addItem(self.verticalSpacer_3)
|
||||
|
||||
self.pushButton_save = QPushButton(self.groupBox_left)
|
||||
self.pushButton_save.setObjectName(u"pushButton_save")
|
||||
sizePolicy2.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_save.setSizePolicy(sizePolicy2)
|
||||
self.pushButton_save.setFont(font1)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.pushButton_save)
|
||||
|
||||
self.groupBox_4 = QGroupBox(self.groupBox_left)
|
||||
self.groupBox_4.setObjectName(u"groupBox_4")
|
||||
self.verticalLayout_6 = QVBoxLayout(self.groupBox_4)
|
||||
@ -332,7 +340,8 @@ class Ui_MainWindow_bcg_quality_label(object):
|
||||
self.verticalLayout_2.setStretch(5, 1)
|
||||
self.verticalLayout_2.setStretch(6, 6)
|
||||
self.verticalLayout_2.setStretch(7, 1)
|
||||
self.verticalLayout_2.setStretch(8, 5)
|
||||
self.verticalLayout_2.setStretch(8, 2)
|
||||
self.verticalLayout_2.setStretch(9, 5)
|
||||
|
||||
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
|
||||
|
||||
@ -525,6 +534,7 @@ class Ui_MainWindow_bcg_quality_label(object):
|
||||
self.pushButton_next.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u">(D)", None))
|
||||
self.label.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u8f93\u5165\u5907\u6ce8", None))
|
||||
self.checkBox_display_afterfilter.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u53bb\u9664\u5de5\u9891\u566a\u58f0", None))
|
||||
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u624b\u52a8\u4fdd\u5b58", None))
|
||||
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u65e5\u5fd7", None))
|
||||
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u6807\u7b7e\u8bb0\u5f55", None))
|
||||
self.pushButton_b1.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"b1", None))
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<property name="title">
|
||||
<string>BCG的质量标注</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1,4,1,6,1,6,1,5">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1,4,1,6,1,6,1,2,5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -533,6 +533,24 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_save">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>手动保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
|
||||
@ -357,6 +357,17 @@ class Ui_MainWindow_label_check(object):
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.checkBox_show_reference_line)
|
||||
|
||||
self.pushButton_save = QPushButton(self.groupBox_left)
|
||||
self.pushButton_save.setObjectName(u"pushButton_save")
|
||||
sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
|
||||
sizePolicy3.setHorizontalStretch(0)
|
||||
sizePolicy3.setVerticalStretch(0)
|
||||
sizePolicy3.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_save.setSizePolicy(sizePolicy3)
|
||||
self.pushButton_save.setFont(font1)
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.pushButton_save)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
|
||||
|
||||
@ -513,6 +524,7 @@ class Ui_MainWindow_label_check(object):
|
||||
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_show_reference_line.setText(QCoreApplication.translate("MainWindow_label_check", u"\u7ed8\u5236\u53c2\u8003\u7ebf", None))
|
||||
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_label_check", u"\u624b\u52a8\u4fdd\u5b58", 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))
|
||||
|
||||
@ -619,6 +619,24 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_save">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>手动保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@ -404,6 +404,12 @@ class Ui_MainWindow_resp_quality_label(object):
|
||||
|
||||
self.gridLayout_8.addWidget(self.pushButton_next, 1, 2, 1, 1)
|
||||
|
||||
self.pushButton_save = QPushButton(self.groupBox_label_operation)
|
||||
self.pushButton_save.setObjectName(u"pushButton_save")
|
||||
self.pushButton_save.setFont(font1)
|
||||
|
||||
self.gridLayout_8.addWidget(self.pushButton_save, 1, 0, 1, 1)
|
||||
|
||||
|
||||
self.gridLayout_7.addLayout(self.gridLayout_8, 2, 0, 1, 2)
|
||||
|
||||
@ -552,6 +558,7 @@ class Ui_MainWindow_resp_quality_label(object):
|
||||
self.pushButton_valid.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u53ef\u7528\uff08F\uff09", None))
|
||||
self.pushButton_prev.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0a\u4e00\u6bb5(A)", None))
|
||||
self.pushButton_next.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0b\u4e00\u6bb5(D)", None))
|
||||
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u624b\u52a8\u4fdd\u5b58", None))
|
||||
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u65e5\u5fd7", None))
|
||||
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u547c\u5438\u53ef\u7528\u6027\u53ca\u95f4\u671f\u6807\u6ce8", None))
|
||||
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u9891\u8c31", None))
|
||||
|
||||
@ -725,6 +725,18 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_save">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>手动保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user