将窗口显示方式修改为默认最大化,提升用户体验

This commit is contained in:
marques
2025-05-15 15:16:33 +08:00
parent f71289bb4c
commit 0be88d9be7

View File

@ -114,6 +114,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.approximately_align.show(root_path, int(sampID)) self.approximately_align.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.approximately_align.showMaximized()
def __slot_btn_preprocess__(self): def __slot_btn_preprocess__(self):
self.preprocess = MainWindow_preprocess() self.preprocess = MainWindow_preprocess()
@ -132,6 +134,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.preprocess.show(mode, root_path, int(sampID)) self.preprocess.show(mode, root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.preprocess.showMaximized()
def __slot_btn_detect_Jpeak__(self): def __slot_btn_detect_Jpeak__(self):
self.detect_Jpeak = MainWindow_detect_Jpeak() self.detect_Jpeak = MainWindow_detect_Jpeak()
@ -142,6 +146,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.detect_Jpeak.show(root_path, int(sampID)) self.detect_Jpeak.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.detect_Jpeak.showMaximized()
def __slot_btn_detect_Rpeak__(self): def __slot_btn_detect_Rpeak__(self):
self.detect_Rpeak = MainWindow_detect_Rpeak() self.detect_Rpeak = MainWindow_detect_Rpeak()
@ -152,6 +158,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.detect_Rpeak.show(root_path, int(sampID)) self.detect_Rpeak.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.detect_Rpeak.showMaximized()
def __slot_btn_label_check__(self): def __slot_btn_label_check__(self):
self.label_check = MainWindow_label_check() self.label_check = MainWindow_label_check()
@ -172,6 +180,9 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
else: else:
raise ValueError("模式不存在") raise ValueError("模式不存在")
self.label_check.show(mode, root_path, int(sampID)) self.label_check.show(mode, root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.label_check.showMaximized()
def __slot_btn_precisely_align__(self): def __slot_btn_precisely_align__(self):
self.precisely_align = MainWindow_precisely_align() self.precisely_align = MainWindow_precisely_align()
@ -182,6 +193,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.precisely_align.show(root_path, int(sampID)) self.precisely_align.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.precisely_align.showMaximized()
def __slot_btn_cut_PSG__(self): def __slot_btn_cut_PSG__(self):
self.cut_PSG = MainWindow_cut_PSG() self.cut_PSG = MainWindow_cut_PSG()
@ -192,6 +205,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.cut_PSG.show(root_path, int(sampID)) self.cut_PSG.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.cut_PSG.showMaximized()
def __slot_btn_artifact_label__(self): def __slot_btn_artifact_label__(self):
self.artifact_label = MainWindow_artifact_label() self.artifact_label = MainWindow_artifact_label()
@ -202,6 +217,8 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.artifact_label.show(root_path, int(sampID)) self.artifact_label.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.artifact_label.showMaximized()
def seek_sampID(self, path): def seek_sampID(self, path):
if not Path(path).exists(): if not Path(path).exists():
@ -211,6 +228,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
sub_folders = [item.name for item in Path(path).iterdir() if item.is_dir()] sub_folders = [item.name for item in Path(path).iterdir() if item.is_dir()]
self.ui.comboBox_sampID.addItems(sub_folders) self.ui.comboBox_sampID.addItems(sub_folders)
def check_root_path(self): def check_root_path(self):
if self.ui.plainTextEdit_root_path.toPlainText() == Constants.STRING_IS_EMPTY: if self.ui.plainTextEdit_root_path.toPlainText() == Constants.STRING_IS_EMPTY:
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_ROOT_PATH_NOT_EXIST, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, Constants.MAINWINDOW_ROOT_PATH_NOT_EXIST, Constants.MSGBOX_TYPE_ERROR)