diff --git a/data_config.h b/data_config.h index cbbec9e..0374cbf 100644 --- a/data_config.h +++ b/data_config.h @@ -2,7 +2,9 @@ #define DATA_CONFIG_H #include #include +#include +#define CHANNLE_COUNT 4 typedef struct { int slot; int slot_type; @@ -20,4 +22,19 @@ enum SlotType{ VIBRATE = 40, RPM = 50 }; + +typedef struct{ + int id; + QString channle_name; + bool standby; + bool active; + QString rack_type; + QString tmr_group; + QString channel_type; + QString transducer_name; + QString scale_factor; + QString sample_rate; + float normal_voltage_low; + float normal_voltage_high; +}SeismicMonitor; #endif // DATA_CONFIG_H diff --git a/doc/seismic_monitor.jsonc b/doc/seismic_monitor.jsonc index a4028a5..03b8c68 100644 --- a/doc/seismic_monitor.jsonc +++ b/doc/seismic_monitor.jsonc @@ -12,7 +12,7 @@ "tmr_group":"1-3", "channel_type":"acceleration", "transducer_name":"3300-8mm Proximitor", - "scale_factor":"10 mv/ m/s^2", + "scale_factor":"10", "sample_rate":32000, "normal_voltage_range": [-21.3, 21.0] },{ @@ -24,7 +24,7 @@ "tmr_group":"1-3", "channel_type":"acceleration", "transducer_name":"3300-8mm Proximitor", - "scale_factor":"10 mv/ m/s^2", + "scale_factor":"10", "sample_rate":32000, "normal_voltage_range": [-21.3, 21.0] },{ @@ -36,7 +36,7 @@ "tmr_group":"3-5", "channel_type":"acceleration", "transducer_name":"3300-8mm Proximitor", - "scale_factor":"10 mv/ m/s^2", + "scale_factor":"10", "sample_rate":32000, "normal_voltage_range": [-21.3, 21.0] },{ @@ -48,7 +48,7 @@ "tmr_group":"3-5", "channel_type":"acceleration", "transducer_name":"3300-8mm Proximitor", - "scale_factor":"10 mv/ m/s^2", + "scale_factor":"10", "sample_rate":32000, "normal_voltage_range": [-21.3, 21.0] } diff --git a/keyphase.cpp b/keyphase.cpp index 48d2cac..b3ef562 100644 --- a/keyphase.cpp +++ b/keyphase.cpp @@ -12,3 +12,9 @@ KeyPhase::~KeyPhase() { delete ui; } + +void KeyPhase::on_pushButton_confirm_clicked() +{ + +} + diff --git a/keyphase.h b/keyphase.h index 1f95fd5..782ac21 100644 --- a/keyphase.h +++ b/keyphase.h @@ -15,6 +15,9 @@ public: explicit KeyPhase(QWidget *parent = nullptr); ~KeyPhase(); +private slots: + void on_pushButton_confirm_clicked(); + private: Ui::KeyPhase *ui; }; diff --git a/keyphase.ui b/keyphase.ui index e1ceafb..a993d8e 100644 --- a/keyphase.ui +++ b/keyphase.ui @@ -1557,7 +1557,7 @@ 打 印... - + 130 diff --git a/mainwindow.cpp b/mainwindow.cpp index ca09abe..3de62d2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -347,7 +347,7 @@ void MainWindow::OnButtonGroup(QAbstractButton * slot_btn) single_relay->setWindowModality(Qt::ApplicationModal); single_relay->show(); }else if (slot_config.slot_type == VIBRATE){ - Seismic_monitor *seismic_monitor = new Seismic_monitor(); + Seismic_monitor *seismic_monitor = new Seismic_monitor(button_id); seismic_monitor->setWindowModality(Qt::ApplicationModal); seismic_monitor->show(); }else if (slot_config.slot_type == RPM){ @@ -428,3 +428,9 @@ void MainWindow::on_pushButton_save_clicked() file.close(); } + +void MainWindow::on_pushButton_open_clicked() +{ + +} + diff --git a/mainwindow.h b/mainwindow.h index 1417244..21150af 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -51,5 +51,6 @@ private slots: void on_pushButton_alarm_clicked(); void on_pushButton_point_name_clicked(); void on_pushButton_save_clicked(); + void on_pushButton_open_clicked(); }; #endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui index 650cd57..45d9642 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -57,7 +57,7 @@ 保存 - + 80 diff --git a/seismic_monitor.cpp b/seismic_monitor.cpp deleted file mode 100644 index 3cd10e4..0000000 --- a/seismic_monitor.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "Seismic_monitor.h" -#include "ui_Seismic_monitor.h" - -Seismic_monitor::Seismic_monitor(QWidget *parent) : - QWidget(parent), - ui(new Ui::Seismic_monitor) -{ - ui->setupUi(this); -} - -Seismic_monitor::~Seismic_monitor() -{ - delete ui; -} diff --git a/seismic_monitor.h b/seismic_monitor.h deleted file mode 100644 index 01f5a83..0000000 --- a/seismic_monitor.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef seismic_monitor_H -#define seismic_monitor_H - -#include - -namespace Ui { -class Seismic_monitor; -} - -class Seismic_monitor : public QWidget -{ - Q_OBJECT - -public: - explicit Seismic_monitor(QWidget *parent = nullptr); - ~Seismic_monitor(); - -private: - Ui::Seismic_monitor *ui; -}; - -#endif // seismic_monitor_H diff --git a/seismic_monitor.ui b/seismic_monitor.ui deleted file mode 100644 index ae79ced..0000000 --- a/seismic_monitor.ui +++ /dev/null @@ -1,1741 +0,0 @@ - - - Seismic_monitor - - - - 0 - 0 - 760 - 554 - - - - Form - - - - - 400 - 80 - 331 - 381 - - - - 通道 3 和 4 - - - - - 10 - 290 - 120 - 80 - - - - 通道3 - - - - - 20 - 20 - 71 - 16 - - - - 启用 - - - true - - - - - - 30 - 50 - 51 - 21 - - - - 配置 - - - - - - - 200 - 290 - 120 - 80 - - - - 通道4 - - - - - 10 - 20 - 71 - 16 - - - - 启用 - - - true - - - - - - 30 - 50 - 51 - 21 - - - - 配置 - - - - - - - 140 - 300 - 45 - 62 - - - - - - - ===> - - - - - - - = - - - Qt::AlignCenter - - - - - - - <=== - - - - - - - - - 10 - 50 - 311 - 236 - - - - 0 - - - - 通道3 - - - - - - - - - 90 - 0 - - - - 通道3类型: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 加速度 - - - - - 速度 - - - - - 径向位移 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 传感器名称: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 灵敏度: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - mv/g - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 采样率: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 32 k - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 220 - 80 - - - - 正常电压 - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 下限 - - - -30.000000000000000 - - - 30.000000000000000 - - - -21.000000000000000 - - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 上限 - - - -30.000000000000000 - - - 30.000000000000000 - - - 21.000000000000000 - - - - - - - Volts - - - - - - - - - - - 通道4 - - - - - - - - - 90 - 0 - - - - 通道4类型: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 加速度 - - - - - 速度 - - - - - 径向位移 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 传感器名称: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 灵敏度: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - mv/g - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 采样率: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 32 k - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 220 - 80 - - - - 正常电压 - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 下限 - - - -30.000000000000000 - - - 30.000000000000000 - - - -21.000000000000000 - - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 上限 - - - -30.000000000000000 - - - 30.000000000000000 - - - 21.000000000000000 - - - - - - - Volts - - - - - - - - - - - - - 20 - 30 - 71 - 16 - - - - 备份 - - - - - - - 10 - 20 - 189 - 22 - - - - - - - 槽位号: - - - - - - - true - - - - - - - - - 10 - 80 - 331 - 381 - - - - 通道 1 和 2 - - - - - 10 - 290 - 120 - 80 - - - - 通道1 - - - - - 20 - 20 - 71 - 16 - - - - 启用 - - - true - - - - - - 30 - 50 - 51 - 21 - - - - 配置 - - - - - - - 200 - 290 - 120 - 80 - - - - 通道2 - - - - - 10 - 20 - 71 - 16 - - - - 启用 - - - true - - - - - - 30 - 50 - 51 - 21 - - - - 配置 - - - - - - - 140 - 300 - 45 - 67 - - - - - - - ===> - - - - - - - = - - - Qt::AlignCenter - - - - - - - <=== - - - - - - - - - 10 - 50 - 311 - 236 - - - - - 16777215 - 16777215 - - - - 0 - - - - 通道1 - - - - - - - - - 90 - 0 - - - - 通道1类型: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 加速度 - - - - - 速度 - - - - - 径向位移 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 传感器名称: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 灵敏度: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - mv/g - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 采样率: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 32 k - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 220 - 80 - - - - 正常电压 - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 下限 - - - -30.000000000000000 - - - 30.000000000000000 - - - -21.000000000000000 - - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 上限 - - - -30.000000000000000 - - - 30.000000000000000 - - - 21.000000000000000 - - - - - - - Volts - - - - - - - - - - - 通道2 - - - - - - - - - 90 - 0 - - - - 通道2类型: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 加速度 - - - - - 速度 - - - - - 径向位移 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 传感器名称: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 灵敏度: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - - - mv/g - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 90 - 0 - - - - 采样率: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - - 32 k - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 220 - 80 - - - - 正常电压 - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 下限 - - - -30.000000000000000 - - - 30.000000000000000 - - - -21.000000000000000 - - - - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - 上限 - - - -30.000000000000000 - - - 30.000000000000000 - - - 21.000000000000000 - - - - - - - Volts - - - - - - - - - - - - - 20 - 30 - 71 - 16 - - - - 备份 - - - layoutWidget_7 - groupBox_5 - groupBox_6 - tabWidget - checkBox - - - - - 350 - 210 - 45 - 62 - - - - - - - ===> - - - - - - - = - - - Qt::AlignCenter - - - - - - - <=== - - - - - - - - - 10 - 480 - 738 - 37 - - - - - - - - 100 - 35 - - - - 确定 - - - - - - - - 100 - 35 - - - - 设置为默认值 - - - - - - - - 100 - 35 - - - - 加载预定义模板 - - - - - - - - 100 - 35 - - - - 测点名称 - - - - - - - - 100 - 35 - - - - 取消 - - - - - - - - 100 - 35 - - - - 打印 - - - - - - - - 100 - 35 - - - - 帮助 - - - - - - - - -