调整键相和转速界面
This commit is contained in:
parent
19eeb8246e
commit
2ddec8de0d
18
keyphase.cpp
18
keyphase.cpp
@ -130,15 +130,19 @@ void KeyPhase::Init() {
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<KeyphaseData> keyphase_data = std::dynamic_pointer_cast<KeyphaseData>(base_ptr);
|
||||
for (int i = 0; i < CHANNEL_COUNT; i++) {
|
||||
for (int i = 0; i < CHANNEL_COUNT_SPEED; i++) {
|
||||
if (i + 1 == 1) {
|
||||
ui->checkBox_enable_1->setChecked(keyphase_data->variables_[i].active);
|
||||
ui->doubleSpinBox_high_1->setValue(keyphase_data->variables_[i].normal_voltage_high);
|
||||
ui->doubleSpinBox_low_1->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||
ui->radioButton_automatic_threshold_1->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_1->setEnabled(false);
|
||||
ui->doubleSpinBox_hysteresis_1->setEnabled(false);
|
||||
} else {
|
||||
ui->radioButton_manual_threshold_1->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_1->setEnabled(true);
|
||||
ui->doubleSpinBox_hysteresis_1->setEnabled(true);
|
||||
}
|
||||
ui->doubleSpinBox_threshold_1->setValue(keyphase_data->variables_[i].threshold);
|
||||
ui->doubleSpinBox_hysteresis_1->setValue(keyphase_data->variables_[i].hysteresis);
|
||||
@ -149,8 +153,12 @@ void KeyPhase::Init() {
|
||||
ui->doubleSpinBox_low_2->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||
ui->radioButton_automatic_threshold_2->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_2->setEnabled(false);
|
||||
ui->doubleSpinBox_hysteresis_2->setEnabled(false);
|
||||
} else {
|
||||
ui->radioButton_manual_threshold_2->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_2->setEnabled(true);
|
||||
ui->doubleSpinBox_hysteresis_2->setEnabled(true);
|
||||
}
|
||||
ui->doubleSpinBox_threshold_2->setValue(keyphase_data->variables_[i].threshold);
|
||||
ui->doubleSpinBox_hysteresis_2->setValue(keyphase_data->variables_[i].hysteresis);
|
||||
@ -161,8 +169,12 @@ void KeyPhase::Init() {
|
||||
ui->doubleSpinBox_low_3->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||
ui->radioButton_automatic_threshold_3->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_3->setEnabled(false);
|
||||
ui->doubleSpinBox_hysteresis_3->setEnabled(false);
|
||||
} else {
|
||||
ui->radioButton_manual_threshold_3->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_3->setEnabled(true);
|
||||
ui->doubleSpinBox_hysteresis_3->setEnabled(true);
|
||||
}
|
||||
ui->doubleSpinBox_threshold_3->setValue(keyphase_data->variables_[i].threshold);
|
||||
ui->doubleSpinBox_hysteresis_3->setValue(keyphase_data->variables_[i].hysteresis);
|
||||
@ -173,8 +185,12 @@ void KeyPhase::Init() {
|
||||
ui->doubleSpinBox_low_4->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||
ui->radioButton_automatic_threshold_4->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_4->setEnabled(false);
|
||||
ui->doubleSpinBox_hysteresis_4->setEnabled(false);
|
||||
} else {
|
||||
ui->radioButton_manual_threshold_4->setChecked(true);
|
||||
ui->doubleSpinBox_threshold_4->setEnabled(true);
|
||||
ui->doubleSpinBox_hysteresis_4->setEnabled(true);
|
||||
}
|
||||
ui->doubleSpinBox_threshold_4->setValue(keyphase_data->variables_[i].threshold);
|
||||
ui->doubleSpinBox_hysteresis_4->setValue(keyphase_data->variables_[i].hysteresis);
|
||||
|
62
keyphase.ui
62
keyphase.ui
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>791</width>
|
||||
<height>605</height>
|
||||
<width>824</width>
|
||||
<height>510</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -101,7 +101,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -440,6 +440,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
@ -779,6 +792,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -794,7 +820,7 @@
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<x>0</x>
|
||||
<y>220</y>
|
||||
<width>77</width>
|
||||
<height>75</height>
|
||||
@ -829,7 +855,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget_2">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
@ -1168,6 +1194,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_6">
|
||||
@ -1507,6 +1546,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>975</width>
|
||||
<height>697</height>
|
||||
<width>928</width>
|
||||
<height>610</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -111,7 +111,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -1067,8 +1067,8 @@
|
||||
<widget class="QPushButton" name="pushButton_config_1_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>120</y>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>93</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
@ -2267,8 +2267,8 @@
|
||||
<widget class="QPushButton" name="pushButton_config_3_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>130</y>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>93</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
|
@ -112,6 +112,8 @@ void SingleRelay::Init(){
|
||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(cardbase_ptr);
|
||||
for (int var = 0; var < CHANNEL_COUNT; ++var) {
|
||||
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(var + 1);
|
||||
if(variable_base == nullptr)
|
||||
continue;
|
||||
QString item_data,item_str;
|
||||
if(variable_base->alert_high.enable){
|
||||
item_str = QString("%1 (槽位 %2 通道 %3 警报高)").arg(ptr->base_config_[var].point_name).arg(ptr->base_config_[var].chan_id.mid(1,2)).arg(ptr->base_config_[var].chan_id.mid(4,2));
|
||||
@ -462,7 +464,6 @@ void SingleRelay::slotDeleteItem()
|
||||
if(curIndex.isValid()){
|
||||
model_Relay->removeRow(curIndex.row(),curIndex.parent());
|
||||
}
|
||||
|
||||
}
|
||||
void SingleRelay::on_treeView_Relay_customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>947</width>
|
||||
<height>716</height>
|
||||
<width>835</width>
|
||||
<height>623</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
Loading…
x
Reference in New Issue
Block a user