添加状态显示

This commit is contained in:
hm
2020-10-09 21:55:15 +08:00
parent 17be845e60
commit 386bfb2842
6 changed files with 834 additions and 50 deletions
+788 -33
View File
@@ -6,62 +6,817 @@
<rect>
<x>0</x>
<y>0</y>
<width>426</width>
<height>100</height>
<width>346</width>
<height>424</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="3">
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>BMU</string>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>健康状态</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_1">
<property name="text">
<string>内置惯导</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string>SBG</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>BMU</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QCheckBox" name="checkBox_4">
<property name="text">
<string>ECU</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QCheckBox" name="checkBox_5">
<property name="text">
<string>CCM</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QCheckBox" name="checkBox_6">
<property name="text">
<string>FL</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="6">
<widget class="QCheckBox" name="checkBox_6">
<property name="text">
<string>FL</string>
<item row="1" column="0" rowspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>基本状态</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>实测值</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>指令值</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>攻角[°]</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_4">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_5">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>俯仰角[°]</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_7">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_8">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>滚转角[°]</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_10">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_11">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>航迹角[°]</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_13">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_14">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>侧偏距[m]</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_16">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLabel" name="label_17">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>海拔[m]</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_19">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_20">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>空速[m/s]</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label_22">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QLabel" name="label_23">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>真空速[m/s]</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="label_25">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QLabel" name="label_26">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>马赫数[Ma]</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="label_28">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLabel" name="label_29">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_33">
<property name="text">
<string>升降速率</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLabel" name="label_31">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QLabel" name="label_32">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="5">
<widget class="QCheckBox" name="checkBox_5">
<property name="text">
<string>CCM</string>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>发动机</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="2" column="1">
<widget class="QLabel" name="label_62">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_60">
<property name="text">
<string>转速</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_58">
<property name="text">
<string>油门</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_57">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_61">
<property name="text">
<string>温度</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_59">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<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>
</item>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>电池</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QLabel" name="label_50">
<property name="text">
<string>机载28V</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_51">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_49">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_52">
<property name="text">
<string>机载56V</string>
</property>
</widget>
</item>
<item row="2" column="1">
<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>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>惯导号</string>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>舵面指令</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_34">
<property name="text">
<string>方向舵</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_35">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_36">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_37">
<property name="text">
<string>左V尾</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_38">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_39">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_40">
<property name="text">
<string>右V尾</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_41">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_42">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_43">
<property name="text">
<string>左副翼</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_44">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_45">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_46">
<property name="text">
<string>右副翼</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_47">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_48">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_1">
<property name="text">
<string>内置惯导</string>
<item row="3" column="1">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>数据链</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="1">
<widget class="QLabel" name="label_55">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_54">
<property name="text">
<string>信号质量</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_53">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_56">
<property name="text">
<string>字节速度</string>
</property>
</widget>
</item>
<item row="2" column="0">
<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>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string>SBG</string>
<item row="4" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QCheckBox" name="checkBox_4">
<property name="text">
<string>ECU</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
</layout>
</widget>
+7 -10
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>989</width>
<height>805</height>
<height>915</height>
</rect>
</property>
<property name="windowTitle">
@@ -17,17 +17,14 @@
<item row="0" column="2">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>66</width>
<height>37</height>
</size>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</spacer>
</widget>
</item>
</layout>
</item>
+28 -1
View File
@@ -26,7 +26,7 @@ ToolsUI::ToolsUI(QWidget *parent) :
ui->pushButton_Servos->setFixedSize(w,h);
ui->PowerSystem->setFixedSize(w,h);
ui->ServoSystem->setFixedSize(w,h);
ui->pushButton_ShowExtern->setFixedSize(w,h);
index0 = new Tools_Index0(ui->frame);
@@ -276,3 +276,30 @@ void ToolsUI::on_ServoSystem_clicked()
CurrentIndex = 6;
emit IndexChanged(CurrentIndex);
}
void ToolsUI::on_pushButton_ShowExtern_clicked()
{
switch (CurrentIndex) {
case 0:
index0->setFloat();
break;
case 1:
//index1->setFloat();
break;
case 2:
//index2->setFloat();
break;
case 3:
//index3->setFloat();
break;
case 4:
index4->setFloat();
break;
case 5:
powersystem->setFloat();
break;
case 6:
servosystem->setFloat();
break;
}
}
+2
View File
@@ -57,6 +57,8 @@ private slots:
void on_ServoSystem_clicked();
void on_pushButton_ShowExtern_clicked();
signals:
void IndexChanged(const int &index);
+1 -1
View File
@@ -152,7 +152,7 @@
</widget>
</item>
<item row="8" column="0">
<widget class="QPushButton" name="pushButton">
<widget class="QPushButton" name="pushButton_ShowExtern">
<property name="text">
<string>小窗口显示</string>
</property>
+8 -5
View File
@@ -322,8 +322,12 @@ void MainWindow::resizeEvent(QResizeEvent *event)
map->setGeometry(0,menuBarUI->height(),
this->width()- copk->width(),this->height() - menuBarUI->height());
this->width()- copk->width() - statusui->width(),this->height() - menuBarUI->height());
statusui->setGeometry(map->width(),
menuBarUI->height(),
copk->width() *1.5,
this->height() - menuBarUI->height());
copk->setGeometry(this->width() - copk->width(),menuBarUI->height(),
copk->width(),copk->height());
@@ -331,12 +335,11 @@ void MainWindow::resizeEvent(QResizeEvent *event)
missionUI->setGeometry(this->width() - copk->width(),menuBarUI->height(),
copk->width(),this->height() - menuBarUI->height());
statusui->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height(),
copk->width(),100);
commandUI->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height() + statusui->height(),
copk->width(),this->height() - menuBarUI->height() - statusui->height() - copk->height());
commandUI->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height(),
copk->width(),this->height() - menuBarUI->height() - copk->height());
toolsui->setGeometry(0,menuBarUI->height(),