调整了模具管理,增加了模具点位设置界面

This commit is contained in:
2025-09-11 18:42:54 +08:00
parent b90395ea24
commit 80272b92b4
2 changed files with 272 additions and 29 deletions

View File

@ -15,7 +15,7 @@ from PySide6.QtWidgets import (
)
from PySide6.QtCore import Qt
from PySide6.QtGui import QFont
from qfluentwidgets import PushButton, ComboBox, LineEdit
from qfluentwidgets import PushButton, ComboBox, LineEdit, PrimaryPushButton
# 模具管理界面
@ -52,33 +52,25 @@ class MoldManagementUI(QWidget):
self.serial_edit.setFont(self.left_font) # 输入框字体
self.type_combo = ComboBox()
self.type_combo.addItems(["一板一个", "一板", "其他类型"])
self.type_combo.addItems(["一板一个", "一板", "一板三个", "一板四个"])
self.type_combo.setFont(self.left_font) # 下拉框字体
# 左侧按钮(上传点位等)
self.btn_upload_model = PushButton("从文件上传")
self.btn_suction_point = PushButton("上传点位")
self.btn_place_point = PushButton("上传点位")
self.btn_pick_point = PushButton("上传点位")
self.btn_high_freq = PushButton("上传点位")
self.btn_upload_model = PrimaryPushButton("从文件上传")
self.btn_suction_point = PrimaryPushButton("上传点位")
self.btn_place_point = PrimaryPushButton("上传点位")
self.btn_pick_point = PrimaryPushButton("上传点位")
self.btn_high_freq = PrimaryPushButton("上传点位")
# 右侧操作按钮
self.btn_upload_mold = PushButton("上传模具")
self.btn_modify_mold = PushButton("修改模具")
self.btn_delete_mold = PushButton("删除模具")
self.btn_batch_upload = PushButton("通过文件上传") # 需要文件对话框
self.btn_upload_mold = PrimaryPushButton("上传模具")
self.btn_modify_mold = PrimaryPushButton("修改模具")
self.btn_delete_mold = PrimaryPushButton("删除模具")
self.btn_batch_upload = PrimaryPushButton("通过文件上传") # 需要文件对话框
def __initStyles(self):
# ========== 设置样式 ==========
# 1. 左侧按钮样式(适中大小)
left_btn_style = """
QPushButton {
min-height: 40px;
min-width: 150px;
font-size: 14px;
padding: 5px 10px;
}
"""
for btn in [
self.btn_upload_model,
self.btn_suction_point,
@ -86,24 +78,16 @@ class MoldManagementUI(QWidget):
self.btn_pick_point,
self.btn_high_freq,
]:
btn.setStyleSheet(left_btn_style)
btn.setFixedHeight(46)
# 2. 右侧按钮样式(较大尺寸)
right_btn_style = """
QPushButton {
min-height: 36px;
min-width: 166px;
font-size: 16px;
padding: 10px 20px;
}
"""
for btn in [
self.btn_upload_mold,
self.btn_modify_mold,
self.btn_delete_mold,
self.btn_batch_upload,
]:
btn.setStyleSheet(right_btn_style)
btn.setFixedHeight(99)
def __initLayout(self):
# ========== 布局设计 =========