修改部分UI、修改module中心点设定、添加单独连接

This commit is contained in:
xinzhu.yin
2026-06-08 11:03:10 +08:00
parent e9a591bf6e
commit febbb28a4c
8 changed files with 201 additions and 24 deletions

View File

@@ -607,13 +607,14 @@ def create_connection_content(self: "PQAutomationApp"):
button_frame.grid_columnconfigure(0, weight=1)
button_frame.grid_columnconfigure(1, weight=1)
button_frame.grid_columnconfigure(2, weight=1)
button_frame.grid_columnconfigure(3, weight=1)
# connect_icon = load_icon("assets/connect-svgrepo-com.png")
self.check_button = ttk.Button(
button_frame,
# image=connect_icon,
# bootstyle="link",
text="连接",
text="全部连接",
bootstyle="success",
takefocus=False,
command=self.check_com_connections,
@@ -621,6 +622,42 @@ def create_connection_content(self: "PQAutomationApp"):
# self.check_button.image = connect_icon
self.check_button.grid(row=0, column=0, padx=(0, 4), pady=3, sticky="ew")
self.ucd_connect_button = ttk.Button(
button_frame,
text="连接UCD",
bootstyle="success-outline",
takefocus=False,
command=self.check_ucd_connection,
)
self.ucd_connect_button.grid(row=0, column=1, padx=4, pady=3, sticky="ew")
self.ca_connect_button = ttk.Button(
button_frame,
text="连接CA410",
bootstyle="success-outline",
takefocus=False,
command=self.check_ca_connection,
)
self.ca_connect_button.grid(row=0, column=2, padx=4, pady=3, sticky="ew")
self.ucd_disconnect_button = ttk.Button(
button_frame,
text="断开UCD",
bootstyle="danger-outline",
takefocus=False,
command=self.disconnect_ucd_connection,
)
self.ucd_disconnect_button.grid(row=1, column=1, padx=4, pady=3, sticky="ew")
self.ca_disconnect_button = ttk.Button(
button_frame,
text="断开CA410",
bootstyle="danger-outline",
takefocus=False,
command=self.disconnect_ca_connection,
)
self.ca_disconnect_button.grid(row=1, column=2, padx=4, pady=3, sticky="ew")
# disconnect_icon = load_icon("assets/disconnect-svgrepo-com.png")
# 断开连接按钮
self.disconnect_button = ttk.Button(
@@ -633,7 +670,7 @@ def create_connection_content(self: "PQAutomationApp"):
command=self.disconnect_com_connections,
)
# self.disconnect_button.image = disconnect_icon # 防止图标被垃圾回收
self.disconnect_button.grid(row=0, column=1, padx=4, pady=3, sticky="ew")
self.disconnect_button.grid(row=1, column=0, padx=(0, 4), pady=3, sticky="ew")
# refresh_icon = load_icon("assets/refresh-svgrepo-com.png")
self.refresh_button = ttk.Button(
@@ -646,7 +683,7 @@ def create_connection_content(self: "PQAutomationApp"):
command=self.refresh_com_ports,
)
# self.refresh_button.image = refresh_icon # 防止图标被垃圾回收
self.refresh_button.grid(row=0, column=2, padx=(4, 0), pady=3, sticky="ew")
self.refresh_button.grid(row=1, column=3, padx=(4, 0), pady=3, sticky="ew")
# CA端口
ttk.Label(com_frame, text="CA端口:").grid(
@@ -740,7 +777,7 @@ def create_test_type_frame(self: "PQAutomationApp"):
("log_btn", "测试日志", self.toggle_log_panel),
("ai_image_btn", "AI 图片", self.toggle_ai_image_panel),
("pantone_baseline_btn", "Pantone 摸底", self.toggle_pantone_baseline_panel),
("gamma_pattern_btn", "Gamma 图案", self.toggle_gamma_pattern_panel),
("gamma_pattern_btn", "Gamma Pattern编辑", self.toggle_gamma_pattern_panel),
("calman_btn", "CALMAN 灰阶", self.toggle_calman_panel),
]
for attr, text, cmd in panel_buttons: