新增了手动切换深浅色模式的功能
This commit is contained in:
@ -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))
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user