修复误删文件

This commit is contained in:
xinzhu.yin
2026-04-20 16:44:46 +08:00
parent b1b14c2d49
commit b4bd8bdaa1
3 changed files with 85 additions and 79 deletions

View File

@@ -139,6 +139,15 @@ from app.views.panels.custom_template_panel import (
start_custom_row_single_step as _ctpl_start_custom_row_single_step,
start_custom_template_test as _ctpl_start_custom_template_test,
)
from app.views.panels.main_layout import (
create_connection_content as _layout_create_connection_content,
create_floating_config_panel as _layout_create_floating_config_panel,
create_operation_frame as _layout_create_operation_frame,
create_signal_format_content as _layout_create_signal_format_content,
create_test_items_content as _layout_create_test_items_content,
create_test_type_frame as _layout_create_test_type_frame,
update_config_info_display as _layout_update_config_info_display,
)
from app.views.panels.cct_panel import (
create_cct_params_frame as _cct_create_cct_params_frame,
on_cct_param_change as _cct_on_cct_param_change,
@@ -151,16 +160,6 @@ from app.views.panels.cct_panel import (
save_cct_params as _cct_save_cct_params,
save_hdr_cct_params as _cct_save_hdr_cct_params,
save_sdr_cct_params as _cct_save_sdr_cct_params,
toggle_cct_params_frame as _cct_toggle_cct_params_frame,
)
from app.views.panels.main_layout import (
create_connection_content as _layout_create_connection_content,
create_floating_config_panel as _layout_create_floating_config_panel,
create_operation_frame as _layout_create_operation_frame,
create_signal_format_content as _layout_create_signal_format_content,
create_test_items_content as _layout_create_test_items_content,
create_test_type_frame as _layout_create_test_type_frame,
update_config_info_display as _layout_update_config_info_display,
)
plt.rcParams["font.family"] = ["sans-serif"]
@@ -2836,7 +2835,35 @@ class PQAutomationApp:
# 控制参数框的显示
self.toggle_cct_params_frame()
toggle_cct_params_frame = _cct_toggle_cct_params_frame
def toggle_cct_params_frame(self):
"""根据测试类型和测试项的选中状态显示对应参数框"""
selected_items = self.get_selected_test_items()
current_test_type = self.config.current_test_type
# 默认隐藏所有参数框
self.cct_params_frame.pack_forget()
self.sdr_cct_params_frame.pack_forget()
if hasattr(self, "hdr_cct_params_frame"):
self.hdr_cct_params_frame.pack_forget()
# 根据测试类型和选中项显示对应参数框
if current_test_type == "screen_module":
if "cct" in selected_items:
self.cct_params_frame.pack(fill=tk.X, padx=5, pady=5)
if hasattr(self, "log_gui"):
self.log_gui.log("✓ 显示屏模组色度参数设置")
elif current_test_type == "sdr_movie":
if "cct" in selected_items:
self.sdr_cct_params_frame.pack(fill=tk.X, padx=5, pady=5)
if hasattr(self, "log_gui"):
self.log_gui.log("✓ 显示 SDR 色度参数设置")
elif current_test_type == "hdr_movie":
if "cct" in selected_items:
if hasattr(self, "hdr_cct_params_frame"):
self.hdr_cct_params_frame.pack(fill=tk.X, padx=5, pady=5)
if hasattr(self, "log_gui"):
self.log_gui.log("✓ 显示 HDR 色度参数设置")
else:
if hasattr(self, "log_gui"):
self.log_gui.log("⚠️ HDR 色度参数框尚未创建")
def on_screen_module_timing_changed(self, event=None):
"""屏模组信号格式改变时的回调"""