添加Local Dimming图像
This commit is contained in:
@@ -29,7 +29,7 @@ def create_log_panel(self: "PQAutomationApp"):
|
||||
|
||||
|
||||
def create_local_dimming_panel(self: "PQAutomationApp"):
|
||||
"""创建 Local Dimming 测试面板 - 手动控制版"""
|
||||
"""创建 Local Dimming 测试面板。"""
|
||||
self.local_dimming_frame = ttk.Frame(self.content_frame)
|
||||
|
||||
# 主容器
|
||||
@@ -88,6 +88,52 @@ def create_local_dimming_panel(self: "PQAutomationApp"):
|
||||
width=12,
|
||||
).pack(side=tk.LEFT, padx=3)
|
||||
|
||||
# ==================== 3. 其他手动图案 ====================
|
||||
pattern_frame = ttk.LabelFrame(main_container, text="🧩 其他测试图案", padding=10)
|
||||
pattern_frame.pack(fill=tk.X, pady=(0, 10))
|
||||
|
||||
ttk.Label(
|
||||
pattern_frame,
|
||||
text="手动发送棋盘格、瞬时峰值、黑场图案,再点击采集当前亮度",
|
||||
font=("", 9),
|
||||
foreground="#28a745",
|
||||
).pack(pady=(0, 8))
|
||||
|
||||
pattern_row = ttk.Frame(pattern_frame)
|
||||
pattern_row.pack(fill=tk.X)
|
||||
|
||||
ttk.Button(
|
||||
pattern_row,
|
||||
text="棋盘格(中心白)",
|
||||
command=lambda: self.send_ld_checkerboard(True),
|
||||
bootstyle="secondary",
|
||||
width=14,
|
||||
).pack(side=tk.LEFT, padx=3)
|
||||
|
||||
ttk.Button(
|
||||
pattern_row,
|
||||
text="棋盘格(中心黑)",
|
||||
command=lambda: self.send_ld_checkerboard(False),
|
||||
bootstyle="secondary",
|
||||
width=14,
|
||||
).pack(side=tk.LEFT, padx=3)
|
||||
|
||||
ttk.Button(
|
||||
pattern_row,
|
||||
text="瞬时峰值",
|
||||
command=self.send_ld_instant_peak,
|
||||
bootstyle="warning",
|
||||
width=12,
|
||||
).pack(side=tk.LEFT, padx=3)
|
||||
|
||||
ttk.Button(
|
||||
pattern_row,
|
||||
text="全黑画面",
|
||||
command=self.send_ld_black_pattern,
|
||||
bootstyle="dark",
|
||||
width=12,
|
||||
).pack(side=tk.LEFT, padx=3)
|
||||
|
||||
# ==================== 4. CA410 采集按钮 ====================
|
||||
measure_frame = ttk.LabelFrame(main_container, text="📊 CA410 测量", padding=10)
|
||||
measure_frame.pack(fill=tk.X, pady=(0, 10))
|
||||
@@ -118,15 +164,19 @@ def create_local_dimming_panel(self: "PQAutomationApp"):
|
||||
result_frame.pack(fill=tk.BOTH, expand=True, pady=(0, 10))
|
||||
|
||||
# Treeview
|
||||
columns = ("窗口百分比", "亮度 (cd/m²)", "x", "y", "时间")
|
||||
columns = ("测试项目", "图案", "亮度/结果", "x", "y", "时间")
|
||||
self.ld_tree = ttk.Treeview(
|
||||
result_frame, columns=columns, show="headings", height=10
|
||||
)
|
||||
|
||||
for col in columns:
|
||||
self.ld_tree.heading(col, text=col)
|
||||
if col == "窗口百分比":
|
||||
self.ld_tree.column(col, width=100, anchor=tk.CENTER)
|
||||
if col == "测试项目":
|
||||
self.ld_tree.column(col, width=120, anchor=tk.CENTER)
|
||||
elif col == "图案":
|
||||
self.ld_tree.column(col, width=140, anchor=tk.CENTER)
|
||||
elif col == "亮度/结果":
|
||||
self.ld_tree.column(col, width=110, anchor=tk.CENTER)
|
||||
elif col == "时间":
|
||||
self.ld_tree.column(col, width=120, anchor=tk.CENTER)
|
||||
else:
|
||||
@@ -176,6 +226,8 @@ def create_local_dimming_panel(self: "PQAutomationApp"):
|
||||
|
||||
# 初始化当前窗口百分比(用于记录)
|
||||
self.current_ld_percentage = None
|
||||
self.current_ld_test_item = None
|
||||
self.current_ld_pattern_label = None
|
||||
|
||||
|
||||
def toggle_local_dimming_panel(self: "PQAutomationApp"):
|
||||
|
||||
Reference in New Issue
Block a user