添加AI图片功能

This commit is contained in:
xinzhu.yin
2026-04-21 14:06:48 +08:00
parent 6b8bfe06b9
commit 6cc3e55ebb
6 changed files with 532 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ from app.views.panels import custom_template_panel as _ctp
from app.views.panels import side_panels as _sp
from app.views.panels import cct_panel as _ccp
from app.views.panels import main_layout as _main
from app.views.panels import ai_image_panel as _aip
from app.views import panel_manager as PM
# Step 0/1 重构:资源工具和纯算法已迁移到 app/ 包,这里重新导入以保持
@@ -196,6 +197,8 @@ class PQAutomationApp:
self.create_log_panel()
# 创建 Local Dimming 面板
self.create_local_dimming_panel()
# 创建 AI 图片对话面板
self.create_ai_image_panel()
# 创建测试类型选择区域
self.create_test_type_frame()
# 创建操作按钮区域
@@ -323,6 +326,11 @@ class PQAutomationApp:
toggle_log_panel = _sp.toggle_log_panel
update_sidebar_selection = _sp.update_sidebar_selection
# ---- AI 图片对话面板 ----
create_ai_image_panel = _aip.create_ai_image_panel
toggle_ai_image_panel = _aip.toggle_ai_image_panel
reload_ai_image_list = _aip.reload_ai_image_list
# ---- 单步调试面板(统一实现,委托到 side_panels 模块) ----
_toggle_debug_panel = _sp._toggle_debug_panel
toggle_screen_debug_panel = _sp.toggle_screen_debug_panel
@@ -517,7 +525,7 @@ class PQAutomationApp:
def change_test_type(self, test_type):
"""切换测试类型"""
# 切换测试类型时,自动隐藏日志面板和 Local Dimming 面板
if self.current_panel in ("log", "local_dimming"):
if self.current_panel in ("log", "local_dimming", "ai_image"):
self.hide_all_panels()
self._save_cct_params_before_test_type_switch()
self._apply_current_test_type(test_type)