修改界面,主界面振动板卡关联配置

This commit is contained in:
zhangsheng 2025-04-07 19:30:10 +08:00
parent ae6c9fdd25
commit c1f45d3524
2 changed files with 205 additions and 38 deletions

View File

@ -18,7 +18,8 @@
#include <qsettings.h> #include <qsettings.h>
#include <QNetworkProxy> #include <QNetworkProxy>
#include "relaysetting.h" #include "relaysetting.h"
#include "common.h" #include "config_mgr.h"
#include "vibrationdata.h"
QString g_strServerIp; QString g_strServerIp;
@ -282,6 +283,12 @@ void MainWindow::onMenuActionTriggered() {
chan_display = "键相"; chan_display = "键相";
} else if (slot_type == "HAM824") { } else if (slot_type == "HAM824") {
chan_display = "振动"; chan_display = "振动";
auto vibrationData = std::make_shared<VibrationData>();
vibrationData->slot_ = button_id;
if(rack_type == "单板卡"){
vibrationData->card_type_ = kCardVibSingle;
}
ConfigMgr::Instance()->AddCard(vibrationData);
} else if (slot_type == "OPM844") { } else if (slot_type == "OPM844") {
chan_display = "转速"; chan_display = "转速";
} }

View File

@ -61,7 +61,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>470</y> <y>500</y>
<width>844</width> <width>844</width>
<height>37</height> <height>37</height>
</rect> </rect>
@ -220,7 +220,7 @@
<x>40</x> <x>40</x>
<y>40</y> <y>40</y>
<width>331</width> <width>331</width>
<height>401</height> <height>441</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
@ -230,7 +230,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>300</y> <y>340</y>
<width>120</width> <width>120</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -272,7 +272,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>200</x> <x>200</x>
<y>300</y> <y>340</y>
<width>120</width> <width>120</width>
<height>81</height> <height>81</height>
</rect> </rect>
@ -315,20 +315,20 @@
<rect> <rect>
<x>10</x> <x>10</x>
<y>50</y> <y>50</y>
<width>312</width> <width>311</width>
<height>245</height> <height>268</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>245</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>245</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
@ -342,7 +342,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>9</x> <x>9</x>
<y>121</y> <y>150</y>
<width>288</width> <width>288</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -463,13 +463,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>1</x>
<y>0</y> <y>0</y>
<width>271</width> <width>266</width>
<height>111</height> <height>136</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@ -529,7 +529,7 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -700,7 +700,47 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_24">
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_power_1">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>是否供电</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -719,7 +759,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>9</x> <x>9</x>
<y>121</y> <y>150</y>
<width>288</width> <width>288</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -852,13 +892,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>1</x>
<y>0</y> <y>0</y>
<width>266</width> <width>266</width>
<height>108</height> <height>136</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
@ -1094,6 +1134,46 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_25">
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_power_2">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>是否供电</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
@ -1115,7 +1195,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>140</x> <x>140</x>
<y>310</y> <y>350</y>
<width>52</width> <width>52</width>
<height>75</height> <height>75</height>
</rect> </rect>
@ -1171,7 +1251,7 @@
<x>460</x> <x>460</x>
<y>40</y> <y>40</y>
<width>331</width> <width>331</width>
<height>401</height> <height>441</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
@ -1181,7 +1261,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>300</y> <y>340</y>
<width>120</width> <width>120</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -1223,7 +1303,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>200</x> <x>200</x>
<y>300</y> <y>340</y>
<width>120</width> <width>120</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -1267,19 +1347,19 @@
<x>10</x> <x>10</x>
<y>50</y> <y>50</y>
<width>312</width> <width>312</width>
<height>245</height> <height>271</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>245</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>245</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
@ -1293,7 +1373,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>9</x> <x>9</x>
<y>121</y> <y>150</y>
<width>288</width> <width>288</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -1414,13 +1494,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>1</x>
<y>0</y> <y>1</y>
<width>266</width> <width>266</width>
<height>108</height> <height>136</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
@ -1656,6 +1736,46 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_27">
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_power_3">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>是否供电</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
@ -1667,7 +1787,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>9</x> <x>9</x>
<y>121</y> <y>150</y>
<width>288</width> <width>288</width>
<height>80</height> <height>80</height>
</rect> </rect>
@ -1788,13 +1908,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>1</x>
<y>0</y> <y>1</y>
<width>266</width> <width>266</width>
<height>108</height> <height>136</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_11"> <layout class="QVBoxLayout" name="verticalLayout_11">
@ -2030,6 +2150,46 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_29">
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_power_4">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>是否供电</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
@ -2051,7 +2211,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>140</x> <x>140</x>
<y>312</y> <y>352</y>
<width>52</width> <width>52</width>
<height>75</height> <height>75</height>
</rect> </rect>