Compare commits
2 Commits
46390dc9df
...
97dbfa589e
Author | SHA1 | Date | |
---|---|---|---|
97dbfa589e | |||
2ddec8de0d |
18
keyphase.cpp
18
keyphase.cpp
@ -130,15 +130,19 @@ void KeyPhase::Init() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::shared_ptr<KeyphaseData> keyphase_data = std::dynamic_pointer_cast<KeyphaseData>(base_ptr);
|
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) {
|
if (i + 1 == 1) {
|
||||||
ui->checkBox_enable_1->setChecked(keyphase_data->variables_[i].active);
|
ui->checkBox_enable_1->setChecked(keyphase_data->variables_[i].active);
|
||||||
ui->doubleSpinBox_high_1->setValue(keyphase_data->variables_[i].normal_voltage_high);
|
ui->doubleSpinBox_high_1->setValue(keyphase_data->variables_[i].normal_voltage_high);
|
||||||
ui->doubleSpinBox_low_1->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
ui->doubleSpinBox_low_1->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||||
ui->radioButton_automatic_threshold_1->setChecked(true);
|
ui->radioButton_automatic_threshold_1->setChecked(true);
|
||||||
|
ui->doubleSpinBox_threshold_1->setEnabled(false);
|
||||||
|
ui->doubleSpinBox_hysteresis_1->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
ui->radioButton_manual_threshold_1->setChecked(true);
|
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_threshold_1->setValue(keyphase_data->variables_[i].threshold);
|
||||||
ui->doubleSpinBox_hysteresis_1->setValue(keyphase_data->variables_[i].hysteresis);
|
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);
|
ui->doubleSpinBox_low_2->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||||
ui->radioButton_automatic_threshold_2->setChecked(true);
|
ui->radioButton_automatic_threshold_2->setChecked(true);
|
||||||
|
ui->doubleSpinBox_threshold_2->setEnabled(false);
|
||||||
|
ui->doubleSpinBox_hysteresis_2->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
ui->radioButton_manual_threshold_2->setChecked(true);
|
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_threshold_2->setValue(keyphase_data->variables_[i].threshold);
|
||||||
ui->doubleSpinBox_hysteresis_2->setValue(keyphase_data->variables_[i].hysteresis);
|
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);
|
ui->doubleSpinBox_low_3->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||||
ui->radioButton_automatic_threshold_3->setChecked(true);
|
ui->radioButton_automatic_threshold_3->setChecked(true);
|
||||||
|
ui->doubleSpinBox_threshold_3->setEnabled(false);
|
||||||
|
ui->doubleSpinBox_hysteresis_3->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
ui->radioButton_manual_threshold_3->setChecked(true);
|
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_threshold_3->setValue(keyphase_data->variables_[i].threshold);
|
||||||
ui->doubleSpinBox_hysteresis_3->setValue(keyphase_data->variables_[i].hysteresis);
|
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);
|
ui->doubleSpinBox_low_4->setValue(keyphase_data->variables_[i].normal_voltage_low);
|
||||||
if (keyphase_data->variables_[i].automatic_threshold) {
|
if (keyphase_data->variables_[i].automatic_threshold) {
|
||||||
ui->radioButton_automatic_threshold_4->setChecked(true);
|
ui->radioButton_automatic_threshold_4->setChecked(true);
|
||||||
|
ui->doubleSpinBox_threshold_4->setEnabled(false);
|
||||||
|
ui->doubleSpinBox_hysteresis_4->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
ui->radioButton_manual_threshold_4->setChecked(true);
|
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_threshold_4->setValue(keyphase_data->variables_[i].threshold);
|
||||||
ui->doubleSpinBox_hysteresis_4->setValue(keyphase_data->variables_[i].hysteresis);
|
ui->doubleSpinBox_hysteresis_4->setValue(keyphase_data->variables_[i].hysteresis);
|
||||||
|
62
keyphase.ui
62
keyphase.ui
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>791</width>
|
<width>824</width>
|
||||||
<height>605</height>
|
<height>510</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -101,7 +101,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">
|
||||||
@ -440,6 +440,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_2">
|
<widget class="QWidget" name="tab_2">
|
||||||
@ -779,6 +792,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -794,7 +820,7 @@
|
|||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>0</x>
|
||||||
<y>220</y>
|
<y>220</y>
|
||||||
<width>77</width>
|
<width>77</width>
|
||||||
<height>75</height>
|
<height>75</height>
|
||||||
@ -829,7 +855,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget_2">
|
<widget class="QTabWidget" name="tabWidget_2">
|
||||||
<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">
|
||||||
@ -1168,6 +1194,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_6">
|
<widget class="QWidget" name="tab_6">
|
||||||
@ -1507,6 +1546,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>975</width>
|
<width>928</width>
|
||||||
<height>697</height>
|
<height>610</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -111,7 +111,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<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">
|
||||||
@ -1067,8 +1067,8 @@
|
|||||||
<widget class="QPushButton" name="pushButton_config_1_2">
|
<widget class="QPushButton" name="pushButton_config_1_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>20</x>
|
||||||
<y>120</y>
|
<y>110</y>
|
||||||
<width>93</width>
|
<width>93</width>
|
||||||
<height>28</height>
|
<height>28</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -2267,8 +2267,8 @@
|
|||||||
<widget class="QPushButton" name="pushButton_config_3_4">
|
<widget class="QPushButton" name="pushButton_config_3_4">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>50</x>
|
<x>20</x>
|
||||||
<y>130</y>
|
<y>100</y>
|
||||||
<width>93</width>
|
<width>93</width>
|
||||||
<height>28</height>
|
<height>28</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -463,7 +463,6 @@ void SingleRelay::slotDeleteItem()
|
|||||||
if(curIndex.isValid()){
|
if(curIndex.isValid()){
|
||||||
model_Relay->removeRow(curIndex.row(),curIndex.parent());
|
model_Relay->removeRow(curIndex.row(),curIndex.parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void SingleRelay::on_treeView_Relay_customContextMenuRequested(const QPoint &pos)
|
void SingleRelay::on_treeView_Relay_customContextMenuRequested(const QPoint &pos)
|
||||||
{
|
{
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>947</width>
|
<width>835</width>
|
||||||
<height>716</height>
|
<height>623</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user