优化SA打标界面布局,调整垂直间距和伸缩因子,提升界面可用性
This commit is contained in:
@ -541,7 +541,7 @@ class DataFrameModel(QAbstractTableModel):
|
|||||||
# 获取此行的remark
|
# 获取此行的remark
|
||||||
remark = not self._dataframe[self._dataframe["Index"] == event_index]["remark"].values[0]
|
remark = not self._dataframe[self._dataframe["Index"] == event_index]["remark"].values[0]
|
||||||
score = self._dataframe[self._dataframe["Index"] == event_index]["score"].values[0]
|
score = self._dataframe[self._dataframe["Index"] == event_index]["score"].values[0]
|
||||||
if remark == "待讨论":
|
if str(remark).startswith("待讨论"):
|
||||||
return QColor(0, 0, 255)
|
return QColor(0, 0, 255)
|
||||||
elif score == 1:
|
elif score == 1:
|
||||||
return QColor(0, 255, 0)
|
return QColor(0, 255, 0)
|
||||||
@ -951,7 +951,7 @@ class MainWindow_SA_label(QMainWindow):
|
|||||||
row = row_list[0]
|
row = row_list[0]
|
||||||
model_index = self.data_model_revised.index(row, 0)
|
model_index = self.data_model_revised.index(row, 0)
|
||||||
self.ui.tableView_label_revised.scrollTo(model_index,
|
self.ui.tableView_label_revised.scrollTo(model_index,
|
||||||
self.ui.tableView_label_revised.ScrollHint.PositionAtCenter)
|
self.ui.tableView_label_revised.ScrollHint.EnsureVisible)
|
||||||
# 显示事件信息
|
# 显示事件信息
|
||||||
row_list = self.data_model_origin._showdata[
|
row_list = self.data_model_origin._showdata[
|
||||||
self.data_model_origin._showdata["Index"] == event_index].index.tolist()
|
self.data_model_origin._showdata["Index"] == event_index].index.tolist()
|
||||||
@ -959,7 +959,7 @@ class MainWindow_SA_label(QMainWindow):
|
|||||||
row = row_list[0]
|
row = row_list[0]
|
||||||
|
|
||||||
model_index = self.data_model_origin.index(row, 0)
|
model_index = self.data_model_origin.index(row, 0)
|
||||||
self.ui.tableView_label.scrollTo(model_index, self.ui.tableView_label.ScrollHint.PositionAtCenter)
|
self.ui.tableView_label.scrollTo(model_index, self.ui.tableView_label.ScrollHint.EnsureVisible)
|
||||||
|
|
||||||
self.show_event_info(event_index)
|
self.show_event_info(event_index)
|
||||||
self.__jump_to__event__(event_index, keep_xlim=keep_xlim)
|
self.__jump_to__event__(event_index, keep_xlim=keep_xlim)
|
||||||
|
|||||||
@ -85,10 +85,6 @@ class Ui_MainWindow_SA_label(object):
|
|||||||
|
|
||||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||||
|
|
||||||
self.verticalSpacer = QSpacerItem(20, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
|
|
||||||
|
|
||||||
self.verticalLayout_2.addItem(self.verticalSpacer)
|
|
||||||
|
|
||||||
self.groupBox = QGroupBox(self.groupBox_left)
|
self.groupBox = QGroupBox(self.groupBox_left)
|
||||||
self.groupBox.setObjectName(u"groupBox")
|
self.groupBox.setObjectName(u"groupBox")
|
||||||
self.verticalLayout_5 = QVBoxLayout(self.groupBox)
|
self.verticalLayout_5 = QVBoxLayout(self.groupBox)
|
||||||
@ -250,7 +246,7 @@ class Ui_MainWindow_SA_label(object):
|
|||||||
|
|
||||||
self.verticalLayout_2.addWidget(self.pushButton_reset_event)
|
self.verticalLayout_2.addWidget(self.pushButton_reset_event)
|
||||||
|
|
||||||
self.verticalSpacer_3 = QSpacerItem(20, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
|
self.verticalSpacer_3 = QSpacerItem(20, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Maximum)
|
||||||
|
|
||||||
self.verticalLayout_2.addItem(self.verticalSpacer_3)
|
self.verticalLayout_2.addItem(self.verticalSpacer_3)
|
||||||
|
|
||||||
@ -279,13 +275,12 @@ class Ui_MainWindow_SA_label(object):
|
|||||||
|
|
||||||
self.verticalLayout_2.setStretch(0, 1)
|
self.verticalLayout_2.setStretch(0, 1)
|
||||||
self.verticalLayout_2.setStretch(1, 1)
|
self.verticalLayout_2.setStretch(1, 1)
|
||||||
self.verticalLayout_2.setStretch(2, 1)
|
self.verticalLayout_2.setStretch(2, 4)
|
||||||
self.verticalLayout_2.setStretch(3, 4)
|
self.verticalLayout_2.setStretch(3, 15)
|
||||||
self.verticalLayout_2.setStretch(4, 15)
|
self.verticalLayout_2.setStretch(4, 1)
|
||||||
self.verticalLayout_2.setStretch(5, 1)
|
self.verticalLayout_2.setStretch(5, 1)
|
||||||
self.verticalLayout_2.setStretch(6, 1)
|
self.verticalLayout_2.setStretch(6, 2)
|
||||||
self.verticalLayout_2.setStretch(7, 2)
|
self.verticalLayout_2.setStretch(7, 5)
|
||||||
self.verticalLayout_2.setStretch(8, 5)
|
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
|
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>睡眠呼吸暂停事件标注</string>
|
<string>睡眠呼吸暂停事件标注</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,1,4,15,1,1,2,5">
|
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,4,15,1,1,2,5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_sampno">
|
<widget class="QLabel" name="label_sampno">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -95,19 +95,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -404,7 +391,7 @@
|
|||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Maximum</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
|
|||||||
Reference in New Issue
Block a user