新增上料下料按钮以及对应功能

This commit is contained in:
zhu-mengmeng 2025-06-13 15:57:26 +08:00
parent 940c2e2008
commit 935fd44f78
5 changed files with 13 additions and 13 deletions

View File

@ -4,7 +4,7 @@
"version": "1.0.0",
"features": {
"enable_serial_ports": false,
"enable_keyboard_listener": true,
"enable_keyboard_listener": false,
"enable_camera": false
}
},

Binary file not shown.

View File

@ -285,13 +285,13 @@ class MainWindowUI(QMainWindow):
}
"""
# self.input_button = QPushButton("上料")
# self.input_button.setFont(self.normal_font)
# self.input_button.setStyleSheet(button_style + "background-color: #e3f2fd; border: 1px solid #2196f3;")
self.input_button = QPushButton("上料")
self.input_button.setFont(self.normal_font)
self.input_button.setStyleSheet(button_style + "background-color: #e3f2fd; border: 1px solid #2196f3;")
# self.output_button = QPushButton("下料")
# self.output_button.setFont(self.normal_font)
# self.output_button.setStyleSheet(button_style + "background-color: #fff8e1; border: 1px solid #ffc107;")
self.output_button = QPushButton("下料")
self.output_button.setFont(self.normal_font)
self.output_button.setStyleSheet(button_style + "background-color: #fff8e1; border: 1px solid #ffc107;")
self.start_button = QPushButton("开始")
self.start_button.setFont(self.normal_font)
@ -302,10 +302,10 @@ class MainWindowUI(QMainWindow):
self.stop_button.setStyleSheet(button_style + "background-color: #ffebee; border: 1px solid #f44336;")
# 使用网格布局排列按钮
# self.button_layout.addWidget(self.input_button, 0, 0)
# self.button_layout.addWidget(self.output_button, 0, 1)
self.button_layout.addWidget(self.start_button, 0, 1)
self.button_layout.addWidget(self.stop_button, 0, 2)
self.button_layout.addWidget(self.input_button, 0, 0)
self.button_layout.addWidget(self.output_button, 0, 1)
self.button_layout.addWidget(self.start_button, 0, 2)
self.button_layout.addWidget(self.stop_button, 0, 3)
self.control_layout.addWidget(self.button_container)

View File

@ -243,8 +243,8 @@ class MainWindow(MainWindowUI):
self.tray_edit.activated.connect(self.load_finished_inspection_data) # 当用户选择一项时触发
# 连接按钮事件
# self.input_button.clicked.connect(self.handle_input)
# self.output_button.clicked.connect(self.handle_output)
self.input_button.clicked.connect(self.handle_input)
self.output_button.clicked.connect(self.handle_output)
self.start_button.clicked.connect(self.handle_start)
self.stop_button.clicked.connect(self.handle_stop)