Step7 面板:移除输出模式选择 UI,output_mode 硬编码锁定为 0(全量输出)
This commit is contained in:
@ -126,52 +126,10 @@ class Step7IndexPanel(QWidget):
|
|||||||
self.formula_group.setLayout(formula_outer_layout)
|
self.formula_group.setLayout(formula_outer_layout)
|
||||||
main_layout.addWidget(self.formula_group)
|
main_layout.addWidget(self.formula_group)
|
||||||
|
|
||||||
# 4. 输出选项
|
# 4. 执行设置
|
||||||
output_group = QGroupBox("输出模式")
|
output_group = QGroupBox("执行设置")
|
||||||
output_layout = QVBoxLayout()
|
output_layout = QVBoxLayout()
|
||||||
|
|
||||||
mode_layout = QHBoxLayout()
|
|
||||||
self.mode_group = QButtonGroup()
|
|
||||||
self.radio_both = QRadioButton("两者皆出")
|
|
||||||
self.radio_wide = QRadioButton("仅宽表")
|
|
||||||
self.radio_single = QRadioButton("仅单文件")
|
|
||||||
self.mode_group.addButton(self.radio_both, 0)
|
|
||||||
self.mode_group.addButton(self.radio_wide, 1)
|
|
||||||
self.mode_group.addButton(self.radio_single, 2)
|
|
||||||
self.radio_both.setChecked(True)
|
|
||||||
mode_layout.addWidget(self.radio_both)
|
|
||||||
mode_layout.addWidget(self.radio_wide)
|
|
||||||
mode_layout.addWidget(self.radio_single)
|
|
||||||
mode_layout.addStretch()
|
|
||||||
output_layout.addLayout(mode_layout)
|
|
||||||
|
|
||||||
# ---------- RadioButton 实心美化样式 ----------
|
|
||||||
radio_style = """
|
|
||||||
QRadioButton {
|
|
||||||
font-size: 13px;
|
|
||||||
spacing: 8px;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
QRadioButton::indicator {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border: 2px solid #999999;
|
|
||||||
border-radius: 3px; /* 3px是微圆角方形,如果想要纯圆形请改成 8px */
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
QRadioButton::indicator:checked {
|
|
||||||
border: 2px solid #0078d4;
|
|
||||||
background-color: #0078d4; /* 纯蓝实心 */
|
|
||||||
image: none;
|
|
||||||
}
|
|
||||||
QRadioButton::indicator:hover {
|
|
||||||
border: 2px solid #005a9e;
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
self.radio_both.setStyleSheet(radio_style)
|
|
||||||
self.radio_wide.setStyleSheet(radio_style)
|
|
||||||
self.radio_single.setStyleSheet(radio_style)
|
|
||||||
|
|
||||||
self.enable_checkbox = QCheckBox("启用计算流程")
|
self.enable_checkbox = QCheckBox("启用计算流程")
|
||||||
self.enable_checkbox.setChecked(True)
|
self.enable_checkbox.setChecked(True)
|
||||||
output_layout.addWidget(self.enable_checkbox)
|
output_layout.addWidget(self.enable_checkbox)
|
||||||
@ -298,7 +256,7 @@ class Step7IndexPanel(QWidget):
|
|||||||
'formula_csv_file': self.builtin_formula_path,
|
'formula_csv_file': self.builtin_formula_path,
|
||||||
'formula_names': selected,
|
'formula_names': selected,
|
||||||
'enabled': self.enable_checkbox.isChecked(),
|
'enabled': self.enable_checkbox.isChecked(),
|
||||||
'output_mode': self.mode_group.checkedId(),
|
'output_mode': 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
work_dir = self._get_work_dir()
|
work_dir = self._get_work_dir()
|
||||||
@ -317,10 +275,6 @@ class Step7IndexPanel(QWidget):
|
|||||||
for name, item in self.index_checkboxes.items():
|
for name, item in self.index_checkboxes.items():
|
||||||
item.setCheckState(Qt.Checked if name in sel else Qt.Unchecked)
|
item.setCheckState(Qt.Checked if name in sel else Qt.Unchecked)
|
||||||
self.enable_checkbox.setChecked(config.get('enabled', True))
|
self.enable_checkbox.setChecked(config.get('enabled', True))
|
||||||
if 'output_mode' in config:
|
|
||||||
btn = self.mode_group.button(config['output_mode'])
|
|
||||||
if btn:
|
|
||||||
btn.setChecked(True)
|
|
||||||
|
|
||||||
def update_from_config(self, work_dir=None, pipeline=None):
|
def update_from_config(self, work_dir=None, pipeline=None):
|
||||||
if work_dir:
|
if work_dir:
|
||||||
|
|||||||
Reference in New Issue
Block a user