优化振动板卡界面,加速度,速度,位移配置界面
This commit is contained in:
parent
411a9c1a44
commit
21ea1b3f8b
@ -271,6 +271,7 @@ void Acceleration::on_pushButton_confirm_clicked()
|
|||||||
}
|
}
|
||||||
file.write(jsonDoc_variables.toJson());
|
file.write(jsonDoc_variables.toJson());
|
||||||
file.close();
|
file.close();
|
||||||
|
this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -279,3 +280,9 @@ void Acceleration::on_pushButton_set_default_clicked()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Acceleration::on_pushButton_cancel_clicked()
|
||||||
|
{
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ private slots:
|
|||||||
|
|
||||||
void on_pushButton_set_default_clicked();
|
void on_pushButton_set_default_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_cancel_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Acceleration *ui;
|
Ui::Acceleration *ui;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -1043,19 +1043,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_point_name">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>测点名称</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_cancel">
|
<widget class="QPushButton" name="pushButton_cancel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -1071,6 +1058,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_print">
|
<widget class="QPushButton" name="pushButton_print">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -1084,6 +1074,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_help">
|
<widget class="QPushButton" name="pushButton_help">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
|
@ -98,6 +98,12 @@ typedef struct{
|
|||||||
int danger_response_time;
|
int danger_response_time;
|
||||||
}Tachometer_Variables;
|
}Tachometer_Variables;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
QString transducer_name;
|
||||||
|
double scale_factor;
|
||||||
|
}Transducer;
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t head[3]; // 固定值:0xAA55AA
|
uint8_t head[3]; // 固定值:0xAA55AA
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"slot":1,
|
|
||||||
"id":1,
|
|
||||||
"rms_active":true,
|
|
||||||
"integrate_active":true,
|
|
||||||
"variables":[
|
|
||||||
{
|
|
||||||
"type":"direct",
|
|
||||||
"full_sacle_range":"0-20 m/s^2 pk",
|
|
||||||
"clamp_value":1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type":"bias_volt",
|
|
||||||
"bias_voltage": -24,
|
|
||||||
"clamp_value":1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type":"1x_ampl",
|
|
||||||
"full_sacle_range":"0-2 m/s^2 pk",
|
|
||||||
"clamp_value":1.25,
|
|
||||||
"phase_lag":180,
|
|
||||||
"checked":true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type":"2x_ampl",
|
|
||||||
"full_sacle_range":"0-2 m/s^2 pk",
|
|
||||||
"clamp_value":1.25,
|
|
||||||
"phase_lag":180,
|
|
||||||
"checked":true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"delay":{
|
|
||||||
"alert":30,
|
|
||||||
"danger":30.0,
|
|
||||||
"100ms":true
|
|
||||||
},
|
|
||||||
"alert_latching":true,
|
|
||||||
"danger_latching":true,
|
|
||||||
"timed_ok":true,
|
|
||||||
"recorder_output":"direct",
|
|
||||||
"two_ma_clamp":true,
|
|
||||||
"trip_mutiply":1.00,
|
|
||||||
"comparision":"direct",
|
|
||||||
"comparision_percentage":5
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"slot":1,
|
|
||||||
"id":1,
|
|
||||||
"filter":[
|
|
||||||
{
|
|
||||||
"type":"high_pass",
|
|
||||||
"low":5,
|
|
||||||
"high":1000,
|
|
||||||
"checked":true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type":"low_pass",
|
|
||||||
"low":5,
|
|
||||||
"high":1000,
|
|
||||||
"checked":true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type":"band_pass",
|
|
||||||
"low":5,
|
|
||||||
"high":1000,
|
|
||||||
"checked":true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -7,49 +7,49 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "振动",
|
"chan_display": "振动",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 1,
|
"slot": 1,
|
||||||
"slot_type": "HAM824"
|
"slot_type": "HAM824"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "振动",
|
"chan_display": "振动",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 2,
|
"slot": 2,
|
||||||
"slot_type": "HAM824"
|
"slot_type": "HAM824"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "振动",
|
"chan_display": "振动",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 3,
|
"slot": 3,
|
||||||
"slot_type": "HAM824"
|
"slot_type": "HAM824"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "振动",
|
"chan_display": "振动",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 4,
|
"slot": 4,
|
||||||
"slot_type": "HAM824"
|
"slot_type": "HAM824"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "键相",
|
"chan_display": "键相",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 5,
|
"slot": 5,
|
||||||
"slot_type": "KPM834"
|
"slot_type": "KPM834"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "键相",
|
"chan_display": "键相",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 6,
|
"slot": 6,
|
||||||
"slot_type": "KPM834"
|
"slot_type": "KPM834"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "键相",
|
"chan_display": "键相",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 7,
|
"slot": 7,
|
||||||
"slot_type": "KPM834"
|
"slot_type": "KPM834"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "转速",
|
"chan_display": "转速",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 8,
|
"slot": 8,
|
||||||
"slot_type": "OPM844"
|
"slot_type": "OPM844"
|
||||||
},
|
},
|
||||||
@ -73,25 +73,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "继电器",
|
"chan_display": "继电器",
|
||||||
"rack_type": "",
|
"rack_type": "Single",
|
||||||
"slot": 12,
|
"slot": 12,
|
||||||
"slot_type": "DOM810"
|
"slot_type": "DOM810"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "三冗余继电器",
|
"chan_display": "三冗余继电器",
|
||||||
"rack_type": "",
|
"rack_type": "TMR1",
|
||||||
"slot": 13,
|
"slot": 13,
|
||||||
"slot_type": "DOM810"
|
"slot_type": "DOM810"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "三冗余继电器",
|
"chan_display": "三冗余继电器",
|
||||||
"rack_type": "",
|
"rack_type": "TMR2",
|
||||||
"slot": 14,
|
"slot": 14,
|
||||||
"slot_type": "DOM810"
|
"slot_type": "DOM810"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chan_display": "三冗余继电器",
|
"chan_display": "三冗余继电器",
|
||||||
"rack_type": "",
|
"rack_type": "TMR3",
|
||||||
"slot": 15,
|
"slot": 15,
|
||||||
"slot_type": "DOM810"
|
"slot_type": "DOM810"
|
||||||
}
|
}
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
{
|
|
||||||
"card_type": 1,
|
|
||||||
"chan": [
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "acceleration",
|
|
||||||
"id": 1,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
0,
|
|
||||||
21
|
|
||||||
],
|
|
||||||
"rack_type": "TMR",
|
|
||||||
"sample_rate": "32 k",
|
|
||||||
"scale_factor": "10",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "1-3",
|
|
||||||
"transducer_name": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "acceleration",
|
|
||||||
"id": 2,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
0,
|
|
||||||
21
|
|
||||||
],
|
|
||||||
"rack_type": "TMR",
|
|
||||||
"sample_rate": "32 k",
|
|
||||||
"scale_factor": "10",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "1-3",
|
|
||||||
"transducer_name": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "velocity",
|
|
||||||
"id": 3,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
0,
|
|
||||||
21
|
|
||||||
],
|
|
||||||
"rack_type": "TMR",
|
|
||||||
"sample_rate": "32 k",
|
|
||||||
"scale_factor": "10",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "3-5",
|
|
||||||
"transducer_name": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "velocity",
|
|
||||||
"id": 4,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
0,
|
|
||||||
21
|
|
||||||
],
|
|
||||||
"rack_type": "TMR",
|
|
||||||
"sample_rate": "32 k",
|
|
||||||
"scale_factor": "10",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "3-5",
|
|
||||||
"transducer_name": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"slot": 3,
|
|
||||||
"version": 1
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
{
|
|
||||||
"card_type": 1,
|
|
||||||
"chan": [
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "",
|
|
||||||
"id": -1973791,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
],
|
|
||||||
"rack_type": "",
|
|
||||||
"sample_rate": "",
|
|
||||||
"scale_factor": "",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "",
|
|
||||||
"transducer_name": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "",
|
|
||||||
"id": -1973791,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
],
|
|
||||||
"rack_type": "",
|
|
||||||
"sample_rate": "",
|
|
||||||
"scale_factor": "",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "",
|
|
||||||
"transducer_name": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "",
|
|
||||||
"id": -1973791,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
],
|
|
||||||
"rack_type": "",
|
|
||||||
"sample_rate": "",
|
|
||||||
"scale_factor": "",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "",
|
|
||||||
"transducer_name": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"active": true,
|
|
||||||
"channel_name": "",
|
|
||||||
"channel_type": "",
|
|
||||||
"id": -1973791,
|
|
||||||
"normal_voltage_range": [
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
],
|
|
||||||
"rack_type": "",
|
|
||||||
"sample_rate": "",
|
|
||||||
"scale_factor": "",
|
|
||||||
"standby": true,
|
|
||||||
"tmr_group": "",
|
|
||||||
"transducer_name": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"slot": 4,
|
|
||||||
"version": 1
|
|
||||||
}
|
|
4
doc/config/transducer.json
Normal file
4
doc/config/transducer.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[{"transducer_name":"测试1","scale_factor":1.25},
|
||||||
|
{"transducer_name":"测试2","scale_factor":1.26},
|
||||||
|
{"transducer_name":"测试3","scale_factor":1.27},
|
||||||
|
{"transducer_name":"测试4","scale_factor":1.28}]
|
@ -285,6 +285,7 @@ void Radial_vibration::on_pushButton_confirm_clicked()
|
|||||||
file_variables.write(jsonDoc_variables.toJson());
|
file_variables.write(jsonDoc_variables.toJson());
|
||||||
file_filter.close();
|
file_filter.close();
|
||||||
file_variables.close();
|
file_variables.close();
|
||||||
|
this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,74 +23,12 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_5">
|
<widget class="QWidget" name="tab_5">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>传感器和滤波配置</string>
|
<string>传感器和滤波配置</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QGroupBox" name="groupBox_10">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>180</y>
|
|
||||||
<width>241</width>
|
|
||||||
<height>131</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>传感器方向</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QSpinBox" name="spinBox_angle">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>40</x>
|
|
||||||
<y>50</y>
|
|
||||||
<width>61</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QRadioButton" name="radioButton_direction_left">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>130</x>
|
|
||||||
<y>50</y>
|
|
||||||
<width>89</width>
|
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 左</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QRadioButton" name="radioButton_direction_right">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>130</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>89</width>
|
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 右</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>40</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>54</width>
|
|
||||||
<height>12</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>角度</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@ -1111,19 +1049,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_point_name">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>测点名称</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_cancel">
|
<widget class="QPushButton" name="pushButton_cancel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -1139,6 +1064,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_print">
|
<widget class="QPushButton" name="pushButton_print">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -1152,6 +1080,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_help">
|
<widget class="QPushButton" name="pushButton_help">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
|
@ -17,6 +17,17 @@ Seismic_monitor::Seismic_monitor(int slot,QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->widget_body->setProperty("flag", "body");
|
ui->widget_body->setProperty("flag", "body");
|
||||||
ui->comboBox_chan_type_1->setView(new QListView());
|
ui->comboBox_chan_type_1->setView(new QListView());
|
||||||
|
ui->comboBox_chan_type_2->setView(new QListView());
|
||||||
|
ui->comboBox_chan_type_3->setView(new QListView());
|
||||||
|
ui->comboBox_chan_type_4->setView(new QListView());
|
||||||
|
ui->comboBox_transducer_name_1->setView(new QListView());
|
||||||
|
ui->comboBox_transducer_name_2->setView(new QListView());
|
||||||
|
ui->comboBox_transducer_name_3->setView(new QListView());
|
||||||
|
ui->comboBox_transducer_name_4->setView(new QListView());
|
||||||
|
ui->comboBox_sample_rate_1->setView(new QListView());
|
||||||
|
ui->comboBox_sample_rate_2->setView(new QListView());
|
||||||
|
ui->comboBox_sample_rate_3->setView(new QListView());
|
||||||
|
ui->comboBox_sample_rate_4->setView(new QListView());
|
||||||
slot_no = slot;
|
slot_no = slot;
|
||||||
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_);
|
||||||
@ -70,9 +81,41 @@ void Seismic_monitor::readJsonFile(const QString &filePath)
|
|||||||
seismic_monitor[i].normal_voltage_low = voltage_range_array[0].toDouble();
|
seismic_monitor[i].normal_voltage_low = voltage_range_array[0].toDouble();
|
||||||
seismic_monitor[i].normal_voltage_high = voltage_range_array[1].toDouble();
|
seismic_monitor[i].normal_voltage_high = voltage_range_array[1].toDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QFile file_transducer(QCoreApplication::applicationDirPath() + QString("\\config\\transducer.json"));
|
||||||
|
if (!file_transducer.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for reading:" << filePath;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString content_transducer = file_transducer.readAll();
|
||||||
|
file_transducer.close();
|
||||||
|
QByteArray jsonData2 = content_transducer.toUtf8();
|
||||||
|
QJsonDocument jsonDoc2 = QJsonDocument::fromJson(jsonData2);
|
||||||
|
if (jsonDoc2.isNull()) {
|
||||||
|
qDebug() << "Cannot parse JSON document";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!jsonDoc2.isObject() && !jsonDoc2.isArray()) {
|
||||||
|
qDebug() << "JSON document is not an object or an array";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QJsonArray json_array = jsonDoc2.array();
|
||||||
|
for (int var = 0; var < json_array.size(); ++var) {
|
||||||
|
Transducer transducer;
|
||||||
|
QJsonObject temp_obj = json_array[var].toObject();
|
||||||
|
transducer.transducer_name = temp_obj["transducer_name"].toString();
|
||||||
|
transducer.scale_factor = temp_obj["scale_factor"].toDouble();
|
||||||
|
vec_transducer.push_back(transducer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void Seismic_monitor::Init()
|
void Seismic_monitor::Init()
|
||||||
{
|
{
|
||||||
|
for (int var = 0; var < vec_transducer.size(); ++var) {
|
||||||
|
ui->comboBox_transducer_name_1->addItem(vec_transducer[var].transducer_name);
|
||||||
|
ui->comboBox_transducer_name_2->addItem(vec_transducer[var].transducer_name);
|
||||||
|
ui->comboBox_transducer_name_3->addItem(vec_transducer[var].transducer_name);
|
||||||
|
ui->comboBox_transducer_name_4->addItem(vec_transducer[var].transducer_name);
|
||||||
|
}
|
||||||
for (int i = 0; i < CHANNLE_COUNT; i++) {
|
for (int i = 0; i < CHANNLE_COUNT; i++) {
|
||||||
if(seismic_monitor[i].id == 1){
|
if(seismic_monitor[i].id == 1){
|
||||||
qDebug() << seismic_monitor[i].channel_type ;
|
qDebug() << seismic_monitor[i].channel_type ;
|
||||||
@ -212,7 +255,7 @@ void Seismic_monitor::on_pushButton_confirm_clicked()
|
|||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
file.write(jsonDoc.toJson());
|
file.write(jsonDoc.toJson());
|
||||||
file.close();
|
file.close();
|
||||||
|
this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -294,3 +337,91 @@ void Seismic_monitor::on_pushButton_config_4_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_chan_type_1_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
if(ui->comboBox_chan_type_1->currentText() == "加速度"){
|
||||||
|
ui->label_unit_1->setText("mV / m/s^2");
|
||||||
|
}else if(ui->comboBox_chan_type_1->currentText() == "速度"){
|
||||||
|
ui->label_unit_1->setText("mV / mm/s");
|
||||||
|
}else if(ui->comboBox_chan_type_1->currentText() == "位移"){
|
||||||
|
ui->label_unit_1->setText("mV / mm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_chan_type_2_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
if(ui->comboBox_chan_type_2->currentText() == "加速度"){
|
||||||
|
ui->label_unit_2->setText("mV / m/s^2");
|
||||||
|
}else if(ui->comboBox_chan_type_2->currentText() == "速度"){
|
||||||
|
ui->label_unit_2->setText("mV / mm/s");
|
||||||
|
}else if(ui->comboBox_chan_type_2->currentText() == "位移"){
|
||||||
|
ui->label_unit_2->setText("mV / mm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_chan_type_3_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
if(ui->comboBox_chan_type_3->currentText() == "加速度"){
|
||||||
|
ui->label_unit_3->setText("mV / m/s^2");
|
||||||
|
}else if(ui->comboBox_chan_type_3->currentText() == "速度"){
|
||||||
|
ui->label_unit_3->setText("mV / mm/s");
|
||||||
|
}else if(ui->comboBox_chan_type_3->currentText() == "位移"){
|
||||||
|
ui->label_unit_3->setText("mV / mm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_chan_type_4_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
if(ui->comboBox_chan_type_4->currentText() == "加速度"){
|
||||||
|
ui->label_unit_4->setText("mV / m/s^2");
|
||||||
|
}else if(ui->comboBox_chan_type_4->currentText() == "速度"){
|
||||||
|
ui->label_unit_4->setText("mV / mm/s");
|
||||||
|
}else if(ui->comboBox_chan_type_4->currentText() == "位移"){
|
||||||
|
ui->label_unit_4->setText("mV / mm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seismic_monitor::on_pushButton_cancel_clicked()
|
||||||
|
{
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_transducer_name_1_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
for(int var = 0;var < vec_transducer.size();++var){
|
||||||
|
if(ui->comboBox_transducer_name_1->currentText() == vec_transducer[var].transducer_name){
|
||||||
|
ui->lineEdit_scale_factor_1->setText(QString::number(vec_transducer[var].scale_factor));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_transducer_name_2_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
for(int var = 0;var < vec_transducer.size();++var){
|
||||||
|
if(ui->comboBox_transducer_name_2->currentText() == vec_transducer[var].transducer_name){
|
||||||
|
ui->lineEdit_scale_factor_2->setText(QString::number(vec_transducer[var].scale_factor));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_transducer_name_3_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
for(int var = 0;var < vec_transducer.size();++var){
|
||||||
|
if(ui->comboBox_transducer_name_3->currentText() == vec_transducer[var].transducer_name){
|
||||||
|
ui->lineEdit_scale_factor_3->setText(QString::number(vec_transducer[var].scale_factor));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Seismic_monitor::on_comboBox_transducer_name_4_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
for(int var = 0;var < vec_transducer.size();++var){
|
||||||
|
if(ui->comboBox_transducer_name_4->currentText() == vec_transducer[var].transducer_name){
|
||||||
|
ui->lineEdit_scale_factor_4->setText(QString::number(vec_transducer[var].scale_factor));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -30,13 +30,31 @@ private slots:
|
|||||||
|
|
||||||
void on_pushButton_config_4_clicked();
|
void on_pushButton_config_4_clicked();
|
||||||
|
|
||||||
|
void on_comboBox_chan_type_1_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_comboBox_chan_type_2_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_comboBox_chan_type_3_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_comboBox_chan_type_4_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_pushButton_cancel_clicked();
|
||||||
|
|
||||||
|
void on_comboBox_transducer_name_1_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_comboBox_transducer_name_2_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_comboBox_transducer_name_3_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_comboBox_transducer_name_4_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Seismic_monitor *ui;
|
Ui::Seismic_monitor *ui;
|
||||||
|
|
||||||
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;
|
||||||
void Init();
|
void Init();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,19 +119,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_point_name">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>测点名称</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_cancel">
|
<widget class="QPushButton" name="pushButton_cancel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -147,6 +134,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_print">
|
<widget class="QPushButton" name="pushButton_print">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -160,6 +150,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_help">
|
<widget class="QPushButton" name="pushButton_help">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -339,7 +332,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -494,7 +487,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_unit_1">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>mv/ m/s^2</string>
|
<string>mv/ m/s^2</string>
|
||||||
</property>
|
</property>
|
||||||
@ -600,6 +593,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -643,6 +639,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -825,7 +824,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_25">
|
<widget class="QLabel" name="label_unit_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>mv/ m/s^2</string>
|
<string>mv/ m/s^2</string>
|
||||||
</property>
|
</property>
|
||||||
@ -937,6 +936,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -986,6 +988,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -1201,7 +1206,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -1356,7 +1361,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_16">
|
<widget class="QLabel" name="label_unit_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>mv/ m/s</string>
|
<string>mv/ m/s</string>
|
||||||
</property>
|
</property>
|
||||||
@ -1462,6 +1467,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -1505,6 +1513,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -1687,7 +1698,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_20">
|
<widget class="QLabel" name="label_unit_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>mv/ m/s^2</string>
|
<string>mv/ m/s^2</string>
|
||||||
</property>
|
</property>
|
||||||
@ -1793,6 +1804,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -1836,6 +1850,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -113,10 +113,7 @@ void Tachometer::Init()
|
|||||||
ui->radioButton_overspeed_latching_2->setCheckable(true);
|
ui->radioButton_overspeed_latching_2->setCheckable(true);
|
||||||
else
|
else
|
||||||
ui->radioButton_overspeed_latching_2->setCheckable(false);
|
ui->radioButton_overspeed_latching_2->setCheckable(false);
|
||||||
if(tachometer_variables[i].normal_latching)
|
|
||||||
ui->radioButton_normal_latching_2->setCheckable(true);
|
|
||||||
else
|
|
||||||
ui->radioButton_not_normal_latching_2->setCheckable(false);
|
|
||||||
}
|
}
|
||||||
if(tachometer_variables[i].id == 3){
|
if(tachometer_variables[i].id == 3){
|
||||||
ui->checkBox_chan_3->setChecked(tachometer_variables[i].active);
|
ui->checkBox_chan_3->setChecked(tachometer_variables[i].active);
|
||||||
@ -139,10 +136,7 @@ void Tachometer::Init()
|
|||||||
ui->radioButton_overspeed_latching_3->setCheckable(true);
|
ui->radioButton_overspeed_latching_3->setCheckable(true);
|
||||||
else
|
else
|
||||||
ui->radioButton_overspeed_latching_3->setCheckable(false);
|
ui->radioButton_overspeed_latching_3->setCheckable(false);
|
||||||
if(tachometer_variables[i].normal_latching)
|
|
||||||
ui->radioButton_normal_latching_3->setCheckable(true);
|
|
||||||
else
|
|
||||||
ui->radioButton_not_normal_latching_3->setCheckable(false);
|
|
||||||
}
|
}
|
||||||
if(tachometer_variables[i].id == 4){
|
if(tachometer_variables[i].id == 4){
|
||||||
ui->checkBox_chan_4->setChecked(tachometer_variables[i].active);
|
ui->checkBox_chan_4->setChecked(tachometer_variables[i].active);
|
||||||
@ -165,10 +159,7 @@ void Tachometer::Init()
|
|||||||
ui->radioButton_overspeed_latching_4->setCheckable(true);
|
ui->radioButton_overspeed_latching_4->setCheckable(true);
|
||||||
else
|
else
|
||||||
ui->radioButton_overspeed_latching_4->setCheckable(false);
|
ui->radioButton_overspeed_latching_4->setCheckable(false);
|
||||||
if(tachometer_variables[i].normal_latching)
|
|
||||||
ui->radioButton_normal_latching_4->setCheckable(true);
|
|
||||||
else
|
|
||||||
ui->radioButton_not_normal_latching_4->setCheckable(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,7 +192,6 @@ void Tachometer::on_pushButton_confirm_clicked()
|
|||||||
tachometer_variables[i].two_ma_clamp = ui->checkBox_two_ma_clamp_2->isChecked();
|
tachometer_variables[i].two_ma_clamp = ui->checkBox_two_ma_clamp_2->isChecked();
|
||||||
tachometer_variables[i].alert_latching = ui->radioButton_alert_latching_2->isChecked();
|
tachometer_variables[i].alert_latching = ui->radioButton_alert_latching_2->isChecked();
|
||||||
tachometer_variables[i].overspeed_latching = ui->radioButton_overspeed_latching_2->isChecked();
|
tachometer_variables[i].overspeed_latching = ui->radioButton_overspeed_latching_2->isChecked();
|
||||||
tachometer_variables[i].normal_latching = ui->radioButton_normal_latching_2->isChecked();
|
|
||||||
}
|
}
|
||||||
if(tachometer_variables[i].id == 3){
|
if(tachometer_variables[i].id == 3){
|
||||||
tachometer_variables[i].active = ui->checkBox_chan_3->isChecked();
|
tachometer_variables[i].active = ui->checkBox_chan_3->isChecked();
|
||||||
@ -215,7 +205,6 @@ void Tachometer::on_pushButton_confirm_clicked()
|
|||||||
tachometer_variables[i].two_ma_clamp = ui->checkBox_two_ma_clamp_3->isChecked();
|
tachometer_variables[i].two_ma_clamp = ui->checkBox_two_ma_clamp_3->isChecked();
|
||||||
tachometer_variables[i].alert_latching = ui->radioButton_alert_latching_3->isChecked();
|
tachometer_variables[i].alert_latching = ui->radioButton_alert_latching_3->isChecked();
|
||||||
tachometer_variables[i].overspeed_latching = ui->radioButton_overspeed_latching_3->isChecked();
|
tachometer_variables[i].overspeed_latching = ui->radioButton_overspeed_latching_3->isChecked();
|
||||||
tachometer_variables[i].normal_latching = ui->radioButton_normal_latching_3->isChecked();
|
|
||||||
}
|
}
|
||||||
if(tachometer_variables[i].id == 4){
|
if(tachometer_variables[i].id == 4){
|
||||||
tachometer_variables[i].active = ui->checkBox_chan_4->isChecked();
|
tachometer_variables[i].active = ui->checkBox_chan_4->isChecked();
|
||||||
@ -229,7 +218,6 @@ void Tachometer::on_pushButton_confirm_clicked()
|
|||||||
tachometer_variables[i].two_ma_clamp = ui->checkBox_two_ma_clamp_4->isChecked();
|
tachometer_variables[i].two_ma_clamp = ui->checkBox_two_ma_clamp_4->isChecked();
|
||||||
tachometer_variables[i].alert_latching = ui->radioButton_alert_latching_4->isChecked();
|
tachometer_variables[i].alert_latching = ui->radioButton_alert_latching_4->isChecked();
|
||||||
tachometer_variables[i].overspeed_latching = ui->radioButton_overspeed_latching_4->isChecked();
|
tachometer_variables[i].overspeed_latching = ui->radioButton_overspeed_latching_4->isChecked();
|
||||||
tachometer_variables[i].normal_latching = ui->radioButton_normal_latching_4->isChecked();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString slot = QString("%1").arg(slot_no);
|
QString slot = QString("%1").arg(slot_no);
|
||||||
|
132
tachometer.ui
132
tachometer.ui
@ -712,48 +712,6 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>通道 2</string>
|
<string>通道 2</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QGroupBox" name="groupBox_17">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>310</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>151</width>
|
|
||||||
<height>91</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>正常模式</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QRadioButton" name="radioButton_normal_latching_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 锁存</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QRadioButton" name="radioButton_not_normal_latching_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 非锁存</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="groupBox_13">
|
<widget class="QGroupBox" name="groupBox_13">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@ -1023,7 +981,7 @@
|
|||||||
<widget class="QGroupBox" name="groupBox_16">
|
<widget class="QGroupBox" name="groupBox_16">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>480</x>
|
<x>310</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>191</width>
|
<width>191</width>
|
||||||
<height>91</height>
|
<height>91</height>
|
||||||
@ -1553,7 +1511,7 @@
|
|||||||
<widget class="QGroupBox" name="groupBox_25">
|
<widget class="QGroupBox" name="groupBox_25">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>480</x>
|
<x>310</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>191</width>
|
<width>191</width>
|
||||||
<height>91</height>
|
<height>91</height>
|
||||||
@ -1596,48 +1554,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox_26">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>310</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>151</width>
|
|
||||||
<height>91</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>正常模式</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QRadioButton" name="radioButton_normal_latching_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 锁存</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QRadioButton" name="radioButton_not_normal_latching_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 非锁存</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="groupBox_27">
|
<widget class="QGroupBox" name="groupBox_27">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@ -2125,7 +2041,7 @@
|
|||||||
<widget class="QGroupBox" name="groupBox_34">
|
<widget class="QGroupBox" name="groupBox_34">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>470</x>
|
<x>310</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>191</width>
|
<width>191</width>
|
||||||
<height>91</height>
|
<height>91</height>
|
||||||
@ -2168,48 +2084,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox_35">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>310</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>151</width>
|
|
||||||
<height>91</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>正常模式</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QRadioButton" name="radioButton_normal_latching_4">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 锁存</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QRadioButton" name="radioButton_not_normal_latching_4">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 非锁存</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="groupBox_36">
|
<widget class="QGroupBox" name="groupBox_36">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
@ -279,5 +279,12 @@ void Velocity::on_pushButton_confirm_clicked()
|
|||||||
}
|
}
|
||||||
variables_file.write(variables_data);
|
variables_file.write(variables_data);
|
||||||
variables_file.close();
|
variables_file.close();
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Velocity::on_pushButton_cancel_clicked()
|
||||||
|
{
|
||||||
|
this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void on_pushButton_confirm_clicked();
|
void on_pushButton_confirm_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_cancel_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Velocity *ui;
|
Ui::Velocity *ui;
|
||||||
|
|
||||||
|
100
velocity.ui
100
velocity.ui
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>754</width>
|
<width>717</width>
|
||||||
<height>582</height>
|
<height>582</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_5">
|
<widget class="QWidget" name="tab_5">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -980,15 +980,18 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="pushButton_confirm">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>11</x>
|
<x>20</x>
|
||||||
<y>531</y>
|
<y>530</y>
|
||||||
<width>100</width>
|
<width>661</width>
|
||||||
<height>35</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_confirm">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -999,15 +1002,9 @@
|
|||||||
<string>确定</string>
|
<string>确定</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_set_default">
|
<widget class="QPushButton" name="pushButton_set_default">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>117</x>
|
|
||||||
<y>531</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -1018,53 +1015,9 @@
|
|||||||
<string>设置为默认值</string>
|
<string>设置为默认值</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="pushButton_load_template">
|
</item>
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
|
||||||
<x>223</x>
|
|
||||||
<y>531</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> 加载预定义模板</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton" name="pushButton_point_name">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>329</x>
|
|
||||||
<y>531</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>测点名称</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton" name="pushButton_cancel">
|
<widget class="QPushButton" name="pushButton_cancel">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>435</x>
|
|
||||||
<y>531</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -1075,14 +1028,11 @@
|
|||||||
<string>取消</string>
|
<string>取消</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_print">
|
<widget class="QPushButton" name="pushButton_print">
|
||||||
<property name="geometry">
|
<property name="enabled">
|
||||||
<rect>
|
<bool>false</bool>
|
||||||
<x>541</x>
|
|
||||||
<y>531</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -1094,14 +1044,11 @@
|
|||||||
<string>打印</string>
|
<string>打印</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_help">
|
<widget class="QPushButton" name="pushButton_help">
|
||||||
<property name="geometry">
|
<property name="enabled">
|
||||||
<rect>
|
<bool>false</bool>
|
||||||
<x>647</x>
|
|
||||||
<y>531</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>35</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -1113,6 +1060,9 @@
|
|||||||
<string>帮助</string>
|
<string>帮助</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user