添加健康

This commit is contained in:
hm
2020-10-08 17:32:13 +08:00
parent 1944dac45a
commit 73ac013b67
8 changed files with 109 additions and 5 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ include (./MenuBarUI/MenuBarUI.pri)
include (./CommandUI/CommandUI.pri)
include (./CheckUI/CheckUI.pri)
include (./Config/Config.pri)
include (./StatusUI/StatusUI.pri)
+14
View File
@@ -0,0 +1,14 @@
#include "StatusUI.h"
#include "ui_StatusUI.h"
StatusUI::StatusUI(QWidget *parent) :
QWidget(parent),
ui(new Ui::StatusUI)
{
ui->setupUi(this);
}
StatusUI::~StatusUI()
{
delete ui;
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef STATUSUI_H
#define STATUSUI_H
#include <QWidget>
namespace Ui {
class StatusUI;
}
class StatusUI : public QWidget
{
Q_OBJECT
public:
explicit StatusUI(QWidget *parent = nullptr);
~StatusUI();
private:
Ui::StatusUI *ui;
};
#endif // STATUSUI_H
+36
View File
@@ -0,0 +1,36 @@
QT += opengl
QT += network
QT += sql
QT += svg
QT += quickwidgets
QT += quick
QT += qml
INCLUDEPATH += $$PWD/../ComponentUI/CharInputter
INCLUDEPATH += $$PWD/../ComponentUI/Inputter
INCLUDEPATH += $$PWD/../ComponentUI/MultiSelector
INCLUDEPATH += $$PWD/../ComponentUI/Selector
FORMS += \
$$PWD/StatusUI.ui
HEADERS += \
$$PWD/StatusUI.h
SOURCES += \
$$PWD/StatusUI.cpp
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StatusUI</class>
<widget class="QWidget" name="StatusUI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>426</width>
<height>380</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<resources/>
<connections/>
</ui>
+2 -1
View File
@@ -86,7 +86,7 @@ void ServoSystem::setBUMState(mavlink_bmustate_t *t)
{
ui->label_temp->setText(QString::number(t->BAT1_hi_temp_degC) + "");
ui->label_onBoard_28V_Voltage->setText(QString::number(t->BAT1_group_voltage_mv));
ui->label_onBoard_28V_Voltage->setText(QString::number(t->BAT1_group_voltage_mv * 0.001) + "V");
ui->label_onBoard_28V_Current->setText(QString::number(t->BAT1_group_current_dA));
ui->label_onBoard_56V_Voltage->setText(QString::number(t->BAT2_group_voltage_mv));
@@ -98,5 +98,6 @@ void ServoSystem::setBUMState(mavlink_bmustate_t *t)
}
+12 -3
View File
@@ -51,10 +51,16 @@ MainWindow::MainWindow(QWidget *parent)
toolsui = new ToolsUI(this);
toolsui->hide();
//状态
statusui = new StatusUI(this);
//指令
commandUI = new CommandUI(this);
dlink = new DLink();
map = new mapcontrol::OPMapWidget(this);
@@ -325,9 +331,12 @@ 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(),copk->height());
commandUI->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height(),
copk->width(),this->height() - menuBarUI->height() - copk->height());
commandUI->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height() + statusui->height(),
copk->width(),this->height() - menuBarUI->height() - statusui->height() - copk->height());
toolsui->setGeometry(0,menuBarUI->height(),
@@ -844,7 +853,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
toolsui->powersystem->setTurbineState(&dlink->mavlinknode->vehicle.turbinstate);
toolsui->servosystem->setBUMState(&dlink->mavlinknode->vehicle.bmustate);
}
+3
View File
@@ -19,6 +19,7 @@
#include "dlink.h"
#include "skin.h"
#include "StatusUI/StatusUI.h"
#include "InspectUI/InspectUI.h"
#include "ToolsUI/ToolsUI.h"
@@ -99,6 +100,8 @@ protected:
Config *config = nullptr;
StatusUI *statusui = nullptr;
MenuBarUI *menuBarUI = nullptr;
CommandUI *commandUI = nullptr;
Cockpit *copk = nullptr;