重构测试执行部分+去除转发器
This commit is contained in:
@@ -10,9 +10,8 @@ import matplotlib.pyplot as plt
|
||||
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
|
||||
from views.pq_debug_panel import PQDebugPanel
|
||||
|
||||
def init_gamut_chart(app):
|
||||
def init_gamut_chart(self):
|
||||
"""初始化色域图表 - 手动设置subplot位置,完全避免重叠"""
|
||||
self = app
|
||||
container = ttk.Frame(self.gamut_chart_frame)
|
||||
container.pack(expand=True, fill=tk.BOTH)
|
||||
|
||||
@@ -47,9 +46,8 @@ def init_gamut_chart(app):
|
||||
|
||||
self.gamut_canvas.draw()
|
||||
|
||||
def init_gamma_chart(app):
|
||||
def init_gamma_chart(self):
|
||||
"""初始化Gamma曲线图表 - 左侧曲线 + 右侧表格(✅ 4列 + 通用说明)"""
|
||||
self = app
|
||||
container = ttk.Frame(self.gamma_chart_frame)
|
||||
container.pack(expand=True, fill=tk.BOTH)
|
||||
|
||||
@@ -157,9 +155,8 @@ def init_gamma_chart(app):
|
||||
self.gamma_fig.suptitle("Gamma曲线 + 数据表格", fontsize=12, y=0.98)
|
||||
self.gamma_canvas.draw()
|
||||
|
||||
def init_eotf_chart(app):
|
||||
def init_eotf_chart(self):
|
||||
"""初始化 EOTF 曲线图表(HDR 专用)- 左侧曲线 + 右侧表格(✅ 4列)"""
|
||||
self = app
|
||||
container = ttk.Frame(self.eotf_chart_frame)
|
||||
container.pack(expand=True, fill=tk.BOTH)
|
||||
|
||||
@@ -263,9 +260,8 @@ def init_eotf_chart(app):
|
||||
self.eotf_fig.suptitle("EOTF 曲线 + 数据表格", fontsize=12, y=0.98)
|
||||
self.eotf_canvas.draw()
|
||||
|
||||
def init_cct_chart(app):
|
||||
def init_cct_chart(self):
|
||||
"""初始化色度坐标图表 - 正向横坐标,标题居中最上方"""
|
||||
self = app
|
||||
container = ttk.Frame(self.cct_chart_frame)
|
||||
container.pack(expand=True)
|
||||
|
||||
@@ -309,9 +305,8 @@ def init_cct_chart(app):
|
||||
|
||||
self.cct_canvas.draw()
|
||||
|
||||
def init_contrast_chart(app):
|
||||
def init_contrast_chart(self):
|
||||
"""初始化对比度图表 - 固定大小,居中显示"""
|
||||
self = app
|
||||
container = ttk.Frame(self.contrast_chart_frame)
|
||||
container.pack(expand=True)
|
||||
|
||||
@@ -345,9 +340,8 @@ def init_contrast_chart(app):
|
||||
|
||||
self.contrast_canvas.draw()
|
||||
|
||||
def init_accuracy_chart(app):
|
||||
def init_accuracy_chart(self):
|
||||
"""初始化色准图表 - 固定大小,居中显示"""
|
||||
self = app
|
||||
container = ttk.Frame(self.accuracy_chart_frame)
|
||||
container.pack(expand=True)
|
||||
|
||||
@@ -381,9 +375,8 @@ def init_accuracy_chart(app):
|
||||
|
||||
self.accuracy_canvas.draw()
|
||||
|
||||
def clear_chart(app):
|
||||
def clear_chart(self):
|
||||
"""清空所有图表"""
|
||||
self = app
|
||||
|
||||
# ========== 1. 清空色域图表 ==========
|
||||
if hasattr(self, "gamut_ax_xy") and hasattr(self, "gamut_ax_uv"):
|
||||
@@ -678,7 +671,7 @@ def clear_chart(app):
|
||||
|
||||
self.accuracy_canvas.draw()
|
||||
|
||||
def update_chart_tabs_state(app):
|
||||
def update_chart_tabs_state(self):
|
||||
"""根据测试项目复选框状态动态增删图表 Tab(保持规范顺序)。
|
||||
|
||||
- 色域 / Gamma 或 EOTF / 色度一致性 / 对比度 / 色准 全部走动态 add/forget
|
||||
@@ -686,7 +679,6 @@ def update_chart_tabs_state(app):
|
||||
- 屏模组测试强制隐藏色准 Tab
|
||||
- 客户模板 Tab 由 change_test_type 独立管理,这里不动
|
||||
"""
|
||||
self = app
|
||||
if not hasattr(self, "chart_notebook"):
|
||||
return
|
||||
|
||||
@@ -751,9 +743,8 @@ def update_chart_tabs_state(app):
|
||||
if hasattr(self, "log_gui"):
|
||||
self.log_gui.log(f"更新Tab状态失败: {str(e)}")
|
||||
|
||||
def create_result_chart_frame(app):
|
||||
def create_result_chart_frame(self):
|
||||
"""创建结果图表区域 - 6个独立Tab(Gamma 和 EOTF 分离)"""
|
||||
self = app
|
||||
# 创建Notebook用于图表切换
|
||||
self.chart_notebook = ttk.Notebook(self.result_frame)
|
||||
self.chart_notebook.pack(fill=tk.BOTH, expand=True, padx=5, pady=5)
|
||||
@@ -812,9 +803,8 @@ def create_result_chart_frame(app):
|
||||
|
||||
self.log_gui.log("✓ 单步调试面板已创建(放在测试结果图表下方)")
|
||||
|
||||
def on_chart_tab_changed(app, event):
|
||||
def on_chart_tab_changed(self, event):
|
||||
"""Tab切换时的事件处理"""
|
||||
self = app
|
||||
try:
|
||||
self._last_tab_index = self.chart_notebook.index(
|
||||
self.chart_notebook.select()
|
||||
|
||||
Reference in New Issue
Block a user