add point name
This commit is contained in:
parent
88cb93b261
commit
a9a951326e
@ -458,6 +458,8 @@ void ConfigMgr::Save(QString & file_path) {
|
|||||||
channel_item.insert("hysteresis", ptr->variables_[cid].hysteresis);
|
channel_item.insert("hysteresis", ptr->variables_[cid].hysteresis);
|
||||||
channel_item.insert("events_per_revolution", ptr->variables_[cid].events_per_revolution);
|
channel_item.insert("events_per_revolution", ptr->variables_[cid].events_per_revolution);
|
||||||
channel_item.insert("automatic_threshold",ptr->variables_[cid].automatic_threshold);
|
channel_item.insert("automatic_threshold",ptr->variables_[cid].automatic_threshold);
|
||||||
|
channel_item.insert("point_name",ptr->variables_[cid].point_name);
|
||||||
|
|
||||||
}
|
}
|
||||||
slot_item[QString::number(cid + 1)] = channel_item;
|
slot_item[QString::number(cid + 1)] = channel_item;
|
||||||
slot_item["dc_output"] = dc_output;
|
slot_item["dc_output"] = dc_output;
|
||||||
@ -919,6 +921,8 @@ void ConfigMgr::Load(QString filename) {
|
|||||||
keyphase_data->variables_[j].hysteresis = channel["hysteresis"].toDouble();
|
keyphase_data->variables_[j].hysteresis = channel["hysteresis"].toDouble();
|
||||||
keyphase_data->variables_[j].events_per_revolution = channel["events_per_revolution"].toInt();
|
keyphase_data->variables_[j].events_per_revolution = channel["events_per_revolution"].toInt();
|
||||||
keyphase_data->variables_[j].automatic_threshold = channel["automatic_threshold"].toBool();
|
keyphase_data->variables_[j].automatic_threshold = channel["automatic_threshold"].toBool();
|
||||||
|
keyphase_data->variables_[j].point_name = channel["point_name"].toString();
|
||||||
|
|
||||||
}
|
}
|
||||||
cards_.push_back(keyphase_data);
|
cards_.push_back(keyphase_data);
|
||||||
}else if (card_type_[i] == kCardRelaySingle ){
|
}else if (card_type_[i] == kCardRelaySingle ){
|
||||||
|
@ -412,6 +412,7 @@ typedef struct {
|
|||||||
} TachometerVariables;
|
} TachometerVariables;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
QString point_name;
|
||||||
bool active;
|
bool active;
|
||||||
float normal_voltage_low;
|
float normal_voltage_low;
|
||||||
float normal_voltage_high;
|
float normal_voltage_high;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "config_mgr.h"
|
#include "config_mgr.h"
|
||||||
#include "vibrationdata.h"
|
#include "vibrationdata.h"
|
||||||
#include "tachometer_data.h"
|
#include "tachometer_data.h"
|
||||||
|
#include "keyphase_data.h"
|
||||||
|
|
||||||
PointName::PointName(int slot_no_,int cardtype,QWidget *parent) :
|
PointName::PointName(int slot_no_,int cardtype,QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
@ -66,6 +67,12 @@ void PointName::on_pushButton_confirm_clicked()
|
|||||||
tac_data->variables_[1].point_name = ui->lineEdit_pointname_2->text();
|
tac_data->variables_[1].point_name = ui->lineEdit_pointname_2->text();
|
||||||
tac_data->variables_[2].point_name = ui->lineEdit_pointname_3->text();
|
tac_data->variables_[2].point_name = ui->lineEdit_pointname_3->text();
|
||||||
tac_data->variables_[3].point_name = ui->lineEdit_pointname_4->text();
|
tac_data->variables_[3].point_name = ui->lineEdit_pointname_4->text();
|
||||||
|
}else if(base_ptr->card_type_ == kCardKeyphaseSingle){
|
||||||
|
std::shared_ptr<KeyphaseData> keyphase_data = std::dynamic_pointer_cast<KeyphaseData>(base_ptr);
|
||||||
|
keyphase_data->variables_[0].point_name = ui->lineEdit_pointname_1->text();
|
||||||
|
keyphase_data->variables_[1].point_name = ui->lineEdit_pointname_2->text();
|
||||||
|
keyphase_data->variables_[2].point_name = ui->lineEdit_pointname_3->text();
|
||||||
|
keyphase_data->variables_[3].point_name = ui->lineEdit_pointname_4->text();
|
||||||
}
|
}
|
||||||
this->close();
|
this->close();
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -993,70 +993,70 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>通道1-通道2</string>
|
<string>通道1-通道2</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QComboBox" name="comboBox">
|
<widget class="QWidget" name="">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>20</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>180</width>
|
<width>218</width>
|
||||||
<height>22</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
||||||
<size>
|
<item>
|
||||||
<width>180</width>
|
<widget class="QComboBox" name="comboBox">
|
||||||
<height>0</height>
|
<property name="minimumSize">
|
||||||
</size>
|
<size>
|
||||||
</property>
|
<width>180</width>
|
||||||
<property name="maximumSize">
|
<height>0</height>
|
||||||
<size>
|
</size>
|
||||||
<width>120</width>
|
</property>
|
||||||
<height>16777215</height>
|
<property name="maximumSize">
|
||||||
</size>
|
<size>
|
||||||
</property>
|
<width>120</width>
|
||||||
<item>
|
<height>16777215</height>
|
||||||
<property name="text">
|
</size>
|
||||||
<string>No Processing</string>
|
</property>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>No Processing</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(SMAX) Smax</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(SMAX) Smax</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(DHE) Differential Housing Expansion</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(DHE) Differential Housing Expansion</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(RST) Relative Shaft Expansion (Shaft taper)</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(RST) Relative Shaft Expansion (Shaft taper)</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(RSC) Relative Shaft Expansion (Shaft collar)</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(RSC) Relative Shaft Expansion (Shaft collar)</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(DMF) Dual Mathematical Function</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
</widget>
|
<string>(DMF) Dual Mathematical Function</string>
|
||||||
<widget class="QLabel" name="label_2">
|
</property>
|
||||||
<property name="geometry">
|
</item>
|
||||||
<rect>
|
</widget>
|
||||||
<x>220</x>
|
</item>
|
||||||
<y>60</y>
|
<item>
|
||||||
<width>54</width>
|
<widget class="QLabel" name="label_2">
|
||||||
<height>12</height>
|
<property name="text">
|
||||||
</rect>
|
<string>函数</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>函数</string>
|
</item>
|
||||||
</property>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -1292,7 +1292,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -2174,70 +2174,70 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>通道3-通道4</string>
|
<string>通道3-通道4</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QComboBox" name="comboBox_2">
|
<widget class="QWidget" name="">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>20</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>180</width>
|
<width>218</width>
|
||||||
<height>22</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||||
<size>
|
<item>
|
||||||
<width>180</width>
|
<widget class="QComboBox" name="comboBox_2">
|
||||||
<height>0</height>
|
<property name="minimumSize">
|
||||||
</size>
|
<size>
|
||||||
</property>
|
<width>180</width>
|
||||||
<property name="maximumSize">
|
<height>0</height>
|
||||||
<size>
|
</size>
|
||||||
<width>120</width>
|
</property>
|
||||||
<height>16777215</height>
|
<property name="maximumSize">
|
||||||
</size>
|
<size>
|
||||||
</property>
|
<width>120</width>
|
||||||
<item>
|
<height>16777215</height>
|
||||||
<property name="text">
|
</size>
|
||||||
<string>No Processing</string>
|
</property>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>No Processing</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(SMAX) Smax</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(SMAX) Smax</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(DHE) Differential Housing Expansion</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(DHE) Differential Housing Expansion</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(RST) Relative Shaft Expansion (Shaft taper)</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(RST) Relative Shaft Expansion (Shaft taper)</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(RSC) Relative Shaft Expansion (Shaft collar)</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>(RSC) Relative Shaft Expansion (Shaft collar)</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>(DMF) Dual Mathematical Function</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
</widget>
|
<string>(DMF) Dual Mathematical Function</string>
|
||||||
<widget class="QLabel" name="label_3">
|
</property>
|
||||||
<property name="geometry">
|
</item>
|
||||||
<rect>
|
</widget>
|
||||||
<x>220</x>
|
</item>
|
||||||
<y>60</y>
|
<item>
|
||||||
<width>54</width>
|
<widget class="QLabel" name="label_3">
|
||||||
<height>12</height>
|
<property name="text">
|
||||||
</rect>
|
<string>函数</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>函数</string>
|
</item>
|
||||||
</property>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user