修改AI生图接口、修改设备连接UI、修改LocalDimming逻辑和UI

This commit is contained in:
xinzhu.yin
2026-05-29 14:40:39 +08:00
parent 21455f3916
commit 85ac47e8de
13 changed files with 811 additions and 304 deletions

View File

@@ -358,10 +358,11 @@ class PQAutomationApp(
"screen_module": 0,
"sdr_movie": 1,
"hdr_movie": 2,
"local_dimming": 3,
}
target_tab = tab_mapping.get(test_type, 0)
for i in range(3):
for i in range(4):
self.signal_tabs.tab(i, state="normal")
self.signal_tabs.select(target_tab)
@@ -374,8 +375,10 @@ class PQAutomationApp(
self.sdr_signal_frame.tkraise()
elif target_tab == 2:
self.hdr_signal_frame.tkraise()
elif target_tab == 3:
self.local_dimming_signal_frame.tkraise()
for i in range(3):
for i in range(4):
if i != target_tab:
self.signal_tabs.tab(i, state="disabled")
@@ -397,16 +400,16 @@ class PQAutomationApp(
if test_type == "hdr_movie":
if gamma_tab_id in current_tabs:
gamma_index = current_tabs.index(gamma_tab_id)
self.chart_notebook.forget(gamma_index)
self.chart_notebook.forget(self.gamma_chart_frame)
if eotf_tab_id not in current_tabs:
self.chart_notebook.insert(1, self.eotf_chart_frame, text="EOTF 曲线")
insert_pos = min(1, len(self.chart_notebook.tabs()))
self.chart_notebook.insert(insert_pos, self.eotf_chart_frame, text="EOTF 曲线")
else:
if eotf_tab_id in current_tabs:
eotf_index = current_tabs.index(eotf_tab_id)
self.chart_notebook.forget(eotf_index)
self.chart_notebook.forget(self.eotf_chart_frame)
if gamma_tab_id not in current_tabs:
self.chart_notebook.insert(1, self.gamma_chart_frame, text="Gamma 曲线")
insert_pos = min(1, len(self.chart_notebook.tabs()))
self.chart_notebook.insert(insert_pos, self.gamma_chart_frame, text="Gamma 曲线")
custom_tab_id = str(self.custom_template_tab_frame)
current_tabs = list(self.chart_notebook.tabs())
@@ -533,6 +536,8 @@ class PQAutomationApp(
return "开始 SDR Movie 测试,请设置正确的图像模式"
if test_type == "hdr_movie":
return "开始 HDR Movie 测试,请设置正确的图像模式"
if test_type == "local_dimming":
return "Local Dimming 为手动模式,请在右侧面板发送图案并采集数据"
return f"开始{self.get_test_type_name(test_type)}测试"
def _launch_test_thread(self, test_type, test_items):
@@ -743,6 +748,8 @@ class PQAutomationApp(
return "SDR Movie测试"
elif test_type == "hdr_movie":
return "HDR Movie测试"
elif test_type == "local_dimming":
return "Local Dimming"
return test_type
def get_selected_test_items(self):
@@ -772,6 +779,11 @@ class PQAutomationApp(
and hasattr(self, "sdr_timing_var")
):
self.config.set_current_timing(self.sdr_timing_var.get())
elif (
self.config.current_test_type == "local_dimming"
and hasattr(self, "local_dimming_timing_var")
):
self.config.set_current_timing(self.local_dimming_timing_var.get())
# 自动保存配置到文件
self.save_pq_config()