|
@@ -239,16 +239,25 @@ void firingWidget::handleProjectFiringMqttMessage(const QByteArray &message, con
|
|
case FiringStages::QuickTestFinished:
|
|
case FiringStages::QuickTestFinished:
|
|
// 组网测试检查报错雷管数量,如果有错误,提示用户确认是否继续
|
|
// 组网测试检查报错雷管数量,如果有错误,提示用户确认是否继续
|
|
if (relayInfo["errorCount"].toInt() > 0) {
|
|
if (relayInfo["errorCount"].toInt() > 0) {
|
|
- QMessageBox::StandardButton reply;
|
|
|
|
- reply = QMessageBox::question(nullptr, "组网测试错误",
|
|
|
|
- QString("组网测试发现 %1 个报错雷管,是否继续起爆?")
|
|
|
|
- .arg(relayInfo["errorCount"].toInt()),
|
|
|
|
- QMessageBox::Yes | QMessageBox::No);
|
|
|
|
- if (reply == QMessageBox::No) {
|
|
|
|
|
|
+ QMessageBox msgBox;
|
|
|
|
+ msgBox.setWindowTitle("组网测试错误");
|
|
|
|
+ msgBox.setText(QString("组网测试发现 %1 个报错雷管,是否继续起爆?")
|
|
|
|
+ .arg(relayInfo["errorCount"].toInt()));
|
|
|
|
+ QPushButton *yesButton = msgBox.addButton("确定继续", QMessageBox::YesRole);
|
|
|
|
+ QPushButton *noButton = msgBox.addButton("取消", QMessageBox::NoRole);
|
|
|
|
+ yesButton->setStyleSheet(
|
|
|
|
+ "QPushButton { background-color:rgb(5, 58, 156); color: white; padding: 5px 15px; "
|
|
|
|
+ "border-radius: 4px; }");
|
|
|
|
+ noButton->setStyleSheet(
|
|
|
|
+ "QPushButton { background-color: #f44336; color: white; padding: 5px 15px; "
|
|
|
|
+ "border-radius: 4px; }");
|
|
|
|
+ msgBox.exec();
|
|
|
|
+ if (msgBox.clickedButton() == noButton) {
|
|
cancelBlasting();
|
|
cancelBlasting();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
ui->pushButton_2->setEnabled(true);
|
|
ui->pushButton_2->setEnabled(true);
|
|
ui->pushButton_2->setText("充电");
|
|
ui->pushButton_2->setText("充电");
|
|
navProgress->setState(FiringStages::QuickTestFinished);
|
|
navProgress->setState(FiringStages::QuickTestFinished);
|