diff --git a/channel_1_2.cpp b/channel_1_2.cpp new file mode 100644 index 0000000..98ac18a --- /dev/null +++ b/channel_1_2.cpp @@ -0,0 +1,176 @@ +#include "channel_1_2.h" +#include "ui_channel_1_2.h" +#include "data_config.h" +#include "vibrationdata.h" +#include "config_mgr.h" +#include + +Channel_1_2::Channel_1_2(int slot_no_, int channel_,QWidget *parent) + : QWidget(parent) + , ui(new Ui::Channel_1_2) +{ + ui->setupUi(this); + slot_no = slot_no_; + channel = channel_; + QString chan = QString("%1").arg(channel); + QString slot = QString("%1").arg(slot_no); + ui->label_channel->setText(chan); + ui->label_slot->setText(slot); + Init(); +} + +Channel_1_2::~Channel_1_2() +{ + delete ui; +} +void Channel_1_2::Init() +{ + std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no); + if (base_ptr == nullptr) { + qCritical() << "[kVib12::Init] should not be here"; + return; + } + std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr); + if (ptr->base_config_[channel - 1].channel_type != kVib12) { + qDebug() << "[kVib12::Init] channel type changes"; + return; + } + std::shared_ptr variable_base = ptr->GetChannelPtr(channel); + if (variable_base == nullptr) { + qDebug() << "[kVib12::Init] no channel ptr"; + return; + } + std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base); + + // processed output + // -general + if(variable_ptr->general.output_used) + ui->comboBox_output_used->setCurrentIndex(0); + else + ui->comboBox_output_used->setCurrentIndex(1); + ui->comboBox_engineering_unit->setCurrentIndex(variable_ptr->general.engineering_unit); + ui->comboBox_rectifier_funtion->setCurrentIndex(variable_ptr->general.rectifier_function); + // -alarm + ui->lineEdit_danger_high_level->setText(QString::number(variable_ptr->danger_high.level)); + ui->lineEdit_danger_high_hysteresis->setText(QString::number(variable_ptr->danger_high.hysteresis)); + ui->lineEdit_danger_high_delay->setText(QString::number(variable_ptr->danger_high.delay)); + ui->checkBox_danger_high_enable->setChecked(variable_ptr->danger_high.enable); + ui->checkBox_danger_high_latch->setChecked(variable_ptr->danger_high.latch); + + ui->lineEdit_alert_high_level->setText(QString::number(variable_ptr->alert_high.level)); + ui->lineEdit_alert_high_hysteresis->setText(QString::number(variable_ptr->alert_high.hysteresis)); + ui->lineEdit_alert_high_delay->setText(QString::number(variable_ptr->alert_high.delay)); + ui->checkBox_alert_high_enable->setChecked(variable_ptr->alert_high.enable); + ui->checkBox_alert_high_latch->setChecked(variable_ptr->alert_high.latch); + + ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level)); + ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.hysteresis)); + ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.delay)); + ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable); + ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch); + + ui->lineEdit_alert_low_level->setText(QString::number(variable_ptr->alert_low.level)); + ui->lineEdit_alert_low_hysteresis->setText(QString::number(variable_ptr->alert_low.hysteresis)); + ui->lineEdit_alert_low_delay->setText(QString::number(variable_ptr->alert_low.delay)); + ui->checkBox_alert_low_enable->setChecked(variable_ptr->alert_low.enable); + ui->checkBox_alert_low_latch->setChecked(variable_ptr->alert_low.latch); +} + +void Channel_1_2::on_pushButton_confirm_clicked() +{ + std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no); + if (base_ptr == nullptr) { + qCritical() << "[kVib12::Init] should not be here"; + return; + } + if(ui->lineEdit_alert_high_level->text().toFloat() > ui->lineEdit_danger_high_level->text().toDouble()){ + QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高"); + return; + } + std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr); + ptr->base_config_[channel - 1].channel_type = kVib12; + std::shared_ptr variable_base = ptr->GetChannelPtr(channel); + std::shared_ptr variable = std::dynamic_pointer_cast(variable_base); + + if (variable_base == nullptr || variable_base->type_ != kVib12 || variable == nullptr) { + if (variable_base == nullptr) { + qDebug() << "no channel ptr"; + } else { + ptr->RemoveChannel(channel); + qDebug() << "channel type change"; + } + std::shared_ptr variable = std::make_shared(); + variable->id_ = channel; + // processed output + // -general + if(ui->comboBox_output_used->currentIndex() == 0) + variable->general.output_used = true; + else + variable->general.output_used = false; + variable->general.engineering_unit = ui->comboBox_engineering_unit->currentIndex(); + variable->general.rectifier_function = ui->comboBox_rectifier_funtion->currentIndex(); + // -alarm + variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble(); + variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble(); + variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble(); + variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked(); + variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked(); + variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble(); + variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble(); + variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble(); + variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked(); + variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked(); + variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble(); + variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble(); + variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble(); + variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked(); + variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked(); + variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble(); + variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble(); + variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble(); + variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked(); + variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked(); + ptr->variables_.push_back(variable); + this->close(); + return; + } + // processed output + // -general + if(ui->comboBox_output_used->currentIndex() == 0) + variable->general.output_used = true; + else + variable->general.output_used = false; + variable->general.engineering_unit = ui->comboBox_engineering_unit->currentIndex(); + variable->general.rectifier_function = ui->comboBox_rectifier_funtion->currentIndex(); + // -alarm + variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble(); + variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble(); + variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble(); + variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked(); + variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked(); + variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble(); + variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble(); + variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble(); + variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked(); + variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked(); + variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble(); + variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble(); + variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble(); + variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked(); + variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked(); + variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble(); + variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble(); + variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble(); + variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked(); + variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked(); + this->close(); + +} + + +void Channel_1_2::on_pushButton_cancel_clicked() +{ + this->close(); + +} + diff --git a/channel_1_2.h b/channel_1_2.h new file mode 100644 index 0000000..60c65a4 --- /dev/null +++ b/channel_1_2.h @@ -0,0 +1,30 @@ +#ifndef CHANNEL_1_2_H +#define CHANNEL_1_2_H + +#include + +namespace Ui { +class Channel_1_2; +} + +class Channel_1_2 : public QWidget +{ + Q_OBJECT + +public: + explicit Channel_1_2(int slot_no_, int channel_,QWidget *parent = nullptr); + ~Channel_1_2(); + int slot_no; + int channel; + +private slots: + void on_pushButton_confirm_clicked(); + + void on_pushButton_cancel_clicked(); + +private: + Ui::Channel_1_2 *ui; + void Init(); +}; + +#endif // CHANNEL_1_2_H diff --git a/channel_1_2.ui b/channel_1_2.ui new file mode 100644 index 0000000..90528f3 --- /dev/null +++ b/channel_1_2.ui @@ -0,0 +1,953 @@ + + + Channel_1_2 + + + + 0 + 0 + 776 + 640 + + + + 通道1&2配置 + + + + + + + 0 + 50 + + + + + + + + + 通道: + + + + + + + 1 + + + + + + + (启用) + + + + + + + + + Qt::Horizontal + + + + 236 + 20 + + + + + + + + + + 槽位号: + + + + + + + 8 + + + + + + + + + Qt::Horizontal + + + + 235 + 20 + + + + + + + + + + + 0 + + + + 处理后输出 + + + + + + 0 + + + + 常规 + + + + + + + + + 150 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + + + + + + 输出使用 + + + + + + + + + + + + 150 + 25 + + + + + 16777215 + 25 + + + + + g + + + + + m/s**2 + + + + + mm/s + + + + + inch/s + + + + + um + + + + + mm + + + + + + + + 工程单位 + + + + + + + + + + + + 150 + 25 + + + + + 16777215 + 25 + + + + + True Peak + + + + + True Peak-To-Peak + + + + + RMS Scaled Peak + + + + + RMS Scaled Peak-To-Peak + + + + + AVG + + + + + RMS Scaled AVG + + + + + RMS + + + + + + + + 整流器 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 警报 + + + + + + + + 20 + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 危险 + 高 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 警报 + 高 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 警报 + 低 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 危险 + 低 + + + + + + + + + + + + 16777215 + 20 + + + + 等级 + + + Qt::AlignCenter + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + 16777215 + 20 + + + + 回差 + + + Qt::AlignCenter + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + 16777215 + 20 + + + + 延时 + + + Qt::AlignCenter + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + 16777215 + 20 + + + + Qt::LeftToRight + + + 使能 + + + Qt::AlignCenter + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Qt::LeftToRight + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + + + + 16777215 + 20 + + + + 锁存 + + + Qt::AlignCenter + + + + + + + + 0 + 25 + + + + + + + + + + + + 0 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + 100 + 35 + + + + 确定 + + + + + + + false + + + + 100 + 35 + + + + 设置为默认值 + + + + + + + + 100 + 35 + + + + 取消 + + + + + + + false + + + + 100 + 35 + + + + 打印 + + + + + + + false + + + + 100 + 35 + + + + 帮助 + + + + + + + + + + diff --git a/channel_3_4.cpp b/channel_3_4.cpp new file mode 100644 index 0000000..5b85b78 --- /dev/null +++ b/channel_3_4.cpp @@ -0,0 +1,172 @@ +#include "channel_3_4.h" +#include "ui_channel_3_4.h" +#include "data_config.h" +#include "vibrationdata.h" +#include "config_mgr.h" +#include +Channel_3_4::Channel_3_4(int slot_no_, int channel_,QWidget *parent) + : QWidget(parent) + , ui(new Ui::Channel_3_4) +{ + ui->setupUi(this); + slot_no = slot_no_; + channel = channel_; + QString chan = QString("%1").arg(channel); + QString slot = QString("%1").arg(slot_no); + ui->label_channel->setText(chan); + ui->label_slot->setText(slot); + Init(); +} + +Channel_3_4::~Channel_3_4() +{ + delete ui; +} +void Channel_3_4::Init() +{ + std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no); + if (base_ptr == nullptr) { + qCritical() << "[kVib34::Init] should not be here"; + return; + } + std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr); + if (ptr->base_config_[channel - 1].channel_type != kVib34) { + qDebug() << "[kVib34::Init] channel type changes"; + return; + } + std::shared_ptr variable_base = ptr->GetChannelPtr(channel); + if (variable_base == nullptr) { + qDebug() << "[kVib34::Init] no channel ptr"; + return; + } + std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base); + + // processed output + // -general + if(variable_ptr->general.output_used) + ui->comboBox_output_used->setCurrentIndex(0); + else + ui->comboBox_output_used->setCurrentIndex(1); + ui->comboBox_engineering_unit->setCurrentIndex(variable_ptr->general.engineering_unit); + ui->comboBox_rectifier_funtion->setCurrentIndex(variable_ptr->general.rectifier_function); + // -alarm + ui->lineEdit_danger_high_level->setText(QString::number(variable_ptr->danger_high.level)); + ui->lineEdit_danger_high_hysteresis->setText(QString::number(variable_ptr->danger_high.hysteresis)); + ui->lineEdit_danger_high_delay->setText(QString::number(variable_ptr->danger_high.delay)); + ui->checkBox_danger_high_enable->setChecked(variable_ptr->danger_high.enable); + ui->checkBox_danger_high_latch->setChecked(variable_ptr->danger_high.latch); + + ui->lineEdit_alert_high_level->setText(QString::number(variable_ptr->alert_high.level)); + ui->lineEdit_alert_high_hysteresis->setText(QString::number(variable_ptr->alert_high.hysteresis)); + ui->lineEdit_alert_high_delay->setText(QString::number(variable_ptr->alert_high.delay)); + ui->checkBox_alert_high_enable->setChecked(variable_ptr->alert_high.enable); + ui->checkBox_alert_high_latch->setChecked(variable_ptr->alert_high.latch); + + ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level)); + ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.hysteresis)); + ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.delay)); + ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable); + ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch); + + ui->lineEdit_alert_low_level->setText(QString::number(variable_ptr->alert_low.level)); + ui->lineEdit_alert_low_hysteresis->setText(QString::number(variable_ptr->alert_low.hysteresis)); + ui->lineEdit_alert_low_delay->setText(QString::number(variable_ptr->alert_low.delay)); + ui->checkBox_alert_low_enable->setChecked(variable_ptr->alert_low.enable); + ui->checkBox_alert_low_latch->setChecked(variable_ptr->alert_low.latch); +} +void Channel_3_4::on_pushButton_confirm_clicked() +{ + std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no); + if (base_ptr == nullptr) { + qCritical() << "[kVib34::Init] should not be here"; + return; + } + if(ui->lineEdit_alert_high_level->text().toFloat() > ui->lineEdit_danger_high_level->text().toDouble()){ + QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高"); + return; + } + std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr); + ptr->base_config_[channel - 1].channel_type = kVib34; + std::shared_ptr variable_base = ptr->GetChannelPtr(channel); + std::shared_ptr variable = std::dynamic_pointer_cast(variable_base); + + if (variable_base == nullptr || variable_base->type_ != kVib34 || variable == nullptr) { + if (variable_base == nullptr) { + qDebug() << "no channel ptr"; + } else { + ptr->RemoveChannel(channel); + qDebug() << "channel type change"; + } + std::shared_ptr variable = std::make_shared(); + variable->id_ = channel; + // processed output + // -general + if(ui->comboBox_output_used->currentIndex() == 0) + variable->general.output_used = true; + else + variable->general.output_used = false; + variable->general.engineering_unit = ui->comboBox_engineering_unit->currentIndex(); + variable->general.rectifier_function = ui->comboBox_rectifier_funtion->currentIndex(); + // -alarm + variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble(); + variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble(); + variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble(); + variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked(); + variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked(); + variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble(); + variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble(); + variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble(); + variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked(); + variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked(); + variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble(); + variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble(); + variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble(); + variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked(); + variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked(); + variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble(); + variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble(); + variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble(); + variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked(); + variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked(); + ptr->variables_.push_back(variable); + this->close(); + return; + } + // processed output + // -general + if(ui->comboBox_output_used->currentIndex() == 0) + variable->general.output_used = true; + else + variable->general.output_used = false; + variable->general.engineering_unit = ui->comboBox_engineering_unit->currentIndex(); + variable->general.rectifier_function = ui->comboBox_rectifier_funtion->currentIndex(); + // -alarm + variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble(); + variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble(); + variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble(); + variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked(); + variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked(); + variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble(); + variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble(); + variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble(); + variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked(); + variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked(); + variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble(); + variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble(); + variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble(); + variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked(); + variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked(); + variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble(); + variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble(); + variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble(); + variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked(); + variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked(); + this->close(); +} + + +void Channel_3_4::on_pushButton_cancel_clicked() +{ + this->close(); +} + diff --git a/channel_3_4.h b/channel_3_4.h new file mode 100644 index 0000000..838c613 --- /dev/null +++ b/channel_3_4.h @@ -0,0 +1,30 @@ +#ifndef CHANNEL_3_4_H +#define CHANNEL_3_4_H + +#include + +namespace Ui { +class Channel_3_4; +} + +class Channel_3_4 : public QWidget +{ + Q_OBJECT + +public: + explicit Channel_3_4(int slot_no_, int channel_,QWidget *parent = nullptr); + ~Channel_3_4(); + int slot_no; + int channel; + +private slots: + void on_pushButton_confirm_clicked(); + + void on_pushButton_cancel_clicked(); + +private: + Ui::Channel_3_4 *ui; + void Init(); +}; + +#endif // CHANNEL_3_4_H diff --git a/channel_3_4.ui b/channel_3_4.ui new file mode 100644 index 0000000..9dd634f --- /dev/null +++ b/channel_3_4.ui @@ -0,0 +1,953 @@ + + + Channel_3_4 + + + + 0 + 0 + 819 + 587 + + + + 通道3&4配置 + + + + + + + 0 + 50 + + + + + + + + + 通道: + + + + + + + 1 + + + + + + + (启用) + + + + + + + + + Qt::Horizontal + + + + 236 + 20 + + + + + + + + + + 槽位号: + + + + + + + 8 + + + + + + + + + Qt::Horizontal + + + + 235 + 20 + + + + + + + + + + + 0 + + + + 处理后输出 + + + + + + 1 + + + + 常规 + + + + + + + + + 150 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + + + + + + 输出使用 + + + + + + + + + + + + 150 + 25 + + + + + 16777215 + 25 + + + + + g + + + + + m/s**2 + + + + + mm/s + + + + + inch/s + + + + + um + + + + + mm + + + + + + + + 工程单位 + + + + + + + + + + + + 150 + 25 + + + + + 16777215 + 25 + + + + + True Peak + + + + + True Peak-To-Peak + + + + + RMS Scaled Peak + + + + + RMS Scaled Peak-To-Peak + + + + + AVG + + + + + RMS Scaled AVG + + + + + RMS + + + + + + + + 整流器 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 警报 + + + + + + + + 20 + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 危险 + 高 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 警报 + 高 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 警报 + 低 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 危险 + 低 + + + + + + + + + + + + 16777215 + 20 + + + + 等级 + + + Qt::AlignCenter + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + 16777215 + 20 + + + + 回差 + + + Qt::AlignCenter + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + 16777215 + 20 + + + + 延时 + + + Qt::AlignCenter + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + false + + + + 50 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + 16777215 + 20 + + + + Qt::LeftToRight + + + 使能 + + + Qt::AlignCenter + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + Qt::LeftToRight + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + + + + 16777215 + 20 + + + + 锁存 + + + Qt::AlignCenter + + + + + + + + 0 + 25 + + + + + + + + + + + + 0 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + + + + + + + false + + + + 0 + 25 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + 100 + 35 + + + + 确定 + + + + + + + false + + + + 100 + 35 + + + + 设置为默认值 + + + + + + + + 100 + 35 + + + + 取消 + + + + + + + false + + + + 100 + 35 + + + + 打印 + + + + + + + false + + + + 100 + 35 + + + + 帮助 + + + + + + + + + +