update 增加停止,暂停,重连,报警消除等
This commit is contained in:
@ -8,12 +8,13 @@ class TCPClient:
|
|||||||
self.error_count=0
|
self.error_count=0
|
||||||
self.IPAddress = ip
|
self.IPAddress = ip
|
||||||
self.port = port
|
self.port = port
|
||||||
self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
||||||
self.client_socket.settimeout(5)
|
|
||||||
self.connected = False
|
self.connected = False
|
||||||
|
|
||||||
|
|
||||||
def CreatConnect(self):
|
def CreatConnect(self):
|
||||||
|
self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
self.client_socket.settimeout(5)
|
||||||
self.client_socket.connect((self.IPAddress, self.port))
|
self.client_socket.connect((self.IPAddress, self.port))
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +37,16 @@ class TCPClient:
|
|||||||
self.error_count += 1
|
self.error_count += 1
|
||||||
if self.error_count> 5:
|
if self.error_count> 5:
|
||||||
print("Error: TCPClient is not connected")
|
print("Error: TCPClient is not connected")
|
||||||
self.CreatConnect()
|
try:
|
||||||
|
self.CreatConnect()
|
||||||
|
except OSError as e1:
|
||||||
|
if e1.errno == 10056:
|
||||||
|
self.client_socket.close()
|
||||||
|
print("Error: TCPClient is not connected")
|
||||||
|
except Exception as e2:
|
||||||
|
print(e2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def send_Command(self):
|
def send_Command(self):
|
||||||
return False
|
return False
|
||||||
|
|||||||
@ -58,13 +58,16 @@ class Feeding():
|
|||||||
# 0,
|
# 0,
|
||||||
# 0);
|
# 0);
|
||||||
|
|
||||||
|
if self.feedConfig == None:
|
||||||
|
self.feedStatus = FeedStatus.FNone
|
||||||
|
elif self.feedConfig.num == 0:
|
||||||
|
self.feedStatus = FeedStatus.FNone
|
||||||
|
|
||||||
if self.feedStatus==FeedStatus.FNone:
|
if self.feedStatus==FeedStatus.FNone:
|
||||||
pass
|
pass
|
||||||
elif self.feedStatus==FeedStatus.FStart:
|
elif self.feedStatus==FeedStatus.FStart:
|
||||||
if self.feedConfig.num != 0:
|
if self.feedConfig.num != 0:
|
||||||
self.feedStatus = FeedStatus.FSafeP
|
self.feedStatus = FeedStatus.FSafeP
|
||||||
|
|
||||||
self.sendTargPosition(self.feedConfig.feedLine.safe_position)
|
self.sendTargPosition(self.feedConfig.feedLine.safe_position)
|
||||||
#print(request_command)
|
#print(request_command)
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[FeedLine1]
|
[FeedLine1]
|
||||||
name = 阿萨德
|
name = 反应釜1
|
||||||
safeposition_x = 534.907898
|
safeposition_x = 534.907898
|
||||||
safeposition_y = 5.525342
|
safeposition_y = 5.525342
|
||||||
safeposition_z = 737.267822
|
safeposition_z = 737.267822
|
||||||
@ -20,7 +20,7 @@ feedposition_v = -4.094595
|
|||||||
feedposition_w = -5.294128
|
feedposition_w = -5.294128
|
||||||
|
|
||||||
[FeedLine2]
|
[FeedLine2]
|
||||||
name = 艾师傅
|
name = 反应釜2
|
||||||
safeposition_x = 0.0
|
safeposition_x = 0.0
|
||||||
safeposition_y = 0.0
|
safeposition_y = 0.0
|
||||||
safeposition_z = 0.0
|
safeposition_z = 0.0
|
||||||
|
|||||||
@ -98,10 +98,17 @@ class DATAReply:
|
|||||||
|
|
||||||
class CMDRequest:
|
class CMDRequest:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.dsID = 'www.hc-system.com.HCRemoteCommand'
|
self.dsID = 'www.hc-system.com.RemoteMonitor'
|
||||||
self.reqType = 'command'
|
self.reqType = 'command'
|
||||||
self.cmdData = []
|
self.cmdData = []
|
||||||
return
|
return
|
||||||
|
def toString(self):
|
||||||
|
model_str = '{'+f'"dsID":"{self.dsID}","reqType":"{self.reqType}","cmdData":'
|
||||||
|
if len(self.cmdData) != 0:
|
||||||
|
model_str = model_str+"["+','.join(f'"{item}"' for item in self.cmdData)+"]"+"}"
|
||||||
|
else:
|
||||||
|
model_str = model_str+"}"
|
||||||
|
return model_str
|
||||||
|
|
||||||
class CMDReply:
|
class CMDReply:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -110,6 +117,7 @@ class CMDReply:
|
|||||||
self.cmdData = []
|
self.cmdData = []
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
class Instruction:
|
class Instruction:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.oneshot = 1
|
self.oneshot = 1
|
||||||
@ -130,7 +138,7 @@ class Instruction:
|
|||||||
model_str = f'"oneshot":"{self.oneshot}","action":"{self.action}","m0":"{self.m0}","m1":"{self.m1}","m2":"{self.m2}",' \
|
model_str = f'"oneshot":"{self.oneshot}","action":"{self.action}","m0":"{self.m0}","m1":"{self.m1}","m2":"{self.m2}",' \
|
||||||
f'"m3":"{self.m3}","m4":"{self.m4}","m5":"{self.m5}","ckStatus":"{self.ckStatus}","speed":"{self.speed}",' \
|
f'"m3":"{self.m3}","m4":"{self.m4}","m5":"{self.m5}","ckStatus":"{self.ckStatus}","speed":"{self.speed}",' \
|
||||||
f'"delay":"{self.delay}","smooth":"{self.smooth}","tool":"{self.tool}"'
|
f'"delay":"{self.delay}","smooth":"{self.smooth}","tool":"{self.tool}"'
|
||||||
print(model_str)
|
|
||||||
return model_str
|
return model_str
|
||||||
|
|
||||||
|
|
||||||
@ -143,8 +151,12 @@ class CMDInstructRequest:
|
|||||||
self.instructions = []
|
self.instructions = []
|
||||||
|
|
||||||
def toString(self):
|
def toString(self):
|
||||||
model_str = '{'+f'"dsID":"{self.dsID}","reqType":"{self.reqType}","emptyList":"{self.emptyList}","instructions":'
|
model_str = '{'+f'"dsID":"{self.dsID}","reqType":"{self.reqType}","emptyList":"{self.emptyList}"'
|
||||||
model_str = model_str+"[{"+self.instructions[0].toString()+"}]"+"}"
|
if len(self.instructions) != 0:
|
||||||
|
model_str = model_str+',"instructions":'+"[{"+self.instructions[0].toString()+"}]"+"}"
|
||||||
|
else:
|
||||||
|
model_str = model_str+"}"
|
||||||
|
print(model_str)
|
||||||
return model_str
|
return model_str
|
||||||
|
|
||||||
class CMDInstructReply:
|
class CMDInstructReply:
|
||||||
|
|||||||
141
app.py
141
app.py
@ -83,6 +83,11 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
self.pushButton_j5_add.clicked.connect(self.send_addOneAsix_button_click)
|
self.pushButton_j5_add.clicked.connect(self.send_addOneAsix_button_click)
|
||||||
self.pushButton_j6_add.clicked.connect(self.send_addOneAsix_button_click)
|
self.pushButton_j6_add.clicked.connect(self.send_addOneAsix_button_click)
|
||||||
|
|
||||||
|
self.pushButton_stopFeed.clicked.connect(self.send_stopFeed_button_click)
|
||||||
|
self.pushButton_pauseFeed.clicked.connect(self.send_pauseFeed_button_click)
|
||||||
|
|
||||||
|
self.pushButton_clearAlarm.clicked.connect(self.send_clear_alarm_command)
|
||||||
|
|
||||||
self.pushButton_speed.setText(str(Constant.speed))
|
self.pushButton_speed.setText(str(Constant.speed))
|
||||||
self.pushButton_speed.clicked.connect(self.send_setSpeed_label_doubelClick)
|
self.pushButton_speed.clicked.connect(self.send_setSpeed_label_doubelClick)
|
||||||
self.lineEdit_speed.returnPressed.connect(self.send_setSpeed_lineEdit_returePressed)
|
self.lineEdit_speed.returnPressed.connect(self.send_setSpeed_lineEdit_returePressed)
|
||||||
@ -104,7 +109,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
|
|
||||||
|
|
||||||
self.lineEdit_speed.hide()
|
self.lineEdit_speed.hide()
|
||||||
|
self.pushButton_stopFeed.hide()
|
||||||
|
self.pushButton_pauseFeed.hide()
|
||||||
|
|
||||||
def init_Run(self):
|
def init_Run(self):
|
||||||
self.robotClient = None
|
self.robotClient = None
|
||||||
@ -242,6 +248,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
name = self.configReader.get(line_str, 'Name', fallback='未命名')
|
name = self.configReader.get(line_str, 'Name', fallback='未命名')
|
||||||
self.feedLine_dict[f'{Constant.feedLine_set_section}{i+1}'] = FeedLine(name ,safe_position, photo_position, feed_position)
|
self.feedLine_dict[f'{Constant.feedLine_set_section}{i+1}'] = FeedLine(name ,safe_position, photo_position, feed_position)
|
||||||
self.init_seting_frame()
|
self.init_seting_frame()
|
||||||
|
self.updateUI_Select_Line()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def init_robot_info(self):
|
def init_robot_info(self):
|
||||||
@ -292,8 +299,10 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
def send_startFeed_button_click(self):
|
def send_startFeed_button_click(self):
|
||||||
num = self.horizontalSlider_feedingNum.maximum()
|
num = self.horizontalSlider_feedingNum.maximum()
|
||||||
line_index = str(self.comboBox_lineIndex.currentIndex()+1)
|
line_index = str(self.comboBox_lineIndex.currentIndex()+1)
|
||||||
self.command_quene.put(FeedCommand(FeedingConfig(num, self.feedLine_dict[f'{Constant.feedLine_set_section}{1}'])))
|
line_head = self.comboBox_lineIndex.currentData()
|
||||||
|
self.command_quene.put(FeedCommand(FeedingConfig(num, self.feedLine_dict[line_head])))
|
||||||
self.stackedWidget_num.setCurrentIndex(1)
|
self.stackedWidget_num.setCurrentIndex(1)
|
||||||
|
self.set_run_status_button(True)
|
||||||
|
|
||||||
def send_num_button_click(self):
|
def send_num_button_click(self):
|
||||||
button = self.sender()
|
button = self.sender()
|
||||||
@ -304,6 +313,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
self.horizontalSlider_feedingNum.setValue(0)
|
self.horizontalSlider_feedingNum.setValue(0)
|
||||||
else:
|
else:
|
||||||
self.pushButton_num_free.hide()
|
self.pushButton_num_free.hide()
|
||||||
|
self.lineEdit_num.show()
|
||||||
|
|
||||||
def send_subOneAsix_button_click(self):
|
def send_subOneAsix_button_click(self):
|
||||||
btn_str = self.sender().objectName()
|
btn_str = self.sender().objectName()
|
||||||
@ -377,6 +387,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
def send_stack_feedSet_button_click(self,index):
|
def send_stack_feedSet_button_click(self,index):
|
||||||
#self.logger.info("This is an info message")
|
#self.logger.info("This is an info message")
|
||||||
self.stackedWidget_feed.setCurrentIndex(index)
|
self.stackedWidget_feed.setCurrentIndex(index)
|
||||||
|
if index == 0:
|
||||||
|
self.updateUI_Select_Line()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -410,28 +422,6 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
self.pushButton_speed.show()
|
self.pushButton_speed.show()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def send_position_command(self,x1,x2,x3,x4,x5,x6,move_type:MoveType=MoveType.WORLD):
|
|
||||||
position_instruction = Instruction()
|
|
||||||
position_instruction.m0 = float(x1)
|
|
||||||
position_instruction.m1 = float(x2)
|
|
||||||
position_instruction.m2 = float(x3)
|
|
||||||
position_instruction.m3 = float(x4)
|
|
||||||
position_instruction.m4 = float(x5)
|
|
||||||
position_instruction.m5 = float(x6)
|
|
||||||
position_instruction.action = move_type.value
|
|
||||||
instruction_command = CMDInstructRequest()
|
|
||||||
instruction_command.instructions.append(position_instruction)
|
|
||||||
request_command = instruction_command.toString()
|
|
||||||
print(request_command)
|
|
||||||
log_str = f'移动到位置:{"自由路径" if move_type==MoveType.AXIS else "姿势直线"}:' \
|
|
||||||
f'm0:{position_instruction.m0}-' \
|
|
||||||
f'm2:{position_instruction.m1}-' \
|
|
||||||
f'm3:{position_instruction.m2}-' \
|
|
||||||
f'm4:{position_instruction.m3}-' \
|
|
||||||
f'm5:{position_instruction.m4}-' \
|
|
||||||
f'm6:{position_instruction.m5}'
|
|
||||||
self.logger_textEdit.info(log_str)
|
|
||||||
self.robotClient.add_sendQuene(request_command)
|
|
||||||
|
|
||||||
def send_get_safe_position_button_click(self):
|
def send_get_safe_position_button_click(self):
|
||||||
real_position = self.robotClient.status_model.getRealPosition()
|
real_position = self.robotClient.status_model.getRealPosition()
|
||||||
@ -490,6 +480,24 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
writeFeedLine_to_ini(self.feedLine_dict, Constant.feedLine_set_file)
|
writeFeedLine_to_ini(self.feedLine_dict, Constant.feedLine_set_file)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def send_stopFeed_button_click(self):
|
||||||
|
pass
|
||||||
|
# 清空状态
|
||||||
|
self.feeding.feedStatus = FeedStatus.FNone
|
||||||
|
# 清空运行命令
|
||||||
|
self.send_clear_auto_command()
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
def send_pauseFeed_button_click(self):
|
||||||
|
if self.pushButton_pauseFeed.text()=='暂停':
|
||||||
|
self.pushButton_pauseFeed.setText('继续')
|
||||||
|
self.send_pause_command(True)
|
||||||
|
else:
|
||||||
|
self.pushButton_pauseFeed.setText('暂停')
|
||||||
|
self.send_pause_command(False)
|
||||||
|
|
||||||
|
pass
|
||||||
def send_tabelFeedSet_itemChanged(self, item):
|
def send_tabelFeedSet_itemChanged(self, item):
|
||||||
row = item.row()
|
row = item.row()
|
||||||
column = item.column()
|
column = item.column()
|
||||||
@ -565,7 +573,9 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
self.set_label_status_style(False)
|
self.set_label_status_style(False)
|
||||||
if self.feeding.feedStatus != FeedStatus.FNone:
|
if self.feeding.feedStatus != FeedStatus.FNone:
|
||||||
self.horizontalSlider_feedingNum.setValue(self.horizontalSlider_feedingNum.maximum()-self.feeding.feedConfig.num)
|
self.horizontalSlider_feedingNum.setValue(self.horizontalSlider_feedingNum.maximum()-self.feeding.feedConfig.num)
|
||||||
if self.horizontalSlider_feedingNum.value() == 0:
|
else:
|
||||||
|
self.set_run_status_button(False)
|
||||||
|
if self.feeding.feedStatus == FeedStatus.FNone:
|
||||||
self.stackedWidget_num.setCurrentIndex(0)
|
self.stackedWidget_num.setCurrentIndex(0)
|
||||||
else:
|
else:
|
||||||
self.stackedWidget_num.setCurrentIndex(1)
|
self.stackedWidget_num.setCurrentIndex(1)
|
||||||
@ -574,6 +584,11 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
self.label_time.setText(datetime.now().strftime("%H:%M:%S"))
|
self.label_time.setText(datetime.now().strftime("%H:%M:%S"))
|
||||||
self.updateUI_Position()
|
self.updateUI_Position()
|
||||||
|
|
||||||
|
def updateUI_Select_Line(self):
|
||||||
|
self.comboBox_lineIndex.clear()
|
||||||
|
for key,value in self.feedLine_dict.items():
|
||||||
|
self.comboBox_lineIndex.addItem(value.name,key)
|
||||||
|
|
||||||
def updateUI_Position(self):
|
def updateUI_Position(self):
|
||||||
self.horizontalSlider_J1.setValue(self.status_address.axis_0)
|
self.horizontalSlider_J1.setValue(self.status_address.axis_0)
|
||||||
self.horizontalSlider_J2.setValue(self.status_address.axis_1)
|
self.horizontalSlider_J2.setValue(self.status_address.axis_1)
|
||||||
@ -619,6 +634,82 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
|||||||
qproperty-alignment: 'AlignCenter'; /* 设置文本居中 */
|
qproperty-alignment: 'AlignCenter'; /* 设置文本居中 */
|
||||||
}
|
}
|
||||||
""")
|
""")
|
||||||
|
def set_run_status_button(self, isRuning:bool):
|
||||||
|
self.pushButton_pauseFeed.setText("暂停")
|
||||||
|
if isRuning:
|
||||||
|
self.pushButton_pauseFeed.show()
|
||||||
|
self.pushButton_stopFeed.show()
|
||||||
|
self.pushButton_startFeed.hide()
|
||||||
|
else:
|
||||||
|
self.pushButton_pauseFeed.hide()
|
||||||
|
self.pushButton_stopFeed.hide()
|
||||||
|
self.pushButton_startFeed.show()
|
||||||
|
def send_clear_auto_command(self):
|
||||||
|
clear_command = CMDInstructRequest()
|
||||||
|
request_command = clear_command.toString()
|
||||||
|
print(request_command)
|
||||||
|
log_str = f'清除自动指令'
|
||||||
|
self.command_quene.put(request_command)
|
||||||
|
def send_position_command(self,x1,x2,x3,x4,x5,x6,move_type:MoveType=MoveType.WORLD):
|
||||||
|
position_instruction = Instruction()
|
||||||
|
position_instruction.m0 = float(x1)
|
||||||
|
position_instruction.m1 = float(x2)
|
||||||
|
position_instruction.m2 = float(x3)
|
||||||
|
position_instruction.m3 = float(x4)
|
||||||
|
position_instruction.m4 = float(x5)
|
||||||
|
position_instruction.m5 = float(x6)
|
||||||
|
position_instruction.action = move_type.value
|
||||||
|
instruction_command = CMDInstructRequest()
|
||||||
|
instruction_command.instructions.append(position_instruction)
|
||||||
|
request_command = instruction_command.toString()
|
||||||
|
log_str = f'移动到位置:{"自由路径" if move_type==MoveType.AXIS else "姿势直线"}:' \
|
||||||
|
f'm0:{position_instruction.m0}-' \
|
||||||
|
f'm2:{position_instruction.m1}-' \
|
||||||
|
f'm3:{position_instruction.m2}-' \
|
||||||
|
f'm4:{position_instruction.m3}-' \
|
||||||
|
f'm5:{position_instruction.m4}-' \
|
||||||
|
f'm6:{position_instruction.m5}'
|
||||||
|
self.logger_textEdit.info(log_str)
|
||||||
|
self.robotClient.add_sendQuene(request_command)
|
||||||
|
|
||||||
|
def send_pause_command(self,pause:bool):
|
||||||
|
pause_command = CMDRequest()
|
||||||
|
pause_command.cmdData.append("actionPause")
|
||||||
|
if pause:
|
||||||
|
pause_command.cmdData.append("1")
|
||||||
|
else:
|
||||||
|
pause_command.cmdData.append("0")
|
||||||
|
request_command = pause_command.toString()
|
||||||
|
print(request_command)
|
||||||
|
log_str = f'暂停:{pause}'
|
||||||
|
self.robotClient.add_sendQuene(request_command)
|
||||||
|
|
||||||
|
def send_clear_alarm_command(self,pause:bool):
|
||||||
|
pause_command = CMDRequest()
|
||||||
|
pause_command.cmdData.append("clearAlarmContinue")
|
||||||
|
pause_command.cmdData.append("1")
|
||||||
|
request_command = pause_command.toString()
|
||||||
|
print(request_command)
|
||||||
|
log_str = f'暂停:{pause}'
|
||||||
|
self.robotClient.add_sendQuene(request_command)
|
||||||
|
|
||||||
|
def send_switch_tool_command(self):
|
||||||
|
switch_command = CMDRequest()
|
||||||
|
switch_command.cmdData.append("switchTool")
|
||||||
|
switch_command.cmdData.append("2")
|
||||||
|
request_command = switch_command.toString()
|
||||||
|
print(request_command)
|
||||||
|
log_str = f'切换工具'
|
||||||
|
self.robotClient.add_sendQuene(request_command)
|
||||||
|
|
||||||
|
def send_start_tool_command(self):
|
||||||
|
switch_command = CMDRequest()
|
||||||
|
switch_command.cmdData.append("startButton")
|
||||||
|
switch_command.cmdData.append("1")
|
||||||
|
request_command = switch_command.toString()
|
||||||
|
print(request_command)
|
||||||
|
log_str = f'切换工具'
|
||||||
|
self.robotClient.add_sendQuene(request_command)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -692,10 +692,10 @@ class Ui_MainWindow(object):
|
|||||||
"")
|
"")
|
||||||
self.pushButton_SubNum.setIcon(icon1)
|
self.pushButton_SubNum.setIcon(icon1)
|
||||||
self.stackedWidget_num.addWidget(self.page_10)
|
self.stackedWidget_num.addWidget(self.page_10)
|
||||||
self.pushButton_20 = QPushButton(self.frame_6)
|
self.pushButton_clearAlarm = QPushButton(self.frame_6)
|
||||||
self.pushButton_20.setObjectName(u"pushButton_20")
|
self.pushButton_clearAlarm.setObjectName(u"pushButton_clearAlarm")
|
||||||
self.pushButton_20.setGeometry(QRect(750, 480, 91, 31))
|
self.pushButton_clearAlarm.setGeometry(QRect(750, 480, 91, 31))
|
||||||
self.pushButton_20.setStyleSheet(u"*{\n"
|
self.pushButton_clearAlarm.setStyleSheet(u"*{\n"
|
||||||
"background-color: #1CB2B1;\n"
|
"background-color: #1CB2B1;\n"
|
||||||
"font: 9pt \"\u6977\u4f53\";\n"
|
"font: 9pt \"\u6977\u4f53\";\n"
|
||||||
"border: 1px solid #dcdfe6;\n"
|
"border: 1px solid #dcdfe6;\n"
|
||||||
@ -708,23 +708,7 @@ class Ui_MainWindow(object):
|
|||||||
"\n"
|
"\n"
|
||||||
"")
|
"")
|
||||||
icon2 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.HelpFaq))
|
icon2 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.HelpFaq))
|
||||||
self.pushButton_20.setIcon(icon2)
|
self.pushButton_clearAlarm.setIcon(icon2)
|
||||||
self.pushButton_startFeed = QPushButton(self.frame_6)
|
|
||||||
self.pushButton_startFeed.setObjectName(u"pushButton_startFeed")
|
|
||||||
self.pushButton_startFeed.setGeometry(QRect(350, 480, 91, 31))
|
|
||||||
self.pushButton_startFeed.setStyleSheet(u"*{\n"
|
|
||||||
"background-color: #499C54;\n"
|
|
||||||
"font: 9pt \"\u6977\u4f53\";\n"
|
|
||||||
"border: 1px solid #dcdfe6;\n"
|
|
||||||
"border-radius: 10px;\n"
|
|
||||||
"}\n"
|
|
||||||
"*:pressed\n"
|
|
||||||
"{\n"
|
|
||||||
"background-color: #499c8a;\n"
|
|
||||||
"}\n"
|
|
||||||
"")
|
|
||||||
icon3 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemShutdown))
|
|
||||||
self.pushButton_startFeed.setIcon(icon3)
|
|
||||||
self.pushButton_reset = QPushButton(self.frame_6)
|
self.pushButton_reset = QPushButton(self.frame_6)
|
||||||
self.pushButton_reset.setObjectName(u"pushButton_reset")
|
self.pushButton_reset.setObjectName(u"pushButton_reset")
|
||||||
self.pushButton_reset.setGeometry(QRect(450, 480, 91, 31))
|
self.pushButton_reset.setGeometry(QRect(450, 480, 91, 31))
|
||||||
@ -739,8 +723,8 @@ class Ui_MainWindow(object):
|
|||||||
"background-color: #FFF000;\n"
|
"background-color: #FFF000;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"")
|
"")
|
||||||
icon4 = QIcon(QIcon.fromTheme(u"media-optical"))
|
icon3 = QIcon(QIcon.fromTheme(u"media-optical"))
|
||||||
self.pushButton_reset.setIcon(icon4)
|
self.pushButton_reset.setIcon(icon3)
|
||||||
self.pushButton_21 = QPushButton(self.frame_6)
|
self.pushButton_21 = QPushButton(self.frame_6)
|
||||||
self.pushButton_21.setObjectName(u"pushButton_21")
|
self.pushButton_21.setObjectName(u"pushButton_21")
|
||||||
self.pushButton_21.setGeometry(QRect(650, 480, 91, 31))
|
self.pushButton_21.setGeometry(QRect(650, 480, 91, 31))
|
||||||
@ -757,8 +741,8 @@ class Ui_MainWindow(object):
|
|||||||
"}\n"
|
"}\n"
|
||||||
"\n"
|
"\n"
|
||||||
"")
|
"")
|
||||||
icon5 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.InputMouse))
|
icon4 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.InputMouse))
|
||||||
self.pushButton_21.setIcon(icon5)
|
self.pushButton_21.setIcon(icon4)
|
||||||
self.pushButton_17 = QPushButton(self.frame_6)
|
self.pushButton_17 = QPushButton(self.frame_6)
|
||||||
self.pushButton_17.setObjectName(u"pushButton_17")
|
self.pushButton_17.setObjectName(u"pushButton_17")
|
||||||
self.pushButton_17.setGeometry(QRect(550, 480, 91, 31))
|
self.pushButton_17.setGeometry(QRect(550, 480, 91, 31))
|
||||||
@ -774,14 +758,14 @@ class Ui_MainWindow(object):
|
|||||||
"}\n"
|
"}\n"
|
||||||
"\n"
|
"\n"
|
||||||
"")
|
"")
|
||||||
icon6 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.WindowClose))
|
icon5 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.WindowClose))
|
||||||
self.pushButton_17.setIcon(icon6)
|
self.pushButton_17.setIcon(icon5)
|
||||||
self.lineEdit_speed = QLineEdit(self.frame_6)
|
self.lineEdit_speed = QLineEdit(self.frame_6)
|
||||||
self.lineEdit_speed.setObjectName(u"lineEdit_speed")
|
self.lineEdit_speed.setObjectName(u"lineEdit_speed")
|
||||||
self.lineEdit_speed.setGeometry(QRect(110, 490, 113, 21))
|
self.lineEdit_speed.setGeometry(QRect(110, 490, 113, 21))
|
||||||
self.label_2 = QLabel(self.frame_6)
|
self.label_2 = QLabel(self.frame_6)
|
||||||
self.label_2.setObjectName(u"label_2")
|
self.label_2.setObjectName(u"label_2")
|
||||||
self.label_2.setGeometry(QRect(20, 493, 81, 16))
|
self.label_2.setGeometry(QRect(10, 490, 81, 16))
|
||||||
self.pushButton_speed = QPushButton(self.frame_6)
|
self.pushButton_speed = QPushButton(self.frame_6)
|
||||||
self.pushButton_speed.setObjectName(u"pushButton_speed")
|
self.pushButton_speed.setObjectName(u"pushButton_speed")
|
||||||
self.pushButton_speed.setGeometry(QRect(100, 490, 75, 23))
|
self.pushButton_speed.setGeometry(QRect(100, 490, 75, 23))
|
||||||
@ -822,6 +806,53 @@ class Ui_MainWindow(object):
|
|||||||
"}\n"
|
"}\n"
|
||||||
"")
|
"")
|
||||||
self.tabWidget_2.addTab(self.tab_4, "")
|
self.tabWidget_2.addTab(self.tab_4, "")
|
||||||
|
self.pushButton_stopFeed = QPushButton(self.frame_6)
|
||||||
|
self.pushButton_stopFeed.setObjectName(u"pushButton_stopFeed")
|
||||||
|
self.pushButton_stopFeed.setGeometry(QRect(250, 480, 91, 31))
|
||||||
|
self.pushButton_stopFeed.setStyleSheet(u"*{\n"
|
||||||
|
"background-color: #F44336;\n"
|
||||||
|
"font: 9pt \"\u6977\u4f53\";\n"
|
||||||
|
"border: 1px solid #dcdfe6;\n"
|
||||||
|
"border-radius: 10px;\n"
|
||||||
|
"}\n"
|
||||||
|
"*:pressed\n"
|
||||||
|
"{\n"
|
||||||
|
"background-color: #499c8a;\n"
|
||||||
|
"}\n"
|
||||||
|
"")
|
||||||
|
icon6 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemShutdown))
|
||||||
|
self.pushButton_stopFeed.setIcon(icon6)
|
||||||
|
self.pushButton_startFeed = QPushButton(self.frame_6)
|
||||||
|
self.pushButton_startFeed.setObjectName(u"pushButton_startFeed")
|
||||||
|
self.pushButton_startFeed.setGeometry(QRect(350, 480, 91, 31))
|
||||||
|
self.pushButton_startFeed.setStyleSheet(u"*{\n"
|
||||||
|
"background-color: #499C54;\n"
|
||||||
|
"font: 9pt \"\u6977\u4f53\";\n"
|
||||||
|
"border: 1px solid #dcdfe6;\n"
|
||||||
|
"border-radius: 10px;\n"
|
||||||
|
"}\n"
|
||||||
|
"*:pressed\n"
|
||||||
|
"{\n"
|
||||||
|
"background-color: #499c8a;\n"
|
||||||
|
"}\n"
|
||||||
|
"")
|
||||||
|
self.pushButton_startFeed.setIcon(icon6)
|
||||||
|
self.pushButton_pauseFeed = QPushButton(self.frame_6)
|
||||||
|
self.pushButton_pauseFeed.setObjectName(u"pushButton_pauseFeed")
|
||||||
|
self.pushButton_pauseFeed.setGeometry(QRect(350, 480, 91, 31))
|
||||||
|
self.pushButton_pauseFeed.setStyleSheet(u"*{\n"
|
||||||
|
"background-color: #2196F3;\n"
|
||||||
|
"font: 9pt \"\u6977\u4f53\";\n"
|
||||||
|
"border: 1px solid #dcdfe6;\n"
|
||||||
|
"border-radius: 10px;\n"
|
||||||
|
"}\n"
|
||||||
|
"*:pressed\n"
|
||||||
|
"{\n"
|
||||||
|
"background-color: #499c8a;\n"
|
||||||
|
"}\n"
|
||||||
|
"")
|
||||||
|
icon7 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackPause))
|
||||||
|
self.pushButton_pauseFeed.setIcon(icon7)
|
||||||
self.stackedWidget_feed.addWidget(self.page_6)
|
self.stackedWidget_feed.addWidget(self.page_6)
|
||||||
self.page_7 = QWidget()
|
self.page_7 = QWidget()
|
||||||
self.page_7.setObjectName(u"page_7")
|
self.page_7.setObjectName(u"page_7")
|
||||||
@ -999,8 +1030,7 @@ class Ui_MainWindow(object):
|
|||||||
self.lineEdit_num.setPlaceholderText(QCoreApplication.translate("MainWindow", u"0-100", None))
|
self.lineEdit_num.setPlaceholderText(QCoreApplication.translate("MainWindow", u"0-100", None))
|
||||||
self.pushButton_AddNum.setText(QCoreApplication.translate("MainWindow", u"\u8865\u4e00\u888b", None))
|
self.pushButton_AddNum.setText(QCoreApplication.translate("MainWindow", u"\u8865\u4e00\u888b", None))
|
||||||
self.pushButton_SubNum.setText(QCoreApplication.translate("MainWindow", u"\u6263\u4e00\u888b", None))
|
self.pushButton_SubNum.setText(QCoreApplication.translate("MainWindow", u"\u6263\u4e00\u888b", None))
|
||||||
self.pushButton_20.setText(QCoreApplication.translate("MainWindow", u"\u6545\u969c\u8bca\u65ad", None))
|
self.pushButton_clearAlarm.setText(QCoreApplication.translate("MainWindow", u"\u6e05\u695a\u62a5\u8b66", None))
|
||||||
self.pushButton_startFeed.setText(QCoreApplication.translate("MainWindow", u"\u542f\u52a8", None))
|
|
||||||
self.pushButton_reset.setText(QCoreApplication.translate("MainWindow", u"\u590d\u4f4d", None))
|
self.pushButton_reset.setText(QCoreApplication.translate("MainWindow", u"\u590d\u4f4d", None))
|
||||||
self.pushButton_21.setText(QCoreApplication.translate("MainWindow", u"\u8c03\u8bd5", None))
|
self.pushButton_21.setText(QCoreApplication.translate("MainWindow", u"\u8c03\u8bd5", None))
|
||||||
self.pushButton_17.setText(QCoreApplication.translate("MainWindow", u"\u6025\u505c", None))
|
self.pushButton_17.setText(QCoreApplication.translate("MainWindow", u"\u6025\u505c", None))
|
||||||
@ -1026,6 +1056,9 @@ class Ui_MainWindow(object):
|
|||||||
"</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
"</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
||||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
|
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
|
||||||
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), QCoreApplication.translate("MainWindow", u"\u62a5\u8b66", None))
|
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), QCoreApplication.translate("MainWindow", u"\u62a5\u8b66", None))
|
||||||
|
self.pushButton_stopFeed.setText(QCoreApplication.translate("MainWindow", u"\u505c\u6b62", None))
|
||||||
|
self.pushButton_startFeed.setText(QCoreApplication.translate("MainWindow", u"\u542f\u52a8", None))
|
||||||
|
self.pushButton_pauseFeed.setText(QCoreApplication.translate("MainWindow", u"\u6682\u505c", None))
|
||||||
self.pushButton_tableFeedSet_addRow.setText(QCoreApplication.translate("MainWindow", u"\u65b0\u589e\u7ebf", None))
|
self.pushButton_tableFeedSet_addRow.setText(QCoreApplication.translate("MainWindow", u"\u65b0\u589e\u7ebf", None))
|
||||||
self.pushButton_tableFeedSet_deleRow.setText(QCoreApplication.translate("MainWindow", u"\u5220\u9664\u7ebf", None))
|
self.pushButton_tableFeedSet_deleRow.setText(QCoreApplication.translate("MainWindow", u"\u5220\u9664\u7ebf", None))
|
||||||
self.pushButton_tableFeedSet_save.setText(QCoreApplication.translate("MainWindow", u"\u4fdd\u5b58", None))
|
self.pushButton_tableFeedSet_save.setText(QCoreApplication.translate("MainWindow", u"\u4fdd\u5b58", None))
|
||||||
|
|||||||
124
untitled.ui
124
untitled.ui
@ -1520,7 +1520,7 @@ background-color: #499c8a;
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="pushButton_20">
|
<widget class="QPushButton" name="pushButton_clearAlarm">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>750</x>
|
<x>750</x>
|
||||||
@ -1544,41 +1544,12 @@ background-color:#1cb052;
|
|||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>故障诊断</string>
|
<string>清楚报警</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="QIcon::ThemeIcon::HelpFaq"/>
|
<iconset theme="QIcon::ThemeIcon::HelpFaq"/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="pushButton_startFeed">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>350</x>
|
|
||||||
<y>480</y>
|
|
||||||
<width>91</width>
|
|
||||||
<height>31</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">*{
|
|
||||||
background-color: #499C54;
|
|
||||||
font: 9pt "楷体";
|
|
||||||
border: 1px solid #dcdfe6;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
*:pressed
|
|
||||||
{
|
|
||||||
background-color: #499c8a;
|
|
||||||
}
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>启动</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="QIcon::ThemeIcon::SystemShutdown"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton" name="pushButton_reset">
|
<widget class="QPushButton" name="pushButton_reset">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@ -1688,8 +1659,8 @@ background-color: #ff6e00;
|
|||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>10</x>
|
||||||
<y>493</y>
|
<y>490</y>
|
||||||
<width>81</width>
|
<width>81</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -1802,6 +1773,93 @@ li.checked::marker { content: "\2612"; }
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_stopFeed">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>250</x>
|
||||||
|
<y>480</y>
|
||||||
|
<width>91</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">*{
|
||||||
|
background-color: #F44336;
|
||||||
|
font: 9pt "楷体";
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
*:pressed
|
||||||
|
{
|
||||||
|
background-color: #499c8a;
|
||||||
|
}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>停止</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::SystemShutdown"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_startFeed">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>350</x>
|
||||||
|
<y>480</y>
|
||||||
|
<width>91</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">*{
|
||||||
|
background-color: #499C54;
|
||||||
|
font: 9pt "楷体";
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
*:pressed
|
||||||
|
{
|
||||||
|
background-color: #499c8a;
|
||||||
|
}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>启动</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::SystemShutdown"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_pauseFeed">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>350</x>
|
||||||
|
<y>480</y>
|
||||||
|
<width>91</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">*{
|
||||||
|
background-color: #2196F3;
|
||||||
|
font: 9pt "楷体";
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
*:pressed
|
||||||
|
{
|
||||||
|
background-color: #499c8a;
|
||||||
|
}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>暂停</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::MediaPlaybackPause"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
Reference in New Issue
Block a user