diff --git a/mainwindow.cpp b/mainwindow.cpp index 803f05e..dcc7d8f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -311,24 +311,35 @@ void MainWindow::onMenuActionTriggered() int button_id = button->objectName().right(button->objectName().length()-15).toInt(); qDebug() << slot_type << rack_type << button_id << map_slot_config[button_id + 1].slot_type << map_slot_config[button_id + 2].slot_type ; map_slot_config[button_id].slot_label->setStyleSheet("QLabel { color :#2980b9; font: bold 16px}"); + QString chan_display = ""; + if(slot_type == "DOM810") + chan_display = "继电器"; + else if(slot_type == "KPM834") + chan_display = "键相"; + else if(slot_type == "HAM824") + chan_display = "振动"; + else if(slot_type == "OPM844") + chan_display = "转速"; if(rack_type == "三冗余板卡" && (map_slot_config[button_id].slot_type != "" || map_slot_config[button_id + 1].slot_type != "" \ || map_slot_config[button_id + 2].slot_type != "")){ QMessageBox::information(this, QStringLiteral("提示"), "不要重叠三冗余板卡配置,请在创建新配置之前移除现有的配置!"); return; }else if(rack_type == "三冗余板卡" && map_slot_config[button_id + 1].slot_type == "" \ && map_slot_config[button_id + 2].slot_type == ""){ + + map_slot_config[button_id].slot_type = slot_type; map_slot_config[button_id].rack_type = "TMR1"; - map_slot_config[button_id].slot_btn->setText(action->text()); - map_slot_config[button_id].chan_display = action->text(); + map_slot_config[button_id].slot_btn->setText(chan_display); + map_slot_config[button_id].chan_display = chan_display; map_slot_config[button_id + 1].slot_type = slot_type; map_slot_config[button_id + 1].rack_type = "TMR2"; - map_slot_config[button_id + 1].slot_btn->setText(action->text()); - map_slot_config[button_id + 1].chan_display = action->text(); + map_slot_config[button_id + 1].slot_btn->setText(chan_display); + map_slot_config[button_id + 1].chan_display = chan_display; map_slot_config[button_id + 2].slot_type = slot_type; map_slot_config[button_id + 2].rack_type = "TMR3"; - map_slot_config[button_id + 2].slot_btn->setText(action->text()); - map_slot_config[button_id + 2].chan_display = action->text(); + map_slot_config[button_id + 2].slot_btn->setText(chan_display); + map_slot_config[button_id + 2].chan_display = chan_display; } if(rack_type == "两板卡" && (map_slot_config[button_id].slot_type != "" || map_slot_config[button_id + 1].slot_type != "" )){ QMessageBox::information(this, QStringLiteral("提示"), "不要重叠两板卡配置,请在创建新配置之前移除现有的配置!"); @@ -336,12 +347,12 @@ void MainWindow::onMenuActionTriggered() }else if(rack_type == "两板卡" && map_slot_config[button_id + 1].slot_type == ""){ map_slot_config[button_id].slot_type = slot_type; map_slot_config[button_id].rack_type = "Double1"; - map_slot_config[button_id].slot_btn->setText(action->text()); - map_slot_config[button_id].chan_display = action->text(); + map_slot_config[button_id].slot_btn->setText(chan_display); + map_slot_config[button_id].chan_display = chan_display; map_slot_config[button_id + 1].slot_type = slot_type; map_slot_config[button_id + 1].rack_type = "Double2"; - map_slot_config[button_id + 1].slot_btn->setText(action->text()); - map_slot_config[button_id + 1].chan_display = action->text(); + map_slot_config[button_id + 1].slot_btn->setText(chan_display); + map_slot_config[button_id + 1].chan_display = chan_display; } if(rack_type == "单板卡" && map_slot_config[button_id].slot_type != ""){ QMessageBox::information(this, QStringLiteral("提示"), "不要重叠单板卡配置,请在创建新配置之前移除现有的配置!"); @@ -349,8 +360,8 @@ void MainWindow::onMenuActionTriggered() }else if(rack_type == "单板卡" && map_slot_config[button_id].slot_type == "") { map_slot_config[button_id].slot_type = slot_type; map_slot_config[button_id].rack_type = "Single"; - map_slot_config[button_id].chan_display = action->text(); - button->setText(action->text()); + map_slot_config[button_id].chan_display = chan_display; + button->setText(chan_display); } if(action->text() == "重置模块"){ diff --git a/relaysetting.ui b/relaysetting.ui index 0913808..0570dca 100644 --- a/relaysetting.ui +++ b/relaysetting.ui @@ -1024,17 +1024,7 @@ - 绿色闪烁 - - - buttonGroup_TX_RX - - - - - - - 绿色 + 黄绿色闪烁 buttonGroup_TX_RX @@ -1168,7 +1158,7 @@ - 绿色 + 黄绿 buttonGroup_OK @@ -1328,24 +1318,24 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/seismic_monitor.ui b/seismic_monitor.ui index 400bf02..cca9162 100644 --- a/seismic_monitor.ui +++ b/seismic_monitor.ui @@ -332,7 +332,7 @@ - 1 + 0 @@ -1206,7 +1206,7 @@ - 1 + 0