💄 update 弹窗改为中文

This commit is contained in:
FrankCV2048
2025-01-03 20:38:41 +08:00
parent 0500db207a
commit 3e065af6a0
2 changed files with 13 additions and 8 deletions

View File

@ -493,13 +493,13 @@ class Feeding(QObject):
self.next_position() self.next_position()
elif self.feedStatus == FeedStatus.FDropBag: elif self.feedStatus == FeedStatus.FDropBag:
self.log_signal.emit(logging.INFO, Constant.str_feed_drop)
if self.get_current_position().get_position().compare(real_position,is_action=True): if self.get_current_position().get_position().compare(real_position,is_action=True):
# self.sendIOControl(self.robotClient.con_ios[0], 0) # self.sendIOControl(self.robotClient.con_ios[0], 0)
# self.sendIOControl(self.robotClient.con_ios[1], 0) # self.sendIOControl(self.robotClient.con_ios[1], 0)
# self.sendIOControl(self.robotClient.con_ios[2], 0) # self.sendIOControl(self.robotClient.con_ios[2], 0)
self.log_signal.emit(logging.INFO, Constant.str_feed_drop)
if self.catch.catch_status == CatchStatus.CNone: if self.catch.catch_status == CatchStatus.CNone:
self.catch.catch_status = CatchStatus.CDrop self.catch.catch_status = CatchStatus.CDrop
return return

17
main.py
View File

@ -903,9 +903,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
remain_messageBox = QMessageBox() remain_messageBox = QMessageBox()
remain_messageBox.setIcon(QMessageBox.Icon.Warning) remain_messageBox.setIcon(QMessageBox.Icon.Warning)
remain_messageBox.setText(f'还有{self.remain_Count}袋未投料,是否继续?') remain_messageBox.setText(f'还有{self.remain_Count}袋未投料,是否继续?')
remain_messageBox.setStandardButtons(QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Cancel) # remain_messageBox.setStandardButtons(QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Cancel)
ok_button = remain_messageBox.addButton("确定", PySide6.QtWidgets.QMessageBox.ButtonRole.AcceptRole)
cancel_button = remain_messageBox.addButton("取消", PySide6.QtWidgets.QMessageBox.ButtonRole.RejectRole)
result = remain_messageBox.exec() result = remain_messageBox.exec()
if result == QMessageBox.StandardButton.Cancel: if remain_messageBox.clickedButton() == cancel_button:
self.remain_Count = 0 self.remain_Count = 0
return return
self.configReader.read(Constant.feedLine_set_file, encoding='utf-8') self.configReader.read(Constant.feedLine_set_file, encoding='utf-8')
@ -937,11 +939,13 @@ class MainWindow(QMainWindow, Ui_MainWindow):
msg_box_person.setIcon(QMessageBox.Icon.Information) msg_box_person.setIcon(QMessageBox.Icon.Information)
msg_box_person.setText("是否确认生产区域安全继续生产?") msg_box_person.setText("是否确认生产区域安全继续生产?")
msg_box_person.setWindowTitle("提示") msg_box_person.setWindowTitle("提示")
msg_box_person.setStandardButtons(QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Cancel)
ok_button = msg_box_person.addButton("确定", PySide6.QtWidgets.QMessageBox.ButtonRole.AcceptRole)
cancel_button = msg_box_person.addButton("取消", PySide6.QtWidgets.QMessageBox.ButtonRole.RejectRole)
result = msg_box_person.exec() result = msg_box_person.exec()
if result == QMessageBox.StandardButton.Cancel: if msg_box_person.clickedButton() == cancel_button:
return return
log.log_message(logging.INFO, '第一层确认生产') log.log_message(logging.INFO, '第一层确认生产')
@ -1469,9 +1473,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
msg_box_person.setIcon(QMessageBox.Icon.Warning) msg_box_person.setIcon(QMessageBox.Icon.Warning)
msg_box_person.setText("未识别到料袋报警,请重新放料后,点击继续") msg_box_person.setText("未识别到料袋报警,请重新放料后,点击继续")
msg_box_person.setWindowTitle("提示") msg_box_person.setWindowTitle("提示")
msg_box_person.setStandardButtons(QMessageBox.StandardButton.Ok) ok_button = msg_box_person.addButton("确定", QMessageBox.AcceptRole)
cancel_button = msg_box_person.addButton("取消", QMessageBox.RejectRole)
result = msg_box_person.exec() result = msg_box_person.exec()
if result == QMessageBox.StandardButton.Cancel: if msg_box_person.clickedButton() == cancel_button:
return return
# self.show_infomessage_box("") # self.show_infomessage_box("")