Compare commits

..

No commits in common. "97dbfa589e985a5a5a3c33f249c712bb3361871a" and "46390dc9df18bb3215e3093096a9e8c1e6173ba7" have entirely different histories.

5 changed files with 16 additions and 83 deletions

View File

@ -130,19 +130,15 @@ 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_SPEED; i++) { for (int i = 0; i < CHANNEL_COUNT; 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);
@ -153,12 +149,8 @@ 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);
@ -169,12 +161,8 @@ 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);
@ -185,12 +173,8 @@ 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);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>824</width> <width>791</width>
<height>510</height> <height>605</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>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@ -440,19 +440,6 @@
</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">
@ -792,19 +779,6 @@
</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>
@ -820,7 +794,7 @@
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>10</x>
<y>220</y> <y>220</y>
<width>77</width> <width>77</width>
<height>75</height> <height>75</height>
@ -855,7 +829,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget_2"> <widget class="QTabWidget" name="tabWidget_2">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tab_5"> <widget class="QWidget" name="tab_5">
<attribute name="title"> <attribute name="title">
@ -1194,19 +1168,6 @@
</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">
@ -1546,19 +1507,6 @@
</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>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>928</width> <width>975</width>
<height>610</height> <height>697</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>0</number> <number>1</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>20</x> <x>30</x>
<y>110</y> <y>120</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>20</x> <x>50</x>
<y>100</y> <y>130</y>
<width>93</width> <width>93</width>
<height>28</height> <height>28</height>
</rect> </rect>

View File

@ -463,6 +463,7 @@ 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)
{ {

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>835</width> <width>947</width>
<height>623</height> <height>716</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">