feat: Step1~Step14 面板单步按钮 EventBus 解耦 + Handler 补全(Step8~Step14)+ 旧上帝类删除
- 9 个面板(step1~step6/step8_ml_train/step8_qaa/step9_ml_predict/step10)单步执行按钮从 parent 链上溯改为 global_event_bus.publish('RequestRunSingleStep')
- PipelineExecutor 新增 _on_request_run_single_step 订阅
- 新增 Handler: step8_ml_train / step9_ml_predict / step10_qaa_inversion / step11_concentration / step12_kriging / step13_visualization / step14_report
- 删除旧 water_quality_inversion_pipeline_GUI.py(上帝类已肢解完毕)
This commit is contained in:
@ -91,7 +91,7 @@ class Step4SamplingPanel(QWidget):
|
||||
# 独立运行按钮
|
||||
self.run_btn = QPushButton("独立运行此步骤")
|
||||
self.run_btn.setStyleSheet(ModernStylesheet.get_button_stylesheet('success'))
|
||||
self.run_btn.clicked.connect(self.run_step)
|
||||
self.run_btn.clicked.connect(self._on_run_single_clicked)
|
||||
layout.addWidget(self.run_btn)
|
||||
|
||||
# 交互式预览按钮
|
||||
@ -228,8 +228,23 @@ class Step4SamplingPanel(QWidget):
|
||||
# 4. 同步更新预览按钮状态(路径可能已自动填充)
|
||||
self._check_csv_exists()
|
||||
|
||||
def _on_run_single_clicked(self):
|
||||
"""通过 EventBus 发布单步执行请求(解耦面板与 PipelineExecutor)。"""
|
||||
from src.gui.core.event_bus import global_event_bus
|
||||
|
||||
deglint_img_path = self.deglint_img_file.get_path()
|
||||
if not deglint_img_path:
|
||||
QMessageBox.warning(self, "输入错误", "请选择去耀斑影像文件!")
|
||||
return
|
||||
|
||||
config = {'step4_sampling': self.get_config()}
|
||||
global_event_bus.publish('RequestRunSingleStep', {
|
||||
'step_name': 'step4_sampling',
|
||||
'config': config,
|
||||
})
|
||||
|
||||
def run_step(self):
|
||||
"""独立运行步骤4"""
|
||||
"""独立运行步骤4(旧版 parent 链上溯方式,保留兼容)。"""
|
||||
deglint_img_path = self.deglint_img_file.get_path()
|
||||
if not deglint_img_path:
|
||||
QMessageBox.warning(self, "输入错误", "请选择去耀斑影像文件!")
|
||||
|
||||
Reference in New Issue
Block a user