Merge branch 'master' into cxh_dev

This commit is contained in:
marques
2025-06-11 10:12:23 +08:00
21 changed files with 466 additions and 166 deletions

View File

@ -322,6 +322,9 @@ class MainWindow_SA_label(QMainWindow):
self.figToolbar = None
self.gs = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
# 设定事件和其对应颜色
# event_code color event
# 0 黑色 背景
@ -479,6 +482,7 @@ class MainWindow_SA_label(QMainWindow):
self.ax6.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -498,19 +502,12 @@ class MainWindow_SA_label(QMainWindow):
sender = self.sender()
if sender == self.ui.pushButton_input:
try:
self.draw_one_event()
self.canvas.draw()
except Exception as e:
return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc())
elif sender == self.ui.tableWidget_label or sender == self.ui.tableWidget_label_add:
try:
self.draw_one_event()
self.canvas.draw()
except Exception as e:
return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc())
elif sender == self.ui.pushButton_prev or sender == self.ui.pushButton_next:
if (sender == self.ui.pushButton_input or
sender == self.ui.tableWidget_label or
sender == self.ui.tableWidget_label_add or
sender == self.ui.pushButton_prev or
sender == self.ui.pushButton_next or
sender == self.figToolbar.action_Reset_Signal_and_Time):
try:
self.draw_one_event()
self.canvas.draw()
@ -529,8 +526,6 @@ class MainWindow_SA_label(QMainWindow):
return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc())
return Result().success(info=Constants.DRAW_FINISHED)
def update_UI_Args(self):
try:
if self.data is not None and self.data.df_corrected is not None:
@ -628,11 +623,10 @@ class MainWindow_SA_label(QMainWindow):
if str(remark) != "" and str(remark) != "nan" and row.get("isLabeled", None) == 1:
for col in range(self.ui.tableWidget_label.columnCount()):
item = self.ui.tableWidget_label.item(index, col)
item.setBackground(QColor(255, 200, 200))
item.setBackground(QColor(255, 200, 200, 128))
else:
for col in range(self.ui.tableWidget_label.columnCount()):
item = self.ui.tableWidget_label.item(index, col)
item.setBackground(QColor(255, 255, 255))
if self.data.df_addNew is not None:
self.ui.tableWidget_label_add.setRowCount(len(self.data.df_addNew))
@ -675,11 +669,10 @@ class MainWindow_SA_label(QMainWindow):
if str(remark) != Constants.STRING_IS_EMPTY and str(remark) != Constants.STRING_IS_NAN and row.get("isLabeled", None) == 1:
for col in range(self.ui.tableWidget_label_add.columnCount()):
item = self.ui.tableWidget_label_add.item(index, col)
item.setBackground(QColor(255, 200, 200))
item.setBackground(QColor(255, 200, 200, 128))
else:
for col in range(self.ui.tableWidget_label_add.columnCount()):
item = self.ui.tableWidget_label_add.item(index, col)
item.setBackground(QColor(255, 255, 255))
except Exception as e:
return Result().failure(info=Constants.UPDATE_FAILURE +
Constants.FAILURE_REASON["Update_tableWidget_Exception"] + "\n" + format_exc())
@ -800,6 +793,7 @@ class MainWindow_SA_label(QMainWindow):
PublicFunc.msgbox_output(self, Constants.SA_LABEL_ALL_LABELED, Constants.MSGBOX_TYPE_INFO)
self.__reset__()
self.setting.close()
self.figToolbar.action_Reset_Signal_and_Time.setEnabled(True)
for action in self.figToolbar._actions.values():
action.setEnabled(True)
@ -1115,10 +1109,14 @@ class MainWindow_SA_label(QMainWindow):
PublicFunc.finish_operation(self, ButtonState)
def toggle_resetOriginalView(self):
self.figToolbar.home()
self.figToolbar.action_Reset_Signal_and_Time.setChecked(False)
self.ui.spinBox_correctStart.setValue(Config["BCG_SP"])
self.ui.spinBox_correctEnd.setValue(Config["BCG_EP"])
if self.ui.checkBox_examineBySecond.isChecked():
self.__plot__()
self.update_UI_Args()
else:
self.figToolbar.home()
self.figToolbar.action_Reset_Signal_and_Time.setChecked(False)
self.ui.spinBox_correctStart.setValue(Config["BCG_SP"])
self.ui.spinBox_correctEnd.setValue(Config["BCG_EP"])
def reset_axes(self):
if self.ax0 is not None:

View File

@ -3,6 +3,7 @@ from pathlib import Path
from traceback import format_exc
import matplotlib.pyplot as plt
from PySide6.QtCore import QEvent
from PySide6.QtWidgets import QMessageBox, QMainWindow, QApplication
from matplotlib.backends.backend_qt import NavigationToolbar2QT
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas
@ -251,6 +252,9 @@ class MainWindow_approximately_align(QMainWindow):
self.fig = None
self.canvas = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -295,7 +299,6 @@ class MainWindow_approximately_align(QMainWindow):
self.ui.radioButton_freqTHO.clicked.connect(self.__EstimateFrequencySelect__)
self.ui.radioButton_freqABD.clicked.connect(self.__EstimateFrequencySelect__)
@overrides
def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
@ -306,6 +309,7 @@ class MainWindow_approximately_align(QMainWindow):
QApplication.processEvents()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -418,6 +422,7 @@ class MainWindow_approximately_align(QMainWindow):
self.ui.label_orgBcg_length.setText(str(orgBcg_seconds))
self.ui.label_PSG_length.setText(str(PSG_seconds))
self.__reset__()
self.setting.close()
PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_save__(self):

View File

@ -228,6 +228,9 @@ class MainWindow_artifact_label(QMainWindow):
}
})
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -265,6 +268,8 @@ class MainWindow_artifact_label(QMainWindow):
self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
self.reset_labelBtn_color()
PublicFunc.__resetAllButton__(self, ButtonState)
self.ui.spinBox_moveLength.setValue(Config["CustomAutoplayArgs"]["MoveLength"])
@ -332,6 +337,7 @@ class MainWindow_artifact_label(QMainWindow):
self.ax1.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -396,74 +402,74 @@ class MainWindow_artifact_label(QMainWindow):
# 绘制体动
for i in range(0, len(self.data.df_Artifact_a)):
if self.data.df_Artifact_a.iloc[i][1] == 1:
# 橙色,剧烈体动
# 橙色orange,剧烈体动
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_DEEP_YELLOW)
color="#ffa500")
self.rectangles_ax0_patches.append(rectangle)
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_DEEP_YELLOW)
color="#ffa500")
self.rectangles_ax1_patches.append(rectangle)
elif self.data.df_Artifact_a.iloc[i][1] == 2:
# 黄色,脉冲体动
# 黄色yellow,脉冲体动
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_YELLOW)
color="#ffff00")
self.rectangles_ax0_patches.append(rectangle)
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_YELLOW)
color="#ffff00")
self.rectangles_ax1_patches.append(rectangle)
elif self.data.df_Artifact_a.iloc[i][1] == 3:
# 青色,常规体动
# 草绿色limegreen,常规体动
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_AQUA)
color="#32cd32")
self.rectangles_ax0_patches.append(rectangle)
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_AQUA)
color="#32cd32")
self.rectangles_ax1_patches.append(rectangle)
elif self.data.df_Artifact_a.iloc[i][1] == 4:
# 紫色,疑似鼾声
# 青色cyan,疑似鼾声
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_PURPLE_PINK)
color="#00ffff")
self.rectangles_ax0_patches.append(rectangle)
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_PURPLE_PINK)
color="#00ffff")
self.rectangles_ax1_patches.append(rectangle)
elif self.data.df_Artifact_a.iloc[i][1] == 5:
# 灰色,离床
# 品红色magenta,离床
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_DEEP_GREY)
color="#ff00ff")
self.rectangles_ax0_patches.append(rectangle)
rectangle = patches.Rectangle((self.data.df_Artifact_a.iloc[i][2], self.rect_down),
width=(self.data.df_Artifact_a.iloc[i][3] - self.data.df_Artifact_a.iloc[i][2]),
height=self.rect_up - self.rect_down,
fill=True, alpha=Params.ARTIFACT_LABEL_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_DEEP_GREY)
color="#ff00ff")
self.rectangles_ax1_patches.append(rectangle)
for patch in self.rectangles_ax0_patches:
self.ax0.add_patch(patch)
@ -665,6 +671,7 @@ class MainWindow_artifact_label(QMainWindow):
PublicFunc.text_output(self.ui, "(6/6)" + result.info, Constants.TIPS_TYPE_INFO)
self.__reset__()
self.setting.close()
self.figToolbar.action_Label_Artifact.setEnabled(True)
for action in self.figToolbar._actions.values():
action.setEnabled(True)
@ -948,6 +955,7 @@ class MainWindow_artifact_label(QMainWindow):
self.update_tableWidget()
self.update_Info()
self.__plot_artifact__()
self.reset_labelBtn_color()
target_row = self.data.df_Artifact_a[self.data.df_Artifact_a.eq(start_time).any(axis=1)]
if not target_row.empty:
@ -1191,45 +1199,45 @@ class MainWindow_artifact_label(QMainWindow):
if type == 1:
self.ui.pushButton_type_1.setStyleSheet(
Constants.ARTIFACT_LABEL_LABELBTN_STYLE_1)
self.ui.pushButton_type_2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_3.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_4.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_5.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_3.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_4.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_5.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif type == 2:
self.ui.pushButton_type_1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_2.setStyleSheet(
Constants.ARTIFACT_LABEL_LABELBTN_STYLE_2)
self.ui.pushButton_type_3.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_4.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_5.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_3.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_4.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_5.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif type == 3:
self.ui.pushButton_type_1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_3.setStyleSheet(
Constants.ARTIFACT_LABEL_LABELBTN_STYLE_3)
self.ui.pushButton_type_4.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_5.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_4.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_5.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif type == 4:
self.ui.pushButton_type_1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_3.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_3.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_4.setStyleSheet(
Constants.ARTIFACT_LABEL_LABELBTN_STYLE_4)
self.ui.pushButton_type_5.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_5.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif type == 5:
self.ui.pushButton_type_1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_3.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_4.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_3.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_4.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_5.setStyleSheet(
Constants.ARTIFACT_LABEL_LABELBTN_STYLE_5)
def reset_labelBtn_color(self):
self.ui.pushButton_type_1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_3.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_4.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_5.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_type_1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_3.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_4.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_type_5.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
def toggle_home(self):
if Config["AutoplayArgs"]["AutoplayMode"] != "pause":

View File

@ -194,6 +194,9 @@ class MainWindow_bcg_quality_label(QMainWindow):
self.line_data = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -289,6 +292,7 @@ class MainWindow_bcg_quality_label(QMainWindow):
self.ax0.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -478,6 +482,7 @@ class MainWindow_bcg_quality_label(QMainWindow):
self.update_tableWidget()
self.update_status()
self.change_labelBtn_color()
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_invalid_signal_label"] = True
@ -837,10 +842,9 @@ class MainWindow_bcg_quality_label(QMainWindow):
value - 1]) != Constants.STRING_IS_EMPTY and
str(self.data.df_label[Constants.BCG_QUALITY_LABEL_COLUMN_REMARK][value - 1]) != Constants.STRING_IS_NAN):
item = tableWidget.item(row, 0)
item.setBackground(QColor(255, 200, 200))
item.setBackground(QColor(255, 200, 200, 128))
else:
item = tableWidget.item(row, 0)
item.setBackground(QColor(255, 255, 255))
self.ui.tableWidget_a1.verticalScrollBar().setValue(self.ui.tableWidget_a1.verticalScrollBar().maximum())
self.ui.tableWidget_a2.verticalScrollBar().setValue(self.ui.tableWidget_a2.verticalScrollBar().maximum())
self.ui.tableWidget_b1.verticalScrollBar().setValue(self.ui.tableWidget_b2.verticalScrollBar().maximum())
@ -875,10 +879,9 @@ class MainWindow_bcg_quality_label(QMainWindow):
value - 1]) != Constants.STRING_IS_EMPTY and
str(self.data.df_label[Constants.BCG_QUALITY_LABEL_COLUMN_REMARK][value - 1]) != Constants.STRING_IS_NAN):
item = tableWidget.item(row, 0)
item.setBackground(QColor(255, 200, 200))
item.setBackground(QColor(255, 200, 200, 128))
else:
item = tableWidget.item(row, 0)
item.setBackground(QColor(255, 255, 255))
self.ui.tableWidget_a1.verticalScrollBar().setValue(self.ui.tableWidget_a1.verticalScrollBar().maximum())
self.ui.tableWidget_b1.verticalScrollBar().setValue(self.ui.tableWidget_b1.verticalScrollBar().maximum())
self.ui.tableWidget_c.verticalScrollBar().setValue(self.ui.tableWidget_c.verticalScrollBar().maximum())
@ -949,40 +952,40 @@ class MainWindow_bcg_quality_label(QMainWindow):
def change_labelBtn_color(self):
if self.data.df_label.at[Config["CurrentPartNum"] - 1, Constants.BCG_QUALITY_LABEL_COLUMN_LABEL] == "a1":
self.ui.pushButton_a1.setStyleSheet(Constants.BCG_QUALITY_LABEL_LABELBTN_STYLE)
self.ui.pushButton_a2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_c.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_c.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif self.data.df_label.at[Config["CurrentPartNum"] - 1, Constants.BCG_QUALITY_LABEL_COLUMN_LABEL] == "a2":
self.ui.pushButton_a1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_a2.setStyleSheet(Constants.BCG_QUALITY_LABEL_LABELBTN_STYLE)
self.ui.pushButton_b1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_c.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_c.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif self.data.df_label.at[Config["CurrentPartNum"] - 1, Constants.BCG_QUALITY_LABEL_COLUMN_LABEL] == "b1":
self.ui.pushButton_a1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_a2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b1.setStyleSheet(Constants.BCG_QUALITY_LABEL_LABELBTN_STYLE)
self.ui.pushButton_b2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_c.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_c.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif self.data.df_label.at[Config["CurrentPartNum"] - 1, Constants.BCG_QUALITY_LABEL_COLUMN_LABEL] == "b2":
self.ui.pushButton_a1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_a2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b2.setStyleSheet(Constants.BCG_QUALITY_LABEL_LABELBTN_STYLE)
self.ui.pushButton_c.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_c.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
elif self.data.df_label.at[Config["CurrentPartNum"] - 1, Constants.BCG_QUALITY_LABEL_COLUMN_LABEL] == "c1":
self.ui.pushButton_a1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_a2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_c.setStyleSheet(Constants.BCG_QUALITY_LABEL_LABELBTN_STYLE)
elif self.data.df_label.at[Config["CurrentPartNum"] - 1, Constants.BCG_QUALITY_LABEL_COLUMN_LABEL] == "f1":
self.ui.pushButton_a1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b1.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_b2.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_c.setStyleSheet(Constants.STRING_IS_EMPTY)
self.ui.pushButton_a1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_a2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b1.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_b2.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
self.ui.pushButton_c.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
class Data():

View File

@ -46,6 +46,9 @@ class MainWindow_cut_PSG(QMainWindow):
self.data = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
# 初始化进度条
self.ui.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.progressbar = self.ui.progressbar

View File

@ -156,6 +156,9 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.gs = None
self.ax0 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -219,6 +222,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.ax0.clear()
# 释放资源
self.setting.close()
del self.data
del self.model
self.fig.clf()
@ -303,6 +307,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
else:
PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_INFO)
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_view"] = True

View File

@ -154,6 +154,9 @@ class MainWindow_detect_Rpeak(QMainWindow):
self.ax0 = None
self.ax1 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -215,6 +218,7 @@ class MainWindow_detect_Rpeak(QMainWindow):
self.ax1.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -301,6 +305,7 @@ class MainWindow_detect_Rpeak(QMainWindow):
else:
PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_INFO)
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_view"] = True

View File

@ -249,6 +249,9 @@ class MainWindow_label_check(QMainWindow):
self.point_peak_corrected = None
self.annotation_tableWidget = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
# 初始化自动播放定时器
self.autoplay_xlim_start = None
self.autoplay_xlim_end = None
@ -356,6 +359,7 @@ class MainWindow_label_check(QMainWindow):
self.ax1.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -553,6 +557,7 @@ class MainWindow_label_check(QMainWindow):
PublicFunc.text_output(self.ui, "(7/7)" + result.info, Constants.TIPS_TYPE_INFO)
self.__reset__()
self.setting.close()
self.canvas.mpl_connect("motion_notify_event", self.on_motion)
self.figToolbar.action_Label_Multiple.setEnabled(True)
for action in self.figToolbar._actions.values():

View File

@ -1,6 +1,8 @@
from pathlib import Path
from traceback import format_exc
from PySide6.QtWidgets import QMainWindow, QMessageBox, QFileDialog
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QMainWindow, QMessageBox, QFileDialog, QApplication, QWidget
from PySide6.QtGui import QGuiApplication
from matplotlib import use
from yaml import dump, load, FullLoader
@ -25,12 +27,53 @@ from func.utils.Constants import Constants
use("QtAgg")
# style.use('dark_background')
# rcParams.update({
# 'figure.facecolor': '#f5f5dc',
# 'axes.facecolor': '#f5f5dc'
# })
Config = {
}
ButtonState = {
"Default": {
"pushButton_open": True,
"pushButton_approximately_align": True,
"pushButton_preprocess_BCG": True,
"pushButton_preprocess_ECG": True,
"pushButton_detect_Jpeak": True,
"pushButton_detect_Rpeak": True,
"pushButton_label_check_BCG": True,
"pushButton_label_check_ECG": True,
"pushButton_precisely_align": True,
"pushButton_cut_PSG": True,
"pushButton_artifact_label": True,
"pushButton_bcg_quality_label": True,
"pushButton_resp_quality_label": True,
"pushButton_SA_label": True
},
"Current": {
"pushButton_open": True,
"pushButton_approximately_align": True,
"pushButton_preprocess_BCG": True,
"pushButton_preprocess_ECG": True,
"pushButton_detect_Jpeak": True,
"pushButton_detect_Rpeak": True,
"pushButton_label_check_BCG": True,
"pushButton_label_check_ECG": True,
"pushButton_precisely_align": True,
"pushButton_cut_PSG": True,
"pushButton_artifact_label": True,
"pushButton_bcg_quality_label": True,
"pushButton_resp_quality_label": True,
"pushButton_SA_label": True
}
}
class MainWindow(QMainWindow, Ui_Signal_Label):
@ -69,7 +112,18 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.resp_quality_label = None
self.SA_label = None
PublicFunc.__styleAllButton__(self, ButtonState)
try:
if QApplication.styleHints().colorScheme() == Qt.ColorScheme.Dark:
self.ui.checkBox_darkmode.setChecked(True)
else:
self.ui.checkBox_darkmode.setChecked(False)
except Exception as e:
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_GET_DARKMODE_FAILURE + "" + format_exc(), Constants.TIPS_TYPE_ERROR)
# 绑定槽函数
self.ui.checkBox_darkmode.stateChanged.connect(self.set_dark_mode_status)
self.ui.pushButton_open.clicked.connect(self.__slot_btn_open__)
self.ui.pushButton_approximately_align.clicked.connect(self.__slot_btn_approximately_align__)
self.ui.pushButton_preprocess_BCG.clicked.connect(self.__slot_btn_preprocess__)
@ -308,4 +362,86 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
for path in path_list:
if not path.exists():
path.mkdir(parents=True, exist_ok=True)
path.mkdir(parents=True, exist_ok=True)
def set_dark_mode_status(self):
try:
if self.ui.checkBox_darkmode.isChecked():
QApplication.styleHints().setColorScheme(Qt.ColorScheme.Dark)
else:
QApplication.styleHints().setColorScheme(Qt.ColorScheme.Light)
except Exception as e:
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_DARKMODE_FAILURE + "" + format_exc(), Constants.MSGBOX_TYPE_ERROR)
return
try:
MainWindow.update_widget_style(self)
except RuntimeError:
pass
try:
if self.approximately_align is not None:
MainWindow.update_widget_style(self.approximately_align)
except RuntimeError:
pass
try:
if self.preprocess is not None:
MainWindow.update_widget_style(self.preprocess)
except RuntimeError:
pass
try:
if self.detect_Jpeak is not None:
MainWindow.update_widget_style(self.detect_Jpeak)
except RuntimeError:
pass
try:
if self.detect_Rpeak is not None:
MainWindow.update_widget_style(self.detect_Rpeak)
except RuntimeError:
pass
try:
if self.label_check is not None:
MainWindow.update_widget_style(self.label_check)
except RuntimeError:
pass
try:
if self.precisely_align is not None:
MainWindow.update_widget_style(self.precisely_align)
except RuntimeError:
pass
try:
if self.cut_PSG is not None:
MainWindow.update_widget_style(self.cut_PSG)
except RuntimeError:
pass
try:
if self.artifact_label is not None:
MainWindow.update_widget_style(self.artifact_label)
except RuntimeError:
pass
try:
if self.bcg_quality_label is not None:
MainWindow.update_widget_style(self.bcg_quality_label)
except RuntimeError:
pass
try:
if self.resp_quality_label is not None:
MainWindow.update_widget_style(self.resp_quality_label)
except RuntimeError:
pass
try:
if self.SA_label is not None:
MainWindow.update_widget_style(self.SA_label)
except RuntimeError:
pass
@staticmethod
def update_widget_style(mainWindow):
all_widgets = mainWindow.centralWidget().findChildren(QWidget)
# 迭代所有部件
for widget in all_widgets:
try:
widget.style().unpolish(widget)
widget.style().polish(widget)
widget.update()
except TypeError:
pass

View File

@ -346,6 +346,9 @@ class MainWindow_precisely_align(QMainWindow):
self.ax4_xlime = None
self.ax4_ylime = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -434,6 +437,7 @@ class MainWindow_precisely_align(QMainWindow):
self.ax4.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -698,6 +702,7 @@ class MainWindow_precisely_align(QMainWindow):
else:
PublicFunc.text_output(self.ui, "(4/4)" + result.info, Constants.TIPS_TYPE_INFO)
self.setting.close()
self.figToolbar.action_Get_Range.setEnabled(True)
self.rect_down = min(self.ax0.get_ylim()[0], self.ax1.get_ylim()[0]) - 10000
self.rect_up = max(self.ax0.get_ylim()[1], self.ax1.get_ylim()[1]) + 10000
@ -716,6 +721,9 @@ class MainWindow_precisely_align(QMainWindow):
self.reset_axes()
self.canvas.draw()
self.data.correlation_align_point_match_ECG = array([]).astype(int)
self.data.correlation_align_point_match_BCG = array([]).astype(int)
# 处理数据
PublicFunc.progressbar_update(self, 1, 2, Constants.PRECISELY_ALIGN_PROCESSING_DATA, 50)
result = self.data.data_process_for_calculate_correlation()

View File

@ -191,6 +191,9 @@ class MainWindow_preprocess(QMainWindow):
self.gs = None
self.ax0 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -254,6 +257,7 @@ class MainWindow_preprocess(QMainWindow):
self.ax0.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -331,6 +335,7 @@ class MainWindow_preprocess(QMainWindow):
else:
PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_INFO)
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_view"] = True

View File

@ -225,6 +225,9 @@ class MainWindow_resp_quality_label(QMainWindow):
self.cid1 = None
self.cid2 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -348,6 +351,7 @@ class MainWindow_resp_quality_label(QMainWindow):
self.ax1_spectrum.clear()
# 释放资源
self.setting.close()
del self.data
self.fig.clf()
plt.close(self.fig)
@ -588,6 +592,7 @@ class MainWindow_resp_quality_label(QMainWindow):
else:
PublicFunc.text_output(self.ui, "(3/3)" + result.info, Constants.TIPS_TYPE_INFO)
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input_and_calculate_peaks"] = False
ButtonState["Current"]["pushButton_calculate_peaks"] = True
@ -756,6 +761,7 @@ class MainWindow_resp_quality_label(QMainWindow):
Config["CurrentPartNum"] = 1
self.update_info()
self.update_tableWidget()
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input_and_calculate_peaks"] = False
ButtonState["Current"]["pushButton_calculate_peaks"] = False

View File

@ -14,6 +14,8 @@ class Constants:
MAINWINDOW_ROOT_PATH_NOT_EXIST: str = "根目录路径输入错误"
MAINWINDOW_SAMPID_EMPTY: str = "样本ID为空"
MAINWINDOW_MSGBOX_TITLE: str = "消息"
MAINWINDOW_GET_DARKMODE_FAILURE: str = "获取深浅色状态失败,不影响标注工作,可忽略"
MAINWINDOW_DARKMODE_FAILURE: str = "切换深浅色模式失败,不影响标注工作,可忽略"
INPUTTING_DATA: str = "正在导入数据"
INPUT_FINISHED: str = "导入完成"
@ -70,11 +72,6 @@ class Constants:
PLOT_COLOR_PINK: str = "#ff00ff"
PLOT_COLOR_PURPLE: str = "m"
PLOT_COLOR_GRAY: str = "gray"
PLOT_COLOR_DEEP_YELLOW: str = "#ffa500"
PLOT_COLOR_YELLOW: str = "#ffff00"
PLOT_COLOR_AQUA: str = "#00ffff"
PLOT_COLOR_PURPLE_PINK: str = "#ee82ee"
PLOT_COLOR_DEEP_GREY: str = "#808080"
PROGRESSBAR_STYLE: str = """
QProgressBar {
@ -84,7 +81,7 @@ class Constants:
color: black;
text-align: center;
height: 20px;
background: #E5E4E4;
background: rgba(245, 245, 220, 128);
}
QProgressBar::chunk {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #9AFF99, stop:1 #9A9AFE);
@ -92,6 +89,11 @@ class Constants:
}
"""
LABELBTN_STYLE_NORMAL: str = """
QPushButton:hover {
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
FAILURE_REASON: dict = {
"Path_Not_Exist": "(路径不存在)",
"File_Not_Exist": "(数据文件不存在)",
@ -358,55 +360,60 @@ class Constants:
ARTIFACT_LABEL_DELETE_ARTIFACT_FAILURE: str = "需要被删除的体动不存在"
ARTIFACT_LABEL_ACTION_LABEL: str = f"标注体动({Params.ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY})"
# 橙色orange
ARTIFACT_LABEL_LABELBTN_STYLE_1: str = """
QPushButton {
background-color: #ffa500; /* 设置背景颜色 */
background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 黄色yellow
ARTIFACT_LABEL_LABELBTN_STYLE_2: str = """
QPushButton {
background-color: #ffff00; /* 设置背景颜色 */
background-color: rgba(255, 255, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 草绿色limegreen
ARTIFACT_LABEL_LABELBTN_STYLE_3: str = """
QPushButton {
background-color: #00ffff; /* 设置背景颜色 */
background-color: rgba(50, 205, 50, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 青色cyan
ARTIFACT_LABEL_LABELBTN_STYLE_4: str = """
QPushButton {
background-color: #ee82ee; /* 设置背景颜色 */
background-color: rgba(0, 255, 255, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 品红色magenta
ARTIFACT_LABEL_LABELBTN_STYLE_5: str = """
QPushButton {
background-color: #808080; /* 设置背景颜色 */
background-color: rgba(255, 0, 255, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# BCG的质量标注
@ -435,13 +442,13 @@ class Constants:
BCG_QUALITY_LABEL_LABEL_ARTIFACT_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有带有体动的片段标记为类型C"
BCG_QUALITY_LABEL_LABELBTN_STYLE: str = """
QPushButton {
background-color: orange; /* 设置背景颜色 */
background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: yellow; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""

View File

@ -142,6 +142,17 @@ class PublicFunc:
if widget.objectName() in buttonState["Default"].keys():
widget.setEnabled(buttonState["Default"][widget.objectName()])
@staticmethod
def __styleAllButton__(mainWindow, buttonState):
# 启用按钮
all_widgets = mainWindow.centralWidget().findChildren(QWidget)
# 迭代所有部件,查找按钮并启用它们
for widget in all_widgets:
if isinstance(widget, QPushButton):
if widget.objectName() in buttonState["Default"].keys():
widget.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
@staticmethod
def add_progressbar(mainWindow):
mainWindow.progressbar = QProgressBar()

2
run.py
View File

@ -39,7 +39,7 @@ if __name__ == '__main__':
QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
app = QApplication(argv)
app.styleHints().setColorScheme(Qt.ColorScheme.Light) # 强制使用浅色模式
app.setStyle("Fusion")
mainWindow = MainWindow()
mainWindow.show()
exit(app.exec())

View File

@ -3,7 +3,7 @@
################################################################################
## Form generated from reading UI file 'MainWindow_approximately_align.ui'
##
## Created by: Qt User Interface Compiler version 6.7.0
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
@ -547,23 +547,23 @@ class Ui_MainWindow_approximately_align(object):
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u6570\u636e\u7c97\u540c\u6b65", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5f00\u59cb\u5bfc\u5165", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg\u65f6\u957f(\u79d2)\uff1a", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u65f6\u957f(\u79d2)\uff1a", None))
self.label_orgBcg_length.setText(QCoreApplication.translate("MainWindow_approximately_align", u"0", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u65f6\u957f(\u79d2)\uff1a", None))
self.label_PSG_length.setText(QCoreApplication.translate("MainWindow_approximately_align", u"0", None))
self.groupBox_standardize.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u6807\u51c6\u5316", None))
self.checkBox_orgBcgDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg\u53bb\u57fa\u7ebf", None))
self.checkBox_orgBcgDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u53bb\u57fa\u7ebf", None))
self.checkBox_PSGDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u53bb\u57fa\u7ebf", None))
self.checkBox_RawSignal.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u539f\u59cb\u4fe1\u53f7", None))
self.checkBox_orgBcgZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg\u6807\u51c6\u5316", None))
self.checkBox_orgBcgZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u6807\u51c6\u5316", None))
self.checkBox_PSGZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u6807\u51c6\u5316", None))
self.pushButton_Standardize.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5e94\u7528", None))
self.groupBox_get_position.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u622a\u65ad", None))
self.label.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg_\u8865\u96f6\uff1a", None))
self.label.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_\u8865\u96f6\uff1a", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_\u8865\u96f6\uff1a", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg_Pre \uff1a", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_Pre \uff1a", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_Pre \uff1a", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg_Post\uff1a", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_Post\uff1a", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_Post\uff1a", None))
self.pushButton_CutOff.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5e94\u7528", None))
self.groupBox_align_position.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u5bf9\u9f50\u8d77\u59cb\u4f4d\u7f6e", None))

View File

@ -76,7 +76,7 @@
</font>
</property>
<property name="text">
<string>orgBcg时长(秒)</string>
<string>OrgBCG时长(秒)</string>
</property>
</widget>
</item>
@ -147,7 +147,7 @@
</font>
</property>
<property name="text">
<string>orgBcg去基线</string>
<string>OrgBCG去基线</string>
</property>
<property name="checked">
<bool>true</bool>
@ -206,7 +206,7 @@
</font>
</property>
<property name="text">
<string>orgBcg标准化</string>
<string>OrgBCG标准化</string>
</property>
<property name="checked">
<bool>true</bool>
@ -274,7 +274,7 @@
</font>
</property>
<property name="text">
<string>orgBcg_补零</string>
<string>OrgBCG_补零</string>
</property>
</widget>
</item>
@ -350,7 +350,7 @@
</font>
</property>
<property name="text">
<string>orgBcg_Pre </string>
<string>OrgBCG_Pre </string>
</property>
</widget>
</item>
@ -414,7 +414,7 @@
</font>
</property>
<property name="text">
<string>orgBcg_Post</string>
<string>OrgBCG_Post</string>
</property>
</widget>
</item>

View File

@ -694,7 +694,7 @@ class Ui_MainWindow_artifact_label(object):
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u53c2\u6570", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u8d77\u59cb\u65f6\u95f4(ms)", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u7ec8\u6b62\u65f6\u95f4(ms)", None))
self.label.setText(QCoreApplication.translate("MainWindow_artifact_label", u"orgBcg 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.label.setText(QCoreApplication.translate("MainWindow_artifact_label", u"OrgBCG 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4f53\u52a8\u65f6\u957f(ms)", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"BCG 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u81ea\u52a8\u64ad\u653e", None))

View File

@ -152,7 +152,7 @@
</font>
</property>
<property name="text">
<string>orgBcg 20Hz以上能量占比</string>
<string>OrgBCG 20Hz以上能量占比</string>
</property>
</widget>
</item>

View File

@ -15,10 +15,10 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QComboBox, QGridLayout, QHBoxLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton,
QSizePolicy, QSpacerItem, QStatusBar, QVBoxLayout,
QWidget)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
QHBoxLayout, QLabel, QMainWindow, QPlainTextEdit,
QPushButton, QSizePolicy, QSpacerItem, QStatusBar,
QVBoxLayout, QWidget)
class Ui_Signal_Label(object):
def setupUi(self, Signal_Label):
@ -51,12 +51,38 @@ class Ui_Signal_Label(object):
self.plainTextEdit_root_path = QPlainTextEdit(self.centralwidget)
self.plainTextEdit_root_path.setObjectName(u"plainTextEdit_root_path")
self.plainTextEdit_root_path.setEnabled(False)
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.plainTextEdit_root_path.sizePolicy().hasHeightForWidth())
self.plainTextEdit_root_path.setSizePolicy(sizePolicy1)
self.verticalLayout_3.addWidget(self.plainTextEdit_root_path)
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_5.addItem(self.horizontalSpacer)
self.checkBox_darkmode = QCheckBox(self.centralwidget)
self.checkBox_darkmode.setObjectName(u"checkBox_darkmode")
font1 = QFont()
font1.setPointSize(12)
self.checkBox_darkmode.setFont(font1)
self.horizontalLayout_5.addWidget(self.checkBox_darkmode)
self.verticalLayout_3.addLayout(self.horizontalLayout_5)
self.horizontalLayout.addLayout(self.verticalLayout_3)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(self.horizontalSpacer_2)
self.verticalLayout_2 = QVBoxLayout()
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
@ -71,25 +97,32 @@ class Ui_Signal_Label(object):
self.pushButton_open = QPushButton(self.centralwidget)
self.pushButton_open.setObjectName(u"pushButton_open")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.pushButton_open.sizePolicy().hasHeightForWidth())
self.pushButton_open.setSizePolicy(sizePolicy1)
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.pushButton_open.sizePolicy().hasHeightForWidth())
self.pushButton_open.setSizePolicy(sizePolicy2)
self.pushButton_open.setFont(font)
self.verticalLayout_2.addWidget(self.pushButton_open)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_2)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.horizontalLayout.setStretch(0, 30)
self.horizontalLayout.setStretch(1, 1)
self.horizontalLayout.setStretch(2, 8)
self.verticalLayout.addLayout(self.horizontalLayout)
self.pushButton_approximately_align = QPushButton(self.centralwidget)
self.pushButton_approximately_align.setObjectName(u"pushButton_approximately_align")
sizePolicy1.setHeightForWidth(self.pushButton_approximately_align.sizePolicy().hasHeightForWidth())
self.pushButton_approximately_align.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_approximately_align.sizePolicy().hasHeightForWidth())
self.pushButton_approximately_align.setSizePolicy(sizePolicy2)
self.pushButton_approximately_align.setFont(font)
self.verticalLayout.addWidget(self.pushButton_approximately_align)
@ -98,16 +131,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.pushButton_preprocess_BCG = QPushButton(self.centralwidget)
self.pushButton_preprocess_BCG.setObjectName(u"pushButton_preprocess_BCG")
sizePolicy1.setHeightForWidth(self.pushButton_preprocess_BCG.sizePolicy().hasHeightForWidth())
self.pushButton_preprocess_BCG.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_preprocess_BCG.sizePolicy().hasHeightForWidth())
self.pushButton_preprocess_BCG.setSizePolicy(sizePolicy2)
self.pushButton_preprocess_BCG.setFont(font)
self.horizontalLayout_2.addWidget(self.pushButton_preprocess_BCG)
self.pushButton_preprocess_ECG = QPushButton(self.centralwidget)
self.pushButton_preprocess_ECG.setObjectName(u"pushButton_preprocess_ECG")
sizePolicy1.setHeightForWidth(self.pushButton_preprocess_ECG.sizePolicy().hasHeightForWidth())
self.pushButton_preprocess_ECG.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_preprocess_ECG.sizePolicy().hasHeightForWidth())
self.pushButton_preprocess_ECG.setSizePolicy(sizePolicy2)
self.pushButton_preprocess_ECG.setFont(font)
self.horizontalLayout_2.addWidget(self.pushButton_preprocess_ECG)
@ -119,16 +152,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.pushButton_detect_Jpeak = QPushButton(self.centralwidget)
self.pushButton_detect_Jpeak.setObjectName(u"pushButton_detect_Jpeak")
sizePolicy1.setHeightForWidth(self.pushButton_detect_Jpeak.sizePolicy().hasHeightForWidth())
self.pushButton_detect_Jpeak.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_detect_Jpeak.sizePolicy().hasHeightForWidth())
self.pushButton_detect_Jpeak.setSizePolicy(sizePolicy2)
self.pushButton_detect_Jpeak.setFont(font)
self.horizontalLayout_3.addWidget(self.pushButton_detect_Jpeak)
self.pushButton_detect_Rpeak = QPushButton(self.centralwidget)
self.pushButton_detect_Rpeak.setObjectName(u"pushButton_detect_Rpeak")
sizePolicy1.setHeightForWidth(self.pushButton_detect_Rpeak.sizePolicy().hasHeightForWidth())
self.pushButton_detect_Rpeak.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_detect_Rpeak.sizePolicy().hasHeightForWidth())
self.pushButton_detect_Rpeak.setSizePolicy(sizePolicy2)
self.pushButton_detect_Rpeak.setFont(font)
self.horizontalLayout_3.addWidget(self.pushButton_detect_Rpeak)
@ -140,16 +173,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
self.pushButton_label_check_BCG = QPushButton(self.centralwidget)
self.pushButton_label_check_BCG.setObjectName(u"pushButton_label_check_BCG")
sizePolicy1.setHeightForWidth(self.pushButton_label_check_BCG.sizePolicy().hasHeightForWidth())
self.pushButton_label_check_BCG.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_label_check_BCG.sizePolicy().hasHeightForWidth())
self.pushButton_label_check_BCG.setSizePolicy(sizePolicy2)
self.pushButton_label_check_BCG.setFont(font)
self.horizontalLayout_6.addWidget(self.pushButton_label_check_BCG)
self.pushButton_label_check_ECG = QPushButton(self.centralwidget)
self.pushButton_label_check_ECG.setObjectName(u"pushButton_label_check_ECG")
sizePolicy1.setHeightForWidth(self.pushButton_label_check_ECG.sizePolicy().hasHeightForWidth())
self.pushButton_label_check_ECG.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_label_check_ECG.sizePolicy().hasHeightForWidth())
self.pushButton_label_check_ECG.setSizePolicy(sizePolicy2)
self.pushButton_label_check_ECG.setFont(font)
self.horizontalLayout_6.addWidget(self.pushButton_label_check_ECG)
@ -161,16 +194,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.pushButton_precisely_align = QPushButton(self.centralwidget)
self.pushButton_precisely_align.setObjectName(u"pushButton_precisely_align")
sizePolicy1.setHeightForWidth(self.pushButton_precisely_align.sizePolicy().hasHeightForWidth())
self.pushButton_precisely_align.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_precisely_align.sizePolicy().hasHeightForWidth())
self.pushButton_precisely_align.setSizePolicy(sizePolicy2)
self.pushButton_precisely_align.setFont(font)
self.horizontalLayout_4.addWidget(self.pushButton_precisely_align)
self.pushButton_cut_PSG = QPushButton(self.centralwidget)
self.pushButton_cut_PSG.setObjectName(u"pushButton_cut_PSG")
sizePolicy1.setHeightForWidth(self.pushButton_cut_PSG.sizePolicy().hasHeightForWidth())
self.pushButton_cut_PSG.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_cut_PSG.sizePolicy().hasHeightForWidth())
self.pushButton_cut_PSG.setSizePolicy(sizePolicy2)
self.pushButton_cut_PSG.setFont(font)
self.horizontalLayout_4.addWidget(self.pushButton_cut_PSG)
@ -182,32 +215,32 @@ class Ui_Signal_Label(object):
self.pushButton_artifact_label = QPushButton(self.centralwidget)
self.pushButton_artifact_label.setObjectName(u"pushButton_artifact_label")
sizePolicy1.setHeightForWidth(self.pushButton_artifact_label.sizePolicy().hasHeightForWidth())
self.pushButton_artifact_label.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_artifact_label.sizePolicy().hasHeightForWidth())
self.pushButton_artifact_label.setSizePolicy(sizePolicy2)
self.pushButton_artifact_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_artifact_label)
self.pushButton_bcg_quality_label = QPushButton(self.centralwidget)
self.pushButton_bcg_quality_label.setObjectName(u"pushButton_bcg_quality_label")
sizePolicy1.setHeightForWidth(self.pushButton_bcg_quality_label.sizePolicy().hasHeightForWidth())
self.pushButton_bcg_quality_label.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_bcg_quality_label.sizePolicy().hasHeightForWidth())
self.pushButton_bcg_quality_label.setSizePolicy(sizePolicy2)
self.pushButton_bcg_quality_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_bcg_quality_label)
self.pushButton_resp_quality_label = QPushButton(self.centralwidget)
self.pushButton_resp_quality_label.setObjectName(u"pushButton_resp_quality_label")
sizePolicy1.setHeightForWidth(self.pushButton_resp_quality_label.sizePolicy().hasHeightForWidth())
self.pushButton_resp_quality_label.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_resp_quality_label.sizePolicy().hasHeightForWidth())
self.pushButton_resp_quality_label.setSizePolicy(sizePolicy2)
self.pushButton_resp_quality_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_resp_quality_label)
self.pushButton_SA_label = QPushButton(self.centralwidget)
self.pushButton_SA_label.setObjectName(u"pushButton_SA_label")
sizePolicy1.setHeightForWidth(self.pushButton_SA_label.sizePolicy().hasHeightForWidth())
self.pushButton_SA_label.setSizePolicy(sizePolicy1)
sizePolicy2.setHeightForWidth(self.pushButton_SA_label.sizePolicy().hasHeightForWidth())
self.pushButton_SA_label.setSizePolicy(sizePolicy2)
self.pushButton_SA_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_SA_label)
@ -238,6 +271,7 @@ class Ui_Signal_Label(object):
def retranslateUi(self, Signal_Label):
Signal_Label.setWindowTitle(QCoreApplication.translate("Signal_Label", u"Signal_Label", None))
self.label.setText(QCoreApplication.translate("Signal_Label", u"\u6570\u636e\u6839\u76ee\u5f55\uff1a", None))
self.checkBox_darkmode.setText(QCoreApplication.translate("Signal_Label", u"\u6df1\u8272\u6a21\u5f0f\u5f00\u5173", None))
self.pushButton_open.setText(QCoreApplication.translate("Signal_Label", u"\u6253\u5f00", None))
self.pushButton_approximately_align.setText(QCoreApplication.translate("Signal_Label", u"\u6570\u636e\u7c97\u540c\u6b65", None))
self.pushButton_preprocess_BCG.setText(QCoreApplication.translate("Signal_Label", u"BCG\u7684\u9884\u5904\u7406", None))

View File

@ -24,9 +24,9 @@
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,1,1,1,1,1,1,1,1">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="30,1,8">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0">
<item>
<widget class="QLabel" name="label">
<property name="font">
@ -44,10 +44,58 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_darkmode">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>深色模式开关</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
@ -90,6 +138,19 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>