修改UI细节错误
This commit is contained in:
@@ -415,9 +415,7 @@ def toggle_ai_image_panel(self: "PQAutomationApp"):
|
|||||||
self.show_panel("ai_image")
|
self.show_panel("ai_image")
|
||||||
_apply_ai_image_list_style(self)
|
_apply_ai_image_list_style(self)
|
||||||
if not getattr(self, "_ai_image_list_loaded", False):
|
if not getattr(self, "_ai_image_list_loaded", False):
|
||||||
logger.info("[AIImagePanel] 首次显示面板,开始加载列表")
|
_start_new_session(self)
|
||||||
reload_ai_image_list(self)
|
|
||||||
self._ai_image_list_loaded = True
|
|
||||||
|
|
||||||
|
|
||||||
def _get_app_base_dir(self: "PQAutomationApp") -> str:
|
def _get_app_base_dir(self: "PQAutomationApp") -> str:
|
||||||
@@ -618,7 +616,6 @@ def _on_list_select(self: "PQAutomationApp"):
|
|||||||
if getattr(self, "_ai_image_reloading", False):
|
if getattr(self, "_ai_image_reloading", False):
|
||||||
return
|
return
|
||||||
if getattr(self, "_ai_image_select_guard", False):
|
if getattr(self, "_ai_image_select_guard", False):
|
||||||
logger.debug("[AIImagePanel] 忽略重入选择事件")
|
|
||||||
return
|
return
|
||||||
sel = self.ai_image_tree.selection()
|
sel = self.ai_image_tree.selection()
|
||||||
if not sel:
|
if not sel:
|
||||||
@@ -631,7 +628,6 @@ def _on_list_select(self: "PQAutomationApp"):
|
|||||||
if ridx is None:
|
if ridx is None:
|
||||||
session_id = _session_id_for_item(self, item_id)
|
session_id = _session_id_for_item(self, item_id)
|
||||||
if session_id:
|
if session_id:
|
||||||
logger.info("[AIImagePanel] 选中会话头 sid=%s", session_id[:8])
|
|
||||||
_switch_to_session(self, session_id, show_message=False, refresh_list=False)
|
_switch_to_session(self, session_id, show_message=False, refresh_list=False)
|
||||||
return
|
return
|
||||||
if 0 <= ridx < len(self.ai_image_records):
|
if 0 <= ridx < len(self.ai_image_records):
|
||||||
@@ -848,7 +844,7 @@ def _switch_to_session(
|
|||||||
if sid == _svc.get_session_id():
|
if sid == _svc.get_session_id():
|
||||||
return
|
return
|
||||||
_svc.set_session_id(sid)
|
_svc.set_session_id(sid)
|
||||||
logger.info(
|
logger.debug(
|
||||||
"[AIImagePanel] 切换会话 sid=%s refresh=%s target=%s",
|
"[AIImagePanel] 切换会话 sid=%s refresh=%s target=%s",
|
||||||
sid[:8],
|
sid[:8],
|
||||||
refresh_list,
|
refresh_list,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ def create_cct_params_frame(self: "PQAutomationApp"):
|
|||||||
|
|
||||||
# 从配置读取屏模组参数
|
# 从配置读取屏模组参数
|
||||||
saved_params = self.config.current_test_types.get("screen_module", {}).get(
|
saved_params = self.config.current_test_types.get("screen_module", {}).get(
|
||||||
"cct_params", screen_default_cct_params.copy()
|
"cct_params", {}
|
||||||
)
|
)
|
||||||
|
|
||||||
# 色域参考标准
|
# 色域参考标准
|
||||||
@@ -45,15 +45,11 @@ def create_cct_params_frame(self: "PQAutomationApp"):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# 创建屏模组变量
|
# 创建屏模组变量
|
||||||
self.cct_x_ideal_var = tk.StringVar(
|
self.cct_x_ideal_var = tk.StringVar(value="")
|
||||||
value=str(saved_params.get("x_ideal", 0.3127))
|
|
||||||
)
|
|
||||||
self.cct_x_tolerance_var = tk.StringVar(
|
self.cct_x_tolerance_var = tk.StringVar(
|
||||||
value=str(saved_params.get("x_tolerance", 0.003))
|
value=str(saved_params.get("x_tolerance", 0.003))
|
||||||
)
|
)
|
||||||
self.cct_y_ideal_var = tk.StringVar(
|
self.cct_y_ideal_var = tk.StringVar(value="")
|
||||||
value=str(saved_params.get("y_ideal", 0.3290))
|
|
||||||
)
|
|
||||||
self.cct_y_tolerance_var = tk.StringVar(
|
self.cct_y_tolerance_var = tk.StringVar(
|
||||||
value=str(saved_params.get("y_tolerance", 0.003))
|
value=str(saved_params.get("y_tolerance", 0.003))
|
||||||
)
|
)
|
||||||
@@ -77,7 +73,7 @@ def create_cct_params_frame(self: "PQAutomationApp"):
|
|||||||
# 屏模组中心由实测 100% 点自动决定,避免手动误改。
|
# 屏模组中心由实测 100% 点自动决定,避免手动误改。
|
||||||
if key in ("x_ideal", "y_ideal"):
|
if key in ("x_ideal", "y_ideal"):
|
||||||
entry.configure(state="readonly")
|
entry.configure(state="readonly")
|
||||||
|
else:
|
||||||
# 绑定失去焦点事件
|
# 绑定失去焦点事件
|
||||||
default_val = screen_default_cct_params[key]
|
default_val = screen_default_cct_params[key]
|
||||||
entry.bind(
|
entry.bind(
|
||||||
@@ -669,15 +665,29 @@ def reload_cct_params(self: "PQAutomationApp"):
|
|||||||
saved_params = self.config.current_test_types.get(current_type, {}).get(
|
saved_params = self.config.current_test_types.get(current_type, {}).get(
|
||||||
"cct_params", None
|
"cct_params", None
|
||||||
)
|
)
|
||||||
|
default_params = self.config.get_default_cct_params(current_type)
|
||||||
|
|
||||||
if saved_params is None:
|
if saved_params is None:
|
||||||
saved_params = self.config.get_default_cct_params(current_type)
|
saved_params = {}
|
||||||
|
|
||||||
# 更新输入框的值
|
# 更新输入框的值
|
||||||
self.cct_x_ideal_var.set(str(saved_params["x_ideal"]))
|
if current_type == "screen_module":
|
||||||
self.cct_x_tolerance_var.set(str(saved_params["x_tolerance"]))
|
self.cct_x_ideal_var.set(
|
||||||
self.cct_y_ideal_var.set(str(saved_params["y_ideal"]))
|
str(saved_params["x_ideal"]) if "x_ideal" in saved_params else ""
|
||||||
self.cct_y_tolerance_var.set(str(saved_params["y_tolerance"]))
|
)
|
||||||
|
self.cct_y_ideal_var.set(
|
||||||
|
str(saved_params["y_ideal"]) if "y_ideal" in saved_params else ""
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.cct_x_ideal_var.set(str(saved_params.get("x_ideal", default_params["x_ideal"])) )
|
||||||
|
self.cct_y_ideal_var.set(str(saved_params.get("y_ideal", default_params["y_ideal"])) )
|
||||||
|
|
||||||
|
self.cct_x_tolerance_var.set(
|
||||||
|
str(saved_params.get("x_tolerance", default_params["x_tolerance"]))
|
||||||
|
)
|
||||||
|
self.cct_y_tolerance_var.set(
|
||||||
|
str(saved_params.get("y_tolerance", default_params["y_tolerance"]))
|
||||||
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if hasattr(self, "log_gui"):
|
if hasattr(self, "log_gui"):
|
||||||
|
|||||||
@@ -194,12 +194,6 @@ def create_gamma_pattern_panel(self: "PQAutomationApp"):
|
|||||||
"<<ComboboxSelected>>", lambda e: _on_preset_selected(self)
|
"<<ComboboxSelected>>", lambda e: _on_preset_selected(self)
|
||||||
)
|
)
|
||||||
|
|
||||||
ttk.Button(
|
|
||||||
preset_row1, text="加载",
|
|
||||||
bootstyle="info-outline", width=8,
|
|
||||||
command=lambda: _load_selected_preset(self),
|
|
||||||
).pack(side=tk.LEFT, padx=2)
|
|
||||||
|
|
||||||
ttk.Button(
|
ttk.Button(
|
||||||
preset_row1, text="应用为当前",
|
preset_row1, text="应用为当前",
|
||||||
bootstyle="success", width=12,
|
bootstyle="success", width=12,
|
||||||
|
|||||||
@@ -292,65 +292,9 @@ def create_signal_format_content(self: "PQAutomationApp"):
|
|||||||
self.sdr_signal_frame.grid_columnconfigure(1, weight=1)
|
self.sdr_signal_frame.grid_columnconfigure(1, weight=1)
|
||||||
self.signal_tabs.add(self.sdr_signal_frame, text="SDR测试")
|
self.signal_tabs.add(self.sdr_signal_frame, text="SDR测试")
|
||||||
|
|
||||||
# 色彩空间
|
|
||||||
ttk.Label(self.sdr_signal_frame, text="色彩空间:").grid(
|
|
||||||
row=0, column=0, sticky=tk.W, padx=5, pady=2
|
|
||||||
)
|
|
||||||
self.sdr_color_space_var = tk.StringVar(value="BT.709")
|
|
||||||
sdr_color_space_combo = ttk.Combobox(
|
|
||||||
self.sdr_signal_frame,
|
|
||||||
textvariable=self.sdr_color_space_var,
|
|
||||||
values=["sRGB", "BT.709", "BT.601", "BT.2020", "DCI-P3"],
|
|
||||||
width=10,
|
|
||||||
state="readonly",
|
|
||||||
)
|
|
||||||
sdr_color_space_combo.grid(row=0, column=1, sticky=tk.W, padx=5, pady=2)
|
|
||||||
|
|
||||||
# Gamma(测试参考值,用于Gamma曲线绘制和色准计算)
|
|
||||||
ttk.Label(self.sdr_signal_frame, text="Gamma:").grid(
|
|
||||||
row=1, column=0, sticky=tk.W, padx=5, pady=2
|
|
||||||
)
|
|
||||||
self.sdr_gamma_type_var = tk.StringVar(value=UCDEnum.SignalFormat.GammaType.GAMMA_22)
|
|
||||||
sdr_gamma_combo = ttk.Combobox(
|
|
||||||
self.sdr_signal_frame,
|
|
||||||
textvariable=self.sdr_gamma_type_var,
|
|
||||||
values=UCDEnum.SignalFormat.GammaType.get_list(),
|
|
||||||
width=10,
|
|
||||||
state="readonly",
|
|
||||||
)
|
|
||||||
sdr_gamma_combo.grid(row=1, column=1, sticky=tk.W, padx=5, pady=2)
|
|
||||||
|
|
||||||
# 数据范围
|
|
||||||
ttk.Label(self.sdr_signal_frame, text="数据范围:").grid(
|
|
||||||
row=2, column=0, sticky=tk.W, padx=5, pady=2
|
|
||||||
)
|
|
||||||
self.sdr_data_range_var = tk.StringVar(value=UCDEnum.SignalFormat.DataRange.FULL)
|
|
||||||
sdr_range_combo = ttk.Combobox(
|
|
||||||
self.sdr_signal_frame,
|
|
||||||
textvariable=self.sdr_data_range_var,
|
|
||||||
values=UCDEnum.SignalFormat.DataRange.get_list(),
|
|
||||||
width=10,
|
|
||||||
state="readonly",
|
|
||||||
)
|
|
||||||
sdr_range_combo.grid(row=2, column=1, sticky=tk.W, padx=5, pady=2)
|
|
||||||
|
|
||||||
# 编码位深
|
|
||||||
ttk.Label(self.sdr_signal_frame, text="编码位深:").grid(
|
|
||||||
row=3, column=0, sticky=tk.W, padx=5, pady=2
|
|
||||||
)
|
|
||||||
self.sdr_bit_depth_var = tk.StringVar(value=UCDEnum.SignalFormat.BitDepth.BIT_8)
|
|
||||||
sdr_bit_depth_combo = ttk.Combobox(
|
|
||||||
self.sdr_signal_frame,
|
|
||||||
textvariable=self.sdr_bit_depth_var,
|
|
||||||
values=UCDEnum.SignalFormat.BitDepth.get_list(),
|
|
||||||
width=10,
|
|
||||||
state="readonly",
|
|
||||||
)
|
|
||||||
sdr_bit_depth_combo.grid(row=3, column=1, sticky=tk.W, padx=5, pady=2)
|
|
||||||
|
|
||||||
# 分辨率
|
# 分辨率
|
||||||
ttk.Label(self.sdr_signal_frame, text="分辨率:").grid(
|
ttk.Label(self.sdr_signal_frame, text="分辨率:").grid(
|
||||||
row=4, column=0, sticky=tk.W, padx=5, pady=2
|
row=0, column=0, sticky=tk.W, padx=5, pady=2
|
||||||
)
|
)
|
||||||
self.sdr_timing_var = tk.StringVar(
|
self.sdr_timing_var = tk.StringVar(
|
||||||
value=self.config.current_test_types.get("sdr_movie", {}).get(
|
value=self.config.current_test_types.get("sdr_movie", {}).get(
|
||||||
@@ -365,7 +309,63 @@ def create_signal_format_content(self: "PQAutomationApp"):
|
|||||||
state="readonly",
|
state="readonly",
|
||||||
)
|
)
|
||||||
sdr_timing_combo.bind("<<ComboboxSelected>>", self.on_sdr_timing_changed)
|
sdr_timing_combo.bind("<<ComboboxSelected>>", self.on_sdr_timing_changed)
|
||||||
sdr_timing_combo.grid(row=4, column=1, sticky=tk.W, padx=5, pady=2)
|
sdr_timing_combo.grid(row=0, column=1, sticky=tk.W, padx=5, pady=2)
|
||||||
|
|
||||||
|
# 色彩空间
|
||||||
|
ttk.Label(self.sdr_signal_frame, text="色彩空间:").grid(
|
||||||
|
row=1, column=0, sticky=tk.W, padx=5, pady=2
|
||||||
|
)
|
||||||
|
self.sdr_color_space_var = tk.StringVar(value="BT.709")
|
||||||
|
sdr_color_space_combo = ttk.Combobox(
|
||||||
|
self.sdr_signal_frame,
|
||||||
|
textvariable=self.sdr_color_space_var,
|
||||||
|
values=["sRGB", "BT.709", "BT.601", "BT.2020", "DCI-P3"],
|
||||||
|
width=10,
|
||||||
|
state="readonly",
|
||||||
|
)
|
||||||
|
sdr_color_space_combo.grid(row=1, column=1, sticky=tk.W, padx=5, pady=2)
|
||||||
|
|
||||||
|
# Gamma(测试参考值,用于Gamma曲线绘制和色准计算)
|
||||||
|
ttk.Label(self.sdr_signal_frame, text="Gamma:").grid(
|
||||||
|
row=2, column=0, sticky=tk.W, padx=5, pady=2
|
||||||
|
)
|
||||||
|
self.sdr_gamma_type_var = tk.StringVar(value=UCDEnum.SignalFormat.GammaType.GAMMA_22)
|
||||||
|
sdr_gamma_combo = ttk.Combobox(
|
||||||
|
self.sdr_signal_frame,
|
||||||
|
textvariable=self.sdr_gamma_type_var,
|
||||||
|
values=UCDEnum.SignalFormat.GammaType.get_list(),
|
||||||
|
width=10,
|
||||||
|
state="readonly",
|
||||||
|
)
|
||||||
|
sdr_gamma_combo.grid(row=2, column=1, sticky=tk.W, padx=5, pady=2)
|
||||||
|
|
||||||
|
# 数据范围
|
||||||
|
ttk.Label(self.sdr_signal_frame, text="数据范围:").grid(
|
||||||
|
row=3, column=0, sticky=tk.W, padx=5, pady=2
|
||||||
|
)
|
||||||
|
self.sdr_data_range_var = tk.StringVar(value=UCDEnum.SignalFormat.DataRange.FULL)
|
||||||
|
sdr_range_combo = ttk.Combobox(
|
||||||
|
self.sdr_signal_frame,
|
||||||
|
textvariable=self.sdr_data_range_var,
|
||||||
|
values=UCDEnum.SignalFormat.DataRange.get_list(),
|
||||||
|
width=10,
|
||||||
|
state="readonly",
|
||||||
|
)
|
||||||
|
sdr_range_combo.grid(row=3, column=1, sticky=tk.W, padx=5, pady=2)
|
||||||
|
|
||||||
|
# 编码位深
|
||||||
|
ttk.Label(self.sdr_signal_frame, text="编码位深:").grid(
|
||||||
|
row=4, column=0, sticky=tk.W, padx=5, pady=2
|
||||||
|
)
|
||||||
|
self.sdr_bit_depth_var = tk.StringVar(value=UCDEnum.SignalFormat.BitDepth.BIT_8)
|
||||||
|
sdr_bit_depth_combo = ttk.Combobox(
|
||||||
|
self.sdr_signal_frame,
|
||||||
|
textvariable=self.sdr_bit_depth_var,
|
||||||
|
values=UCDEnum.SignalFormat.BitDepth.get_list(),
|
||||||
|
width=10,
|
||||||
|
state="readonly",
|
||||||
|
)
|
||||||
|
sdr_bit_depth_combo.grid(row=4, column=1, sticky=tk.W, padx=5, pady=2)
|
||||||
|
|
||||||
# 色彩格式
|
# 色彩格式
|
||||||
ttk.Label(self.sdr_signal_frame, text="色彩格式:").grid(
|
ttk.Label(self.sdr_signal_frame, text="色彩格式:").grid(
|
||||||
|
|||||||
BIN
docs/PQ自动化工具使用指南SOP.pdf
Normal file
BIN
docs/PQ自动化工具使用指南SOP.pdf
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"current_test_type": "sdr_movie",
|
"current_test_type": "screen_module",
|
||||||
"test_types": {
|
"test_types": {
|
||||||
"screen_module": {
|
"screen_module": {
|
||||||
"name": "屏模组性能测试",
|
"name": "屏模组性能测试",
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
"contrast": "rgb"
|
"contrast": "rgb"
|
||||||
},
|
},
|
||||||
"cct_params": {
|
"cct_params": {
|
||||||
"x_ideal": 0.303696,
|
"x_ideal": 0.3127,
|
||||||
"x_tolerance": 0.003,
|
"x_tolerance": 0.003,
|
||||||
"y_ideal": 0.312349,
|
"y_ideal": 0.329,
|
||||||
"y_tolerance": 0.003
|
"y_tolerance": 0.003
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user