修改继电器配置界面
This commit is contained in:
parent
21ea1b3f8b
commit
28e8e6779c
@ -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() == "重置模块"){
|
||||
|
@ -1024,17 +1024,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>绿色闪烁</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup_TX_RX</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="text">
|
||||
<string>绿色</string>
|
||||
<string>黄绿色闪烁</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup_TX_RX</string>
|
||||
@ -1168,7 +1158,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_7">
|
||||
<property name="text">
|
||||
<string>绿色</string>
|
||||
<string>黄绿</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup_OK</string>
|
||||
@ -1328,24 +1318,24 @@
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup_16"/>
|
||||
<buttongroup name="buttonGroup_12"/>
|
||||
<buttongroup name="buttonGroup_TX_RX"/>
|
||||
<buttongroup name="buttonGroup_OK"/>
|
||||
<buttongroup name="buttonGroup_9"/>
|
||||
<buttongroup name="buttonGroup_2"/>
|
||||
<buttongroup name="buttonGroup_8"/>
|
||||
<buttongroup name="buttonGroup_TEST"/>
|
||||
<buttongroup name="buttonGroup_1"/>
|
||||
<buttongroup name="buttonGroup_3"/>
|
||||
<buttongroup name="buttonGroup_6"/>
|
||||
<buttongroup name="buttonGroup_4"/>
|
||||
<buttongroup name="buttonGroup_7"/>
|
||||
<buttongroup name="buttonGroup_10"/>
|
||||
<buttongroup name="buttonGroup_14"/>
|
||||
<buttongroup name="buttonGroup_11"/>
|
||||
<buttongroup name="buttonGroup_5"/>
|
||||
<buttongroup name="buttonGroup_STATUS"/>
|
||||
<buttongroup name="buttonGroup_8"/>
|
||||
<buttongroup name="buttonGroup_6"/>
|
||||
<buttongroup name="buttonGroup_15"/>
|
||||
<buttongroup name="buttonGroup_OK"/>
|
||||
<buttongroup name="buttonGroup_7"/>
|
||||
<buttongroup name="buttonGroup_11"/>
|
||||
<buttongroup name="buttonGroup_3"/>
|
||||
<buttongroup name="buttonGroup_4"/>
|
||||
<buttongroup name="buttonGroup_TX_RX"/>
|
||||
<buttongroup name="buttonGroup_5"/>
|
||||
<buttongroup name="buttonGroup_2"/>
|
||||
<buttongroup name="buttonGroup_TEST"/>
|
||||
<buttongroup name="buttonGroup_9"/>
|
||||
<buttongroup name="buttonGroup_12"/>
|
||||
<buttongroup name="buttonGroup_10"/>
|
||||
<buttongroup name="buttonGroup_13"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -332,7 +332,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -1206,7 +1206,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
|
Loading…
x
Reference in New Issue
Block a user