修复bug
This commit is contained in:
parent
110685ef56
commit
b35e594834
@ -596,30 +596,16 @@ void ConfigMgr::Save(QString & file_path) {
|
|||||||
channel_item.insert("group",ptr->single_relay[ch].group);
|
channel_item.insert("group",ptr->single_relay[ch].group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(card_type_[i] == kCardRelaySingleNOK){
|
}else if(card_type_[i] == kCardRelaySingleNOK){
|
||||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
|
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
|
||||||
if (base_ptr == nullptr) {
|
if (base_ptr == nullptr) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
std::shared_ptr<SingleRelayData> ptr = std::dynamic_pointer_cast<SingleRelayData>(base_ptr);
|
std::shared_ptr<SingleRelayData> ptr = std::dynamic_pointer_cast<SingleRelayData>(base_ptr);
|
||||||
if(ptr->single_relay[ch].vote){
|
if(ptr->single_relay[ch].logic_expression != ""){
|
||||||
channel_item.insert("count_vote",ptr->single_relay[ch].count_vote);
|
qDebug() << "ch" << ch << ptr->single_relay[ch].logic_expression;
|
||||||
QJsonArray array_logic;
|
channel_item.insert("logic_expression", ptr->single_relay[ch].logic_expression);
|
||||||
for(int var = 0 ; var < 10;++var){
|
channel_item.insert("active", ptr->single_relay[ch].active);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(card_type_[i] == kCardRelayTMRPrimary){
|
}else if(card_type_[i] == kCardRelayTMRPrimary){
|
||||||
@ -1158,16 +1144,7 @@ void ConfigMgr::Load(QString filename) {
|
|||||||
singlerelay_data->version_ = temp_obj["version"].toInt();
|
singlerelay_data->version_ = temp_obj["version"].toInt();
|
||||||
for (int j = 0; j < RELAY_COUNT; ++j) {
|
for (int j = 0; j < RELAY_COUNT; ++j) {
|
||||||
channel = temp_obj[QString::number(j + 1)].toObject();
|
channel = temp_obj[QString::number(j + 1)].toObject();
|
||||||
if(channel["vote"].toBool()){
|
singlerelay_data->single_relay[j].logic_expression = channel["logic_expression"].toString();
|
||||||
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].active = channel["active"].toBool();
|
singlerelay_data->single_relay[j].active = channel["active"].toBool();
|
||||||
singlerelay_data->single_relay[j].group = channel["group"].toInt();
|
singlerelay_data->single_relay[j].group = channel["group"].toInt();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,6 +182,7 @@ typedef struct SlotConfig_{
|
|||||||
QString slot_type;
|
QString slot_type;
|
||||||
QPushButton *slot_btn;
|
QPushButton *slot_btn;
|
||||||
QLabel *slot_label;
|
QLabel *slot_label;
|
||||||
|
CardType card_type;
|
||||||
SlotConfig_(){
|
SlotConfig_(){
|
||||||
slot_type = "";
|
slot_type = "";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,14 +10,14 @@
|
|||||||
#include "config_mgr.h"
|
#include "config_mgr.h"
|
||||||
#include "keyphase_data.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)
|
: QDialog(parent)
|
||||||
, ui(new Ui::KeyPhase) {
|
, ui(new Ui::KeyPhase) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->widget_body->setProperty("flag", "body");
|
ui->widget_body->setProperty("flag", "body");
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
slot_no = slot_no_;
|
slot_no = slot_no_;
|
||||||
car_type = static_cast<CardType>(cardtype);
|
car_type = cardtype;
|
||||||
QString slot = QString("%1").arg(slot_no);
|
QString slot = QString("%1").arg(slot_no);
|
||||||
ui->label_slot->setText(slot);
|
ui->label_slot->setText(slot);
|
||||||
// QString filePath_keyphase = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\keyphase.json").arg(slot_no);
|
// QString filePath_keyphase = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\keyphase.json").arg(slot_no);
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class KeyPhase : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit KeyPhase(int slot_no_,int cardtype, QWidget *parent = nullptr);
|
explicit KeyPhase(int slot_no_,CardType cardtype, QWidget *parent = nullptr);
|
||||||
~KeyPhase();
|
~KeyPhase();
|
||||||
int slot_no;
|
int slot_no;
|
||||||
CardType car_type;
|
CardType car_type;
|
||||||
|
|||||||
@ -291,7 +291,7 @@ void MainWindow::onMenuActionTriggered() {
|
|||||||
qDebug() << "子菜单项被点击,所属按钮:" << button->objectName() << action->text();
|
qDebug() << "子菜单项被点击,所属按钮:" << button->objectName() << action->text();
|
||||||
QString slot_type = action->text().mid(1, 6);
|
QString slot_type = action->text().mid(1, 6);
|
||||||
QString rack_type = action->text().right(action->text().length() - 8);
|
QString rack_type = action->text().right(action->text().length() - 8);
|
||||||
card_type = static_cast<CardType>(action->data().toInt());
|
CardType card_type = static_cast<CardType>(action->data().toInt());
|
||||||
qDebug() << "rack_type" << action->data() << "card type" << card_type;
|
qDebug() << "rack_type" << action->data() << "card type" << card_type;
|
||||||
int button_id = button->objectName().right(button->objectName().length() - 15).toInt();
|
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 ;
|
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) {
|
ConfigMgr::Instance()->card_type_[button_id + 1] == kCardNone) {
|
||||||
map_slot_config[button_id].slot_type = slot_type;
|
map_slot_config[button_id].slot_type = slot_type;
|
||||||
map_slot_config[button_id].slot_btn->setText(chan_display);
|
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_type = slot_type;
|
||||||
map_slot_config[button_id + 1].slot_btn->setText(chan_display);
|
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_type = slot_type;
|
||||||
map_slot_config[button_id + 2].slot_btn->setText(chan_display);
|
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 - 1] = kCardRelayTMRPrimary;
|
||||||
ConfigMgr::Instance()->card_type_[button_id] = kCardRelayTMRBackup;
|
ConfigMgr::Instance()->card_type_[button_id] = kCardRelayTMRBackup;
|
||||||
@ -342,6 +345,7 @@ void MainWindow::onMenuActionTriggered() {
|
|||||||
card_type == kCardKeyphaseSingle || card_type == kCardRelaySingle ||
|
card_type == kCardKeyphaseSingle || card_type == kCardRelaySingle ||
|
||||||
card_type == kCardRelaySingleNOK) && ConfigMgr::Instance()->card_type_[button_id - 1] == kCardNone) {
|
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].slot_type = slot_type;
|
||||||
|
map_slot_config[button_id].card_type = card_type;
|
||||||
button->setText(chan_display);
|
button->setText(chan_display);
|
||||||
ConfigMgr::Instance()->card_type_[button_id - 1] = card_type;
|
ConfigMgr::Instance()->card_type_[button_id - 1] = card_type;
|
||||||
}else if ((card_type == kCardVibSingle || card_type == kCardSpeedSingle ||
|
}else if ((card_type == kCardVibSingle || card_type == kCardSpeedSingle ||
|
||||||
@ -425,45 +429,45 @@ void MainWindow::onMenuActionTriggered() {
|
|||||||
void MainWindow::OnButtonGroup(QAbstractButton *slot_btn) {
|
void MainWindow::OnButtonGroup(QAbstractButton *slot_btn) {
|
||||||
if (slot_btn != NULL && ui->pushButton_chan->isChecked()) {
|
if (slot_btn != NULL && ui->pushButton_chan->isChecked()) {
|
||||||
QString object_name = slot_btn->objectName();
|
QString object_name = slot_btn->objectName();
|
||||||
qDebug() << object_name << card_type ;
|
|
||||||
int button_id = object_name.right(object_name.length() - 15).toInt();
|
int button_id = object_name.right(object_name.length() - 15).toInt();
|
||||||
SlotConfig slot_config = map_slot_config[button_id];
|
SlotConfig slot_config = map_slot_config[button_id];
|
||||||
map_slot_config[button_id].slot_label->setStyleSheet("QLabel { color :#2980b9; font: bold 16px}");
|
map_slot_config[button_id].slot_label->setStyleSheet("QLabel { color :#2980b9; font: bold 16px}");
|
||||||
if(current_slot != -1)
|
if(current_slot != -1)
|
||||||
map_slot_config[current_slot].slot_label->setStyleSheet("");
|
map_slot_config[current_slot].slot_label->setStyleSheet("");
|
||||||
current_slot = button_id;
|
current_slot = button_id;
|
||||||
|
qDebug() << map_slot_config[button_id].card_type << button_id ;
|
||||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(button_id);
|
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(button_id);
|
||||||
if(base_ptr == nullptr){
|
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") { // 键相模块
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
key_phase->show();
|
key_phase->show();
|
||||||
} else if (slot_config.slot_type == "DOM810") { // 继电器模块
|
} else if (slot_config.slot_type == "DOM810") { // 继电器模块
|
||||||
switch (card_type) {
|
switch (map_slot_config[button_id].card_type) {
|
||||||
case kCardRelayTMRPrimary:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
single_tmr_relay->show();
|
single_tmr_relay->show();
|
||||||
}break;
|
}break;
|
||||||
case kCardRelaySingle:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
single_relay->show();
|
single_relay->show();
|
||||||
}break;
|
}break;
|
||||||
case kCardRelaySingleNOK:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
single_relay_nok->show();
|
single_relay_nok->show();
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (slot_config.slot_type == "HAM824") { // 振动模块
|
} 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->setWindowModality(Qt::ApplicationModal);
|
||||||
seismic_monitor->show();
|
seismic_monitor->show();
|
||||||
} else if (slot_config.slot_type == "OPM844") { // 转速模块
|
} 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->setWindowModality(Qt::ApplicationModal);
|
||||||
tachometer->show();
|
tachometer->show();
|
||||||
}
|
}
|
||||||
@ -472,36 +476,36 @@ void MainWindow::OnButtonGroup(QAbstractButton *slot_btn) {
|
|||||||
qDebug() << "base_ptr->card_type_" << base_ptr->card_type_;
|
qDebug() << "base_ptr->card_type_" << base_ptr->card_type_;
|
||||||
switch(base_ptr->card_type_){
|
switch(base_ptr->card_type_){
|
||||||
case kCardVibSingle:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
seismic_monitor->show();
|
seismic_monitor->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case kCardKeyphaseSingle:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
key_phase->show();
|
key_phase->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case kCardSpeedSingle:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
tachometer->show();
|
tachometer->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case kCardRelaySingle:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
single_relay->show();
|
single_relay->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case kCardRelayTMRPrimary:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
single_tmr_relay->show();
|
single_tmr_relay->show();
|
||||||
}break;
|
}break;
|
||||||
case kCardRelaySingleNOK:{
|
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->setWindowModality(Qt::ApplicationModal);
|
||||||
single_relay_nok->show();
|
single_relay_nok->show();
|
||||||
}break;
|
}break;
|
||||||
|
|||||||
@ -45,7 +45,6 @@ private:
|
|||||||
QTcpSocket *socket;
|
QTcpSocket *socket;
|
||||||
|
|
||||||
QProgressBar *progressBar;
|
QProgressBar *progressBar;
|
||||||
CardType card_type;
|
|
||||||
int current_slot;
|
int current_slot;
|
||||||
QString tsi_config_file;
|
QString tsi_config_file;
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Seismic_monitor::Seismic_monitor(int slot,CardType cardtype, QWidget *parent) :
|
|||||||
ui->comboBox_chan_type_4->setView(new QListView());
|
ui->comboBox_chan_type_4->setView(new QListView());
|
||||||
|
|
||||||
slot_no = slot;
|
slot_no = slot;
|
||||||
car_type = cardtype;
|
card_type = cardtype;
|
||||||
QString slot_no_ = QString("%1").arg(slot_no);
|
QString slot_no_ = QString("%1").arg(slot_no);
|
||||||
ui->label_slot_no->setText(slot_no_);
|
ui->label_slot_no->setText(slot_no_);
|
||||||
Init();
|
Init();
|
||||||
@ -48,7 +48,7 @@ void Seismic_monitor::Init() {
|
|||||||
// do nothing or use template to init it.
|
// do nothing or use template to init it.
|
||||||
std::shared_ptr<VibrationData> vib_data = std::make_shared<VibrationData>();
|
std::shared_ptr<VibrationData> vib_data = std::make_shared<VibrationData>();
|
||||||
vib_data->slot_ = slot_no;
|
vib_data->slot_ = slot_no;
|
||||||
vib_data->card_type_ = car_type;
|
vib_data->card_type_ = card_type;
|
||||||
qDebug() << "card type" << vib_data->card_type_;
|
qDebug() << "card type" << vib_data->card_type_;
|
||||||
ConfigMgr::Instance()->AddCard(vib_data);
|
ConfigMgr::Instance()->AddCard(vib_data);
|
||||||
UpdateData(vib_data);
|
UpdateData(vib_data);
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class Seismic_monitor : public QWidget {
|
|||||||
~Seismic_monitor();
|
~Seismic_monitor();
|
||||||
int slot_no;
|
int slot_no;
|
||||||
int channel;
|
int channel;
|
||||||
CardType car_type;
|
CardType card_type;
|
||||||
private slots:
|
private slots:
|
||||||
void on_pushButton_confirm_clicked();
|
void on_pushButton_confirm_clicked();
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ class Seismic_monitor : public QWidget {
|
|||||||
private:
|
private:
|
||||||
Ui::Seismic_monitor *ui;
|
Ui::Seismic_monitor *ui;
|
||||||
void UpdateData(std::shared_ptr<VibrationData> vib_data);
|
void UpdateData(std::shared_ptr<VibrationData> vib_data);
|
||||||
int card_type;
|
// int card_type;
|
||||||
// void readJsonFile(const QString &filePath);
|
// void readJsonFile(const QString &filePath);
|
||||||
// SeismicMonitor seismic_monitor[CHANNLE_COUNT];
|
// SeismicMonitor seismic_monitor[CHANNLE_COUNT];
|
||||||
QVector<Transducer> vec_transducer;
|
QVector<Transducer> vec_transducer;
|
||||||
|
|||||||
@ -5,12 +5,12 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
SingleRelay::SingleRelay(int slot,int cardtype,QWidget *parent)
|
SingleRelay::SingleRelay(int slot,CardType cardtype,QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::SingleRelay) {
|
, ui(new Ui::SingleRelay) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
slot_no = slot;
|
slot_no = slot;
|
||||||
car_type = static_cast<CardType>(cardtype);
|
car_type = cardtype;
|
||||||
ui->label_slot_no->setText(QString::number(slot_no));
|
ui->label_slot_no->setText(QString::number(slot_no));
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
QVBoxLayout *layout_available = new QVBoxLayout(ui->widget_available);
|
QVBoxLayout *layout_available = new QVBoxLayout(ui->widget_available);
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class SingleRelay : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SingleRelay(int slot,int cardtype,QWidget *parent = nullptr);
|
explicit SingleRelay(int slot,CardType cardtype,QWidget *parent = nullptr);
|
||||||
~SingleRelay();
|
~SingleRelay();
|
||||||
int slot_no;
|
int slot_no;
|
||||||
CardType car_type;
|
CardType car_type;
|
||||||
|
|||||||
@ -245,7 +245,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>71</width>
|
<width>101</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -915,9 +915,9 @@
|
|||||||
<widget class="QLabel" name="label_slot_no">
|
<widget class="QLabel" name="label_slot_no">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>110</x>
|
<x>150</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>61</width>
|
<width>91</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -1011,13 +1011,13 @@
|
|||||||
<string>是否投票</string>
|
<string>是否投票</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>632</x>
|
<x>632</x>
|
||||||
<y>110</y>
|
<y>110</y>
|
||||||
<width>141</width>
|
<width>141</width>
|
||||||
<height>31</height>
|
<height>32</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
@ -1058,7 +1058,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>632</x>
|
<x>632</x>
|
||||||
|
|||||||
@ -5,13 +5,13 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
SingleRelay_NOK::SingleRelay_NOK(int slot,int cardtype,QWidget *parent) :
|
SingleRelay_NOK::SingleRelay_NOK(int slot,CardType cardtype,QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::SingleRelay_NOK)
|
ui(new Ui::SingleRelay_NOK)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
slot_no = slot;
|
slot_no = slot;
|
||||||
car_type = static_cast<CardType>(cardtype);
|
car_type = cardtype;
|
||||||
ui->label_slot_no->setText(QString::number(slot_no));
|
ui->label_slot_no->setText(QString::number(slot_no));
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
QVBoxLayout *layout_available = new QVBoxLayout(ui->widget_available);
|
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);
|
treeView_relay->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(treeView_relay,&QTreeView::customContextMenuRequested,this,&SingleRelay_NOK::on_treeView_Relay_customContextMenuRequested);
|
connect(treeView_relay,&QTreeView::customContextMenuRequested,this,&SingleRelay_NOK::on_treeView_Relay_customContextMenuRequested);
|
||||||
current_index = ui->comboBox_relay_ch->currentIndex();
|
current_index = ui->comboBox_relay_ch->currentIndex();
|
||||||
vote_current_index = ui->comboBox_vote_group->currentIndex();
|
|
||||||
Init();
|
Init();
|
||||||
onComboBoxIndexChanged(current_index);
|
onComboBoxIndexChanged(current_index);
|
||||||
}
|
}
|
||||||
@ -170,11 +169,8 @@ void SingleRelay_NOK::on_pushButton_confirm_clicked()
|
|||||||
QString("错误位置:%1\n错误描述:%2").arg(result.errorPos).arg(result.errorMsg));
|
QString("错误位置:%1\n错误描述:%2").arg(result.errorPos).arg(result.errorMsg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(ui->checkBox_vote->checkState()){
|
|
||||||
relay_data->single_relay[current_index].logic[ui->comboBox_vote_group->currentIndex()] = finalExpr;
|
relay_data->single_relay[current_index].logic_expression = finalExpr;
|
||||||
}else{
|
|
||||||
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].active = ui->checkBox_active->isChecked();
|
||||||
relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1;
|
relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1;
|
||||||
qDebug() << "逻辑表达式:" << finalExpr;
|
qDebug() << "逻辑表达式:" << finalExpr;
|
||||||
@ -268,19 +264,13 @@ void SingleRelay_NOK::onComboBoxIndexChanged(int index){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << "finalExpr" << finalExpr;
|
qDebug() << "finalExpr" << finalExpr;
|
||||||
if(ui->checkBox_vote->checkState()){
|
|
||||||
relay_data->single_relay[current_index].logic[ui->comboBox_vote_group->currentIndex()] = finalExpr;
|
relay_data->single_relay[current_index].logic_expression = finalExpr;
|
||||||
if(relay_data->single_relay[index].logic[ui->comboBox_vote_group->currentIndex()] != "")
|
if(relay_data->single_relay[index].logic_expression != "")
|
||||||
setExpressionToTreeView(treeView_relay, relay_data->single_relay[index].logic[ui->comboBox_vote_group->currentIndex()]);
|
setExpressionToTreeView(treeView_relay, relay_data->single_relay[index].logic_expression);
|
||||||
else
|
else
|
||||||
model_Relay->clear();
|
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].active = ui->checkBox_active->isChecked();
|
relay_data->single_relay[current_index].active = ui->checkBox_active->isChecked();
|
||||||
relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1;
|
relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1;
|
||||||
current_index = index;
|
current_index = index;
|
||||||
@ -484,14 +474,3 @@ void SingleRelay_NOK::on_comboBox_vote_group_currentIndexChanged(int index)
|
|||||||
vote_current_index = 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class SingleRelay_NOK : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SingleRelay_NOK(int slot,int cardtype,QWidget *parent = nullptr);
|
explicit SingleRelay_NOK(int slot,CardType cardtype,QWidget *parent = nullptr);
|
||||||
~SingleRelay_NOK();
|
~SingleRelay_NOK();
|
||||||
int slot_no;
|
int slot_no;
|
||||||
CardType car_type;
|
CardType car_type;
|
||||||
@ -37,8 +37,6 @@ private slots:
|
|||||||
|
|
||||||
void slotDeleteItem();
|
void slotDeleteItem();
|
||||||
|
|
||||||
void on_checkBox_vote_clicked(bool checked);
|
|
||||||
|
|
||||||
void on_treeView_Relay_customContextMenuRequested(const QPoint &pos);
|
void on_treeView_Relay_customContextMenuRequested(const QPoint &pos);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>非OK继电器</string>
|
<string>非OK继电器组态</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@ -742,7 +742,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>620</x>
|
<x>620</x>
|
||||||
<y>180</y>
|
<y>10</y>
|
||||||
<width>91</width>
|
<width>91</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -975,26 +975,13 @@
|
|||||||
<string>继电器槽位:</string>
|
<string>继电器槽位:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="checkBox_vote">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>640</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>121</width>
|
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>是否投票</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="widget_relay" native="true">
|
<widget class="QWidget" name="widget_relay" native="true">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>620</x>
|
<x>620</x>
|
||||||
<y>200</y>
|
<y>40</y>
|
||||||
<width>341</width>
|
<width>341</width>
|
||||||
<height>301</height>
|
<height>461</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -1011,153 +998,6 @@
|
|||||||
<string>可用的告警:</string>
|
<string>可用的告警:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>630</x>
|
|
||||||
<y>108</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_97">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 选择:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_vote_count">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="layoutWidget_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>630</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_96">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 逻辑:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="comboBox_vote_group">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>1</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>2</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>3</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>4</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>5</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>6</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>7</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>8</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>9</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>10</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@ -12,14 +12,14 @@
|
|||||||
#include "tachometer_data.h"
|
#include "tachometer_data.h"
|
||||||
#include "copy_channel.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)
|
: QDialog(parent)
|
||||||
, ui(new Ui::Tachometer) {
|
, ui(new Ui::Tachometer) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->widget_body->setProperty("flag", "body");
|
ui->widget_body->setProperty("flag", "body");
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
slot_no = slot_no_;
|
slot_no = slot_no_;
|
||||||
car_type = static_cast<CardType>(cardtype);
|
card_type = cardtype;
|
||||||
QString slot = QString("%1").arg(slot_no);
|
QString slot = QString("%1").arg(slot_no);
|
||||||
ui->label_slot->setText(slot);
|
ui->label_slot->setText(slot);
|
||||||
Init();
|
Init();
|
||||||
@ -238,7 +238,7 @@ void Tachometer::Init() {
|
|||||||
if (base_ptr == nullptr) {
|
if (base_ptr == nullptr) {
|
||||||
// do nothing or use template to init it.
|
// do nothing or use template to init it.
|
||||||
std::shared_ptr<TachometerData> speed_data = std::make_shared<TachometerData>();
|
std::shared_ptr<TachometerData> speed_data = std::make_shared<TachometerData>();
|
||||||
speed_data->card_type_ = car_type;
|
speed_data->card_type_ = card_type;
|
||||||
speed_data->slot_ = slot_no;
|
speed_data->slot_ = slot_no;
|
||||||
ConfigMgr::Instance()->AddCard(speed_data);
|
ConfigMgr::Instance()->AddCard(speed_data);
|
||||||
UpdateData(speed_data);
|
UpdateData(speed_data);
|
||||||
|
|||||||
@ -13,10 +13,10 @@ class Tachometer : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Tachometer(int slot_no_,int cardtype, QWidget *parent = nullptr);
|
explicit Tachometer(int slot_no_,CardType cardtype, QWidget *parent = nullptr);
|
||||||
~Tachometer();
|
~Tachometer();
|
||||||
int slot_no;
|
int slot_no;
|
||||||
CardType car_type;
|
CardType card_type;
|
||||||
private slots:
|
private slots:
|
||||||
void on_pushButton_confirm_clicked();
|
void on_pushButton_confirm_clicked();
|
||||||
void on_pushButton_cancel_clicked();
|
void on_pushButton_cancel_clicked();
|
||||||
|
|||||||
@ -5,14 +5,14 @@
|
|||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
TMRRelayAssociation::TMRRelayAssociation(int slot,int cardtype,QWidget *parent)
|
TMRRelayAssociation::TMRRelayAssociation(int slot,CardType cardtype,QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::TMRRelayAssociation)
|
, ui(new Ui::TMRRelayAssociation)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
slot_no = slot;
|
slot_no = slot;
|
||||||
car_type = static_cast<CardType>(cardtype);
|
card_type = cardtype;
|
||||||
if(car_type == kCardRelaySingle){
|
if(card_type == kCardRelaySingle){
|
||||||
ui->checkBox_sgcc->setVisible(0);
|
ui->checkBox_sgcc->setVisible(0);
|
||||||
}
|
}
|
||||||
ui->label_slot_no->setText(QString::number(slot_no));
|
ui->label_slot_no->setText(QString::number(slot_no));
|
||||||
@ -99,7 +99,7 @@ void TMRRelayAssociation::Init(){
|
|||||||
if (base_ptr == nullptr) {
|
if (base_ptr == nullptr) {
|
||||||
// do nothing or use template to init it.
|
// do nothing or use template to init it.
|
||||||
relay_data = std::make_shared<TmrrelayassociationData>();
|
relay_data = std::make_shared<TmrrelayassociationData>();
|
||||||
relay_data->card_type_ = car_type;
|
relay_data->card_type_ = card_type;
|
||||||
relay_data->slot_ = slot_no;
|
relay_data->slot_ = slot_no;
|
||||||
ConfigMgr::Instance()->AddCard(relay_data);
|
ConfigMgr::Instance()->AddCard(relay_data);
|
||||||
|
|
||||||
@ -540,6 +540,7 @@ void TMRRelayAssociation::on_checkBox_sgcc_stateChanged(int arg1)
|
|||||||
ui->comboBox_relay_ch->setEnabled(false);
|
ui->comboBox_relay_ch->setEnabled(false);
|
||||||
ui->pushButton_logic->setEnabled(false);
|
ui->pushButton_logic->setEnabled(false);
|
||||||
ui->textEdit_logic->setEnabled(false);
|
ui->textEdit_logic->setEnabled(false);
|
||||||
|
model_Relay->clear();
|
||||||
}else{
|
}else{
|
||||||
treeView_relay->setEnabled(true);
|
treeView_relay->setEnabled(true);
|
||||||
list_widget_available->setEnabled(true);
|
list_widget_available->setEnabled(true);
|
||||||
|
|||||||
@ -21,10 +21,10 @@ class TMRRelayAssociation : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TMRRelayAssociation(int slot,int cardtype,QWidget *parent = nullptr);
|
explicit TMRRelayAssociation(int slot,CardType cardtype,QWidget *parent = nullptr);
|
||||||
~TMRRelayAssociation();
|
~TMRRelayAssociation();
|
||||||
int slot_no;
|
int slot_no;
|
||||||
CardType car_type;
|
CardType card_type;
|
||||||
private slots:
|
private slots:
|
||||||
void on_pushButton_cancel_clicked();
|
void on_pushButton_cancel_clicked();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user