diff --git a/config_mgr.cpp b/config_mgr.cpp index c304f92..8d10ac2 100644 --- a/config_mgr.cpp +++ b/config_mgr.cpp @@ -596,30 +596,16 @@ void ConfigMgr::Save(QString & file_path) { channel_item.insert("group",ptr->single_relay[ch].group); } } - }else if(card_type_[i] == kCardRelaySingleNOK){ std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot); if (base_ptr == nullptr) { continue; } std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr); - if(ptr->single_relay[ch].vote){ - channel_item.insert("count_vote",ptr->single_relay[ch].count_vote); - QJsonArray array_logic; - for(int var = 0 ; var < 10;++var){ - if(ptr->single_relay[ch].logic[var] != ""){ - array_logic.append(ptr->single_relay[ch].logic[var]); - } - } - channel_item.insert("logic_vote", array_logic); - }else{ - if(ptr->single_relay[ch].logic_expression != ""){ - qDebug() << "ch" << ch << ptr->single_relay[ch].logic_expression; - channel_item.insert("logic_expression", ptr->single_relay[ch].logic_expression); - channel_item.insert("vote",ptr->single_relay[ch].vote); - channel_item.insert("active", ptr->single_relay[ch].active); - channel_item.insert("group",ptr->single_relay[ch].group); - } + if(ptr->single_relay[ch].logic_expression != ""){ + qDebug() << "ch" << ch << ptr->single_relay[ch].logic_expression; + channel_item.insert("logic_expression", ptr->single_relay[ch].logic_expression); + channel_item.insert("active", ptr->single_relay[ch].active); } }else if(card_type_[i] == kCardRelayTMRPrimary){ @@ -1158,16 +1144,7 @@ void ConfigMgr::Load(QString filename) { singlerelay_data->version_ = temp_obj["version"].toInt(); for (int j = 0; j < RELAY_COUNT; ++j) { channel = temp_obj[QString::number(j + 1)].toObject(); - if(channel["vote"].toBool()){ - singlerelay_data->single_relay[j].count_vote = channel["count_vote"].toInt(); - singlerelay_data->single_relay[j].vote = channel["vote"].toBool(); - QJsonArray array_logic = channel["logic_vote"].toArray(); - for(int var = 0;var < array_logic.size();++var){ - singlerelay_data->single_relay[j].logic[var] = array_logic[var].toString(); - } - }else{ - singlerelay_data->single_relay[j].logic_expression = channel["logic_expression"].toString(); - } + singlerelay_data->single_relay[j].logic_expression = channel["logic_expression"].toString(); singlerelay_data->single_relay[j].active = channel["active"].toBool(); singlerelay_data->single_relay[j].group = channel["group"].toInt(); } diff --git a/data_config.h b/data_config.h index 300cfb6..aa2ed85 100644 --- a/data_config.h +++ b/data_config.h @@ -182,6 +182,7 @@ typedef struct SlotConfig_{ QString slot_type; QPushButton *slot_btn; QLabel *slot_label; + CardType card_type; SlotConfig_(){ slot_type = ""; } diff --git a/keyphase.cpp b/keyphase.cpp index 8130461..5b4dc78 100644 --- a/keyphase.cpp +++ b/keyphase.cpp @@ -10,14 +10,14 @@ #include "config_mgr.h" #include "keyphase_data.h" -KeyPhase::KeyPhase(int slot_no_,int cardtype, QWidget *parent) +KeyPhase::KeyPhase(int slot_no_,CardType cardtype, QWidget *parent) : QDialog(parent) , ui(new Ui::KeyPhase) { ui->setupUi(this); ui->widget_body->setProperty("flag", "body"); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); slot_no = slot_no_; - car_type = static_cast(cardtype); + car_type = cardtype; QString slot = QString("%1").arg(slot_no); ui->label_slot->setText(slot); // QString filePath_keyphase = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\keyphase.json").arg(slot_no); diff --git a/keyphase.h b/keyphase.h index e2839ca..ad770c7 100644 --- a/keyphase.h +++ b/keyphase.h @@ -12,7 +12,7 @@ class KeyPhase : public QDialog { Q_OBJECT public: - explicit KeyPhase(int slot_no_,int cardtype, QWidget *parent = nullptr); + explicit KeyPhase(int slot_no_,CardType cardtype, QWidget *parent = nullptr); ~KeyPhase(); int slot_no; CardType car_type; diff --git a/mainwindow.cpp b/mainwindow.cpp index 5129efc..2639728 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -291,7 +291,7 @@ void MainWindow::onMenuActionTriggered() { qDebug() << "子菜单项被点击,所属按钮:" << button->objectName() << action->text(); QString slot_type = action->text().mid(1, 6); QString rack_type = action->text().right(action->text().length() - 8); - card_type = static_cast(action->data().toInt()); + CardType card_type = static_cast(action->data().toInt()); qDebug() << "rack_type" << action->data() << "card type" << card_type; int button_id = button->objectName().right(button->objectName().length() - 15).toInt(); qDebug() << slot_type << rack_type << button_id << map_slot_config[button_id].slot_type << map_slot_config[button_id + 2].slot_type ; @@ -317,10 +317,13 @@ void MainWindow::onMenuActionTriggered() { ConfigMgr::Instance()->card_type_[button_id + 1] == kCardNone) { map_slot_config[button_id].slot_type = slot_type; map_slot_config[button_id].slot_btn->setText(chan_display); + map_slot_config[button_id].card_type = kCardRelayTMRPrimary; map_slot_config[button_id + 1].slot_type = slot_type; map_slot_config[button_id + 1].slot_btn->setText(chan_display); + map_slot_config[button_id + 1].card_type = kCardRelayTMRBackup; map_slot_config[button_id + 2].slot_type = slot_type; map_slot_config[button_id + 2].slot_btn->setText(chan_display); + map_slot_config[button_id + 2].card_type = kCardRelayTMRBackup; ConfigMgr::Instance()->card_type_[button_id - 1] = kCardRelayTMRPrimary; ConfigMgr::Instance()->card_type_[button_id] = kCardRelayTMRBackup; @@ -342,6 +345,7 @@ void MainWindow::onMenuActionTriggered() { card_type == kCardKeyphaseSingle || card_type == kCardRelaySingle || card_type == kCardRelaySingleNOK) && ConfigMgr::Instance()->card_type_[button_id - 1] == kCardNone) { map_slot_config[button_id].slot_type = slot_type; + map_slot_config[button_id].card_type = card_type; button->setText(chan_display); ConfigMgr::Instance()->card_type_[button_id - 1] = card_type; }else if ((card_type == kCardVibSingle || card_type == kCardSpeedSingle || @@ -425,45 +429,45 @@ void MainWindow::onMenuActionTriggered() { void MainWindow::OnButtonGroup(QAbstractButton *slot_btn) { if (slot_btn != NULL && ui->pushButton_chan->isChecked()) { QString object_name = slot_btn->objectName(); - qDebug() << object_name << card_type ; int button_id = object_name.right(object_name.length() - 15).toInt(); SlotConfig slot_config = map_slot_config[button_id]; map_slot_config[button_id].slot_label->setStyleSheet("QLabel { color :#2980b9; font: bold 16px}"); if(current_slot != -1) map_slot_config[current_slot].slot_label->setStyleSheet(""); current_slot = button_id; + qDebug() << map_slot_config[button_id].card_type << button_id ; std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(button_id); if(base_ptr == nullptr){ - ConfigMgr::Instance()->card_type_[button_id - 1] = card_type; + ConfigMgr::Instance()->card_type_[button_id - 1] = map_slot_config[button_id].card_type; if (slot_config.slot_type == "KPM834") { // 键相模块 - KeyPhase *key_phase = new KeyPhase(button_id,card_type); + KeyPhase *key_phase = new KeyPhase(button_id,map_slot_config[button_id].card_type); key_phase->setWindowModality(Qt::ApplicationModal); key_phase->show(); } else if (slot_config.slot_type == "DOM810") { // 继电器模块 - switch (card_type) { + switch (map_slot_config[button_id].card_type) { case kCardRelayTMRPrimary:{ - TMRRelayAssociation *single_tmr_relay = new TMRRelayAssociation(button_id,card_type); + TMRRelayAssociation *single_tmr_relay = new TMRRelayAssociation(button_id,map_slot_config[button_id].card_type); single_tmr_relay->setWindowModality(Qt::ApplicationModal); single_tmr_relay->show(); }break; case kCardRelaySingle:{ - SingleRelay *single_relay = new SingleRelay(button_id,card_type); + SingleRelay *single_relay = new SingleRelay(button_id,map_slot_config[button_id].card_type); single_relay->setWindowModality(Qt::ApplicationModal); single_relay->show(); }break; case kCardRelaySingleNOK:{ - SingleRelay_NOK *single_relay_nok = new SingleRelay_NOK(button_id,card_type); + SingleRelay_NOK *single_relay_nok = new SingleRelay_NOK(button_id,map_slot_config[button_id].card_type); single_relay_nok->setWindowModality(Qt::ApplicationModal); single_relay_nok->show(); }break; } } else if (slot_config.slot_type == "HAM824") { // 振动模块 - Seismic_monitor *seismic_monitor = new Seismic_monitor(button_id,card_type); + Seismic_monitor *seismic_monitor = new Seismic_monitor(button_id,map_slot_config[button_id].card_type); seismic_monitor->setWindowModality(Qt::ApplicationModal); seismic_monitor->show(); } else if (slot_config.slot_type == "OPM844") { // 转速模块 - Tachometer *tachometer = new Tachometer(button_id,card_type); + Tachometer *tachometer = new Tachometer(button_id,map_slot_config[button_id].card_type); tachometer->setWindowModality(Qt::ApplicationModal); tachometer->show(); } @@ -472,36 +476,36 @@ void MainWindow::OnButtonGroup(QAbstractButton *slot_btn) { qDebug() << "base_ptr->card_type_" << base_ptr->card_type_; switch(base_ptr->card_type_){ case kCardVibSingle:{ - Seismic_monitor *seismic_monitor = new Seismic_monitor(button_id,card_type); + Seismic_monitor *seismic_monitor = new Seismic_monitor(button_id,map_slot_config[button_id].card_type); seismic_monitor->setWindowModality(Qt::ApplicationModal); seismic_monitor->show(); break; } case kCardKeyphaseSingle:{ - KeyPhase *key_phase = new KeyPhase(button_id,card_type); + KeyPhase *key_phase = new KeyPhase(button_id,map_slot_config[button_id].card_type); key_phase->setWindowModality(Qt::ApplicationModal); key_phase->show(); break; } case kCardSpeedSingle:{ - Tachometer *tachometer = new Tachometer(button_id,card_type); + Tachometer *tachometer = new Tachometer(button_id,map_slot_config[button_id].card_type); tachometer->setWindowModality(Qt::ApplicationModal); tachometer->show(); break; } case kCardRelaySingle:{ - SingleRelay *single_relay = new SingleRelay(button_id,card_type); + SingleRelay *single_relay = new SingleRelay(button_id,map_slot_config[button_id].card_type); single_relay->setWindowModality(Qt::ApplicationModal); single_relay->show(); break; } case kCardRelayTMRPrimary:{ - TMRRelayAssociation *single_tmr_relay = new TMRRelayAssociation(button_id,card_type); + TMRRelayAssociation *single_tmr_relay = new TMRRelayAssociation(button_id,map_slot_config[button_id].card_type); single_tmr_relay->setWindowModality(Qt::ApplicationModal); single_tmr_relay->show(); }break; case kCardRelaySingleNOK:{ - SingleRelay_NOK *single_relay_nok = new SingleRelay_NOK(button_id,card_type); + SingleRelay_NOK *single_relay_nok = new SingleRelay_NOK(button_id,map_slot_config[button_id].card_type); single_relay_nok->setWindowModality(Qt::ApplicationModal); single_relay_nok->show(); }break; diff --git a/mainwindow.h b/mainwindow.h index f70902f..8b64b80 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -45,7 +45,6 @@ private: QTcpSocket *socket; QProgressBar *progressBar; - CardType card_type; int current_slot; QString tsi_config_file; diff --git a/seismic_monitor.cpp b/seismic_monitor.cpp index 313aa10..4330adc 100644 --- a/seismic_monitor.cpp +++ b/seismic_monitor.cpp @@ -30,7 +30,7 @@ Seismic_monitor::Seismic_monitor(int slot,CardType cardtype, QWidget *parent) : ui->comboBox_chan_type_4->setView(new QListView()); slot_no = slot; - car_type = cardtype; + card_type = cardtype; QString slot_no_ = QString("%1").arg(slot_no); ui->label_slot_no->setText(slot_no_); Init(); @@ -48,7 +48,7 @@ void Seismic_monitor::Init() { // do nothing or use template to init it. std::shared_ptr vib_data = std::make_shared(); vib_data->slot_ = slot_no; - vib_data->card_type_ = car_type; + vib_data->card_type_ = card_type; qDebug() << "card type" << vib_data->card_type_; ConfigMgr::Instance()->AddCard(vib_data); UpdateData(vib_data); diff --git a/seismic_monitor.h b/seismic_monitor.h index c9da054..47de648 100644 --- a/seismic_monitor.h +++ b/seismic_monitor.h @@ -17,7 +17,7 @@ class Seismic_monitor : public QWidget { ~Seismic_monitor(); int slot_no; int channel; - CardType car_type; + CardType card_type; private slots: void on_pushButton_confirm_clicked(); @@ -60,7 +60,7 @@ class Seismic_monitor : public QWidget { private: Ui::Seismic_monitor *ui; void UpdateData(std::shared_ptr vib_data); - int card_type; +// int card_type; // void readJsonFile(const QString &filePath); // SeismicMonitor seismic_monitor[CHANNLE_COUNT]; QVector vec_transducer; diff --git a/singlerelay.cpp b/singlerelay.cpp index 9c98580..4d708bf 100644 --- a/singlerelay.cpp +++ b/singlerelay.cpp @@ -5,12 +5,12 @@ #include #include -SingleRelay::SingleRelay(int slot,int cardtype,QWidget *parent) +SingleRelay::SingleRelay(int slot,CardType cardtype,QWidget *parent) : QDialog(parent) , ui(new Ui::SingleRelay) { ui->setupUi(this); slot_no = slot; - car_type = static_cast(cardtype); + car_type = cardtype; ui->label_slot_no->setText(QString::number(slot_no)); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); QVBoxLayout *layout_available = new QVBoxLayout(ui->widget_available); diff --git a/singlerelay.h b/singlerelay.h index 710e45d..f80a7a5 100644 --- a/singlerelay.h +++ b/singlerelay.h @@ -18,7 +18,7 @@ class SingleRelay : public QDialog { Q_OBJECT public: - explicit SingleRelay(int slot,int cardtype,QWidget *parent = nullptr); + explicit SingleRelay(int slot,CardType cardtype,QWidget *parent = nullptr); ~SingleRelay(); int slot_no; CardType car_type; diff --git a/singlerelay.ui b/singlerelay.ui index 17ca5f5..4aae52d 100644 --- a/singlerelay.ui +++ b/singlerelay.ui @@ -245,7 +245,7 @@ 40 10 - 71 + 101 16 @@ -915,9 +915,9 @@ - 110 + 150 10 - 61 + 91 16 @@ -1011,13 +1011,13 @@ 是否投票 - + 632 110 141 - 31 + 32 @@ -1058,7 +1058,7 @@ - + 632 diff --git a/singlerelay_nok.cpp b/singlerelay_nok.cpp index 487a1fe..e59e7c5 100644 --- a/singlerelay_nok.cpp +++ b/singlerelay_nok.cpp @@ -5,13 +5,13 @@ #include #include -SingleRelay_NOK::SingleRelay_NOK(int slot,int cardtype,QWidget *parent) : +SingleRelay_NOK::SingleRelay_NOK(int slot,CardType cardtype,QWidget *parent) : QWidget(parent), ui(new Ui::SingleRelay_NOK) { ui->setupUi(this); slot_no = slot; - car_type = static_cast(cardtype); + car_type = cardtype; ui->label_slot_no->setText(QString::number(slot_no)); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); QVBoxLayout *layout_available = new QVBoxLayout(ui->widget_available); @@ -53,7 +53,6 @@ SingleRelay_NOK::SingleRelay_NOK(int slot,int cardtype,QWidget *parent) : treeView_relay->setContextMenuPolicy(Qt::CustomContextMenu); connect(treeView_relay,&QTreeView::customContextMenuRequested,this,&SingleRelay_NOK::on_treeView_Relay_customContextMenuRequested); current_index = ui->comboBox_relay_ch->currentIndex(); - vote_current_index = ui->comboBox_vote_group->currentIndex(); Init(); onComboBoxIndexChanged(current_index); } @@ -170,11 +169,8 @@ void SingleRelay_NOK::on_pushButton_confirm_clicked() QString("错误位置:%1\n错误描述:%2").arg(result.errorPos).arg(result.errorMsg)); return; } - if(ui->checkBox_vote->checkState()){ - relay_data->single_relay[current_index].logic[ui->comboBox_vote_group->currentIndex()] = finalExpr; - }else{ - relay_data->single_relay[current_index].logic_expression = finalExpr; - } + + relay_data->single_relay[current_index].logic_expression = finalExpr; relay_data->single_relay[current_index].active = ui->checkBox_active->isChecked(); relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1; qDebug() << "逻辑表达式:" << finalExpr; @@ -268,19 +264,13 @@ void SingleRelay_NOK::onComboBoxIndexChanged(int index){ return; } qDebug() << "finalExpr" << finalExpr; - if(ui->checkBox_vote->checkState()){ - relay_data->single_relay[current_index].logic[ui->comboBox_vote_group->currentIndex()] = finalExpr; - if(relay_data->single_relay[index].logic[ui->comboBox_vote_group->currentIndex()] != "") - setExpressionToTreeView(treeView_relay, relay_data->single_relay[index].logic[ui->comboBox_vote_group->currentIndex()]); - else - model_Relay->clear(); - }else{ - relay_data->single_relay[current_index].logic_expression = finalExpr; - if(relay_data->single_relay[index].logic_expression != "") - setExpressionToTreeView(treeView_relay, relay_data->single_relay[index].logic_expression); - else - model_Relay->clear(); - } + + relay_data->single_relay[current_index].logic_expression = finalExpr; + if(relay_data->single_relay[index].logic_expression != "") + setExpressionToTreeView(treeView_relay, relay_data->single_relay[index].logic_expression); + else + model_Relay->clear(); + relay_data->single_relay[current_index].active = ui->checkBox_active->isChecked(); relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1; current_index = index; @@ -484,14 +474,3 @@ void SingleRelay_NOK::on_comboBox_vote_group_currentIndexChanged(int index) vote_current_index = index; } - - -void SingleRelay_NOK::on_checkBox_vote_clicked(bool checked) -{ - if(checked){ - ui->comboBox_vote_group->setEnabled(true); - }else{ - ui->comboBox_vote_group->setEnabled(false); - } -} - diff --git a/singlerelay_nok.h b/singlerelay_nok.h index 962514c..6289287 100644 --- a/singlerelay_nok.h +++ b/singlerelay_nok.h @@ -20,7 +20,7 @@ class SingleRelay_NOK : public QWidget Q_OBJECT public: - explicit SingleRelay_NOK(int slot,int cardtype,QWidget *parent = nullptr); + explicit SingleRelay_NOK(int slot,CardType cardtype,QWidget *parent = nullptr); ~SingleRelay_NOK(); int slot_no; CardType car_type; @@ -37,8 +37,6 @@ private slots: void slotDeleteItem(); - void on_checkBox_vote_clicked(bool checked); - void on_treeView_Relay_customContextMenuRequested(const QPoint &pos); diff --git a/singlerelay_nok.ui b/singlerelay_nok.ui index 7336989..e349af9 100644 --- a/singlerelay_nok.ui +++ b/singlerelay_nok.ui @@ -11,7 +11,7 @@ - 非OK继电器 + 非OK继电器组态 @@ -742,7 +742,7 @@ 620 - 180 + 10 91 16 @@ -975,26 +975,13 @@ 继电器槽位: - - - - 640 - 30 - 121 - 16 - - - - 是否投票 - - 620 - 200 + 40 341 - 301 + 461 @@ -1011,153 +998,6 @@ 可用的告警: - - - - 630 - 108 - 141 - 32 - - - - - - - - 50 - 0 - - - - - 50 - 16777215 - - - - 选择: - - - - - - - - 50 - 30 - - - - - 50 - 30 - - - - - - - - - - 630 - 70 - 141 - 32 - - - - - - - - 50 - 0 - - - - - 50 - 16777215 - - - - 逻辑: - - - - - - - false - - - - 50 - 30 - - - - - 50 - 30 - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - - diff --git a/tachometer.cpp b/tachometer.cpp index dd98304..7858c29 100644 --- a/tachometer.cpp +++ b/tachometer.cpp @@ -12,14 +12,14 @@ #include "tachometer_data.h" #include "copy_channel.h" -Tachometer::Tachometer(int slot_no_,int cardtype, QWidget *parent) +Tachometer::Tachometer(int slot_no_,CardType cardtype, QWidget *parent) : QDialog(parent) , ui(new Ui::Tachometer) { ui->setupUi(this); ui->widget_body->setProperty("flag", "body"); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); slot_no = slot_no_; - car_type = static_cast(cardtype); + card_type = cardtype; QString slot = QString("%1").arg(slot_no); ui->label_slot->setText(slot); Init(); @@ -238,7 +238,7 @@ void Tachometer::Init() { if (base_ptr == nullptr) { // do nothing or use template to init it. std::shared_ptr speed_data = std::make_shared(); - speed_data->card_type_ = car_type; + speed_data->card_type_ = card_type; speed_data->slot_ = slot_no; ConfigMgr::Instance()->AddCard(speed_data); UpdateData(speed_data); diff --git a/tachometer.h b/tachometer.h index d61d374..9d45ced 100644 --- a/tachometer.h +++ b/tachometer.h @@ -13,10 +13,10 @@ class Tachometer : public QDialog { Q_OBJECT public: - explicit Tachometer(int slot_no_,int cardtype, QWidget *parent = nullptr); + explicit Tachometer(int slot_no_,CardType cardtype, QWidget *parent = nullptr); ~Tachometer(); int slot_no; - CardType car_type; + CardType card_type; private slots: void on_pushButton_confirm_clicked(); void on_pushButton_cancel_clicked(); diff --git a/tmrrelayassociation.cpp b/tmrrelayassociation.cpp index bc38499..88f1bbe 100644 --- a/tmrrelayassociation.cpp +++ b/tmrrelayassociation.cpp @@ -5,14 +5,14 @@ #include #include -TMRRelayAssociation::TMRRelayAssociation(int slot,int cardtype,QWidget *parent) +TMRRelayAssociation::TMRRelayAssociation(int slot,CardType cardtype,QWidget *parent) : QDialog(parent) , ui(new Ui::TMRRelayAssociation) { ui->setupUi(this); slot_no = slot; - car_type = static_cast(cardtype); - if(car_type == kCardRelaySingle){ + card_type = cardtype; + if(card_type == kCardRelaySingle){ ui->checkBox_sgcc->setVisible(0); } ui->label_slot_no->setText(QString::number(slot_no)); @@ -99,7 +99,7 @@ void TMRRelayAssociation::Init(){ if (base_ptr == nullptr) { // do nothing or use template to init it. relay_data = std::make_shared(); - relay_data->card_type_ = car_type; + relay_data->card_type_ = card_type; relay_data->slot_ = slot_no; ConfigMgr::Instance()->AddCard(relay_data); @@ -540,6 +540,7 @@ void TMRRelayAssociation::on_checkBox_sgcc_stateChanged(int arg1) ui->comboBox_relay_ch->setEnabled(false); ui->pushButton_logic->setEnabled(false); ui->textEdit_logic->setEnabled(false); + model_Relay->clear(); }else{ treeView_relay->setEnabled(true); list_widget_available->setEnabled(true); diff --git a/tmrrelayassociation.h b/tmrrelayassociation.h index 7786f8c..37c8c99 100644 --- a/tmrrelayassociation.h +++ b/tmrrelayassociation.h @@ -21,10 +21,10 @@ class TMRRelayAssociation : public QDialog Q_OBJECT public: - explicit TMRRelayAssociation(int slot,int cardtype,QWidget *parent = nullptr); + explicit TMRRelayAssociation(int slot,CardType cardtype,QWidget *parent = nullptr); ~TMRRelayAssociation(); int slot_no; - CardType car_type; + CardType card_type; private slots: void on_pushButton_cancel_clicked();