修改测试出现界面一些不合理的地方
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>731</width>
|
||||
<height>571</height>
|
||||
<width>773</width>
|
||||
<height>601</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -46,6 +46,9 @@
|
||||
<string>大气机</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_HeatOn2">
|
||||
<property name="text">
|
||||
@@ -111,6 +114,9 @@
|
||||
<string>BIT模式选择</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_11">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_ServoTest">
|
||||
<property name="text">
|
||||
@@ -148,6 +154,9 @@
|
||||
<string>扫频设置</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_12">
|
||||
<item row="0" column="0">
|
||||
@@ -356,6 +365,9 @@
|
||||
<string>惯导选择</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_sys"/>
|
||||
</item>
|
||||
@@ -401,6 +413,9 @@
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="pushButton_EmergencyStop">
|
||||
<property name="text">
|
||||
@@ -502,6 +517,9 @@
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_TestPoint"/>
|
||||
</item>
|
||||
@@ -551,6 +569,9 @@
|
||||
<string>舵机指令</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@@ -637,6 +658,9 @@
|
||||
<string>油量校准</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_10">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
|
||||
@@ -18,9 +18,6 @@ Inputter::Inputter(QWidget *parent) :
|
||||
this->setFocusPolicy(Qt::WheelFocus);
|
||||
this->setFocus();
|
||||
|
||||
|
||||
activateWindow();
|
||||
|
||||
ui->lineEdit->setFocusPolicy(Qt::WheelFocus);
|
||||
ui->lineEdit->setFocus();
|
||||
|
||||
@@ -111,10 +108,16 @@ void Inputter::keyPressEvent(QKeyEvent *event) //键盘按下事件
|
||||
on_pushButton_minus_clicked();
|
||||
break;
|
||||
case Qt::Key_Delete:
|
||||
on_pushButton_del_clicked();
|
||||
{
|
||||
curentStr = curentStr.mid(0,curentStr.size() - 1);
|
||||
ui->lineEdit->setText(curentStr);
|
||||
}
|
||||
break;
|
||||
case Qt::Key_Backspace:
|
||||
on_pushButton_del_clicked();
|
||||
{
|
||||
curentStr = curentStr.mid(0,curentStr.size() - 1);
|
||||
ui->lineEdit->setText(curentStr);
|
||||
}
|
||||
break;
|
||||
case Qt::Key_Escape:
|
||||
on_pushButton_cancel_clicked();
|
||||
|
||||
+27
-18
@@ -47,6 +47,8 @@ MenuBarUI::MenuBarUI(QWidget *parent) :
|
||||
state::unSelected);
|
||||
|
||||
|
||||
CurrentIndex = 3;
|
||||
|
||||
|
||||
//setArm(true);
|
||||
}
|
||||
@@ -87,9 +89,6 @@ void MenuBarUI::setPushButtonState(uint8_t state1,uint8_t state2,uint8_t state3,
|
||||
ui->pushButton_Info->style()->unpolish(ui->pushButton_Info);
|
||||
ui->pushButton_Info->style()->polish(ui->pushButton_Info);
|
||||
|
||||
ui->pushButton_Base->setProperty("state",state6);
|
||||
ui->pushButton_Base->style()->unpolish(ui->pushButton_Base);
|
||||
ui->pushButton_Base->style()->polish(ui->pushButton_Base);
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +104,8 @@ void MenuBarUI::onClicked()
|
||||
|
||||
void MenuBarUI::on_pushButton_Setting_clicked()
|
||||
{
|
||||
ui->pushButton_Base->hide();
|
||||
CurrentIndex = 0;
|
||||
|
||||
setPushButtonState(state::Selected,
|
||||
state::unSelected,
|
||||
state::unSelected,
|
||||
@@ -114,12 +114,13 @@ void MenuBarUI::on_pushButton_Setting_clicked()
|
||||
state::unSelected);
|
||||
|
||||
update();
|
||||
emit IndexChanged(0);
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void MenuBarUI::on_pushButton_SelfTest_clicked()
|
||||
{
|
||||
ui->pushButton_Base->hide();
|
||||
CurrentIndex = 1;
|
||||
|
||||
setPushButtonState(state::unSelected,
|
||||
state::Selected,
|
||||
state::unSelected,
|
||||
@@ -127,12 +128,13 @@ void MenuBarUI::on_pushButton_SelfTest_clicked()
|
||||
state::unSelected,
|
||||
state::unSelected);
|
||||
update();
|
||||
emit IndexChanged(1);
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void MenuBarUI::on_pushButton_Mission_clicked()
|
||||
{
|
||||
ui->pushButton_Base->hide();
|
||||
CurrentIndex = 2;
|
||||
|
||||
setPushButtonState(state::unSelected,
|
||||
state::unSelected,
|
||||
state::Selected,
|
||||
@@ -140,12 +142,23 @@ void MenuBarUI::on_pushButton_Mission_clicked()
|
||||
state::unSelected,
|
||||
state::unSelected);
|
||||
update();
|
||||
emit IndexChanged(2);
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void MenuBarUI::on_pushButton_Flight_clicked()
|
||||
{
|
||||
ui->pushButton_Base->show();
|
||||
if(CurrentIndex == 3)
|
||||
{
|
||||
CurrentIndex = 5;
|
||||
ui->pushButton_Flight->setText(tr("Base"));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentIndex = 3;
|
||||
ui->pushButton_Flight->setText(tr("Flight"));
|
||||
}
|
||||
|
||||
setPushButtonState(state::unSelected,
|
||||
state::unSelected,
|
||||
state::unSelected,
|
||||
@@ -153,12 +166,13 @@ void MenuBarUI::on_pushButton_Flight_clicked()
|
||||
state::unSelected,
|
||||
state::unSelected);
|
||||
update();
|
||||
emit IndexChanged(3);
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void MenuBarUI::on_pushButton_Info_clicked()
|
||||
{
|
||||
ui->pushButton_Base->hide();
|
||||
CurrentIndex = 4;
|
||||
|
||||
setPushButtonState(state::unSelected,
|
||||
state::unSelected,
|
||||
state::unSelected,
|
||||
@@ -167,14 +181,9 @@ void MenuBarUI::on_pushButton_Info_clicked()
|
||||
state::unSelected);
|
||||
|
||||
update();
|
||||
emit IndexChanged(4);
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void MenuBarUI::on_pushButton_Base_clicked()
|
||||
{
|
||||
update();
|
||||
emit IndexChanged(5);
|
||||
}
|
||||
|
||||
void MenuBarUI::showMessage(const QString &message, int TimeOut)
|
||||
{
|
||||
|
||||
@@ -75,7 +75,6 @@ private slots:
|
||||
|
||||
void on_pushButton_Info_clicked();
|
||||
|
||||
void on_pushButton_Base_clicked();
|
||||
|
||||
private:
|
||||
Ui::MenuBarUI *ui;
|
||||
@@ -83,6 +82,8 @@ private:
|
||||
QTimer *MessageTimer = nullptr;
|
||||
|
||||
|
||||
int CurrentIndex = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif // MENUBARUI_H
|
||||
|
||||
+12
-31
@@ -233,8 +233,8 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_SelfTest">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_Setting">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
@@ -248,27 +248,14 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SelfTest</string>
|
||||
<string>Setting</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pushButton_Flight">
|
||||
<property name="minimumSize">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Flight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
@@ -315,8 +302,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_Setting">
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pushButton_Flight">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
@@ -330,32 +317,26 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Setting</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
<string>Flight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QPushButton" name="pushButton_Base">
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_SelfTest">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>79</width>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Base</string>
|
||||
<string>SelfTest</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "LinkUI.h"
|
||||
#include "LinkUI.h"
|
||||
#include "ui_LinkUI.h"
|
||||
|
||||
LinkUI::LinkUI(QWidget *parent) :
|
||||
@@ -91,7 +91,6 @@ void LinkUI::on_commandClicked()
|
||||
//connectdialog->setDevice(DeviceString);
|
||||
//connectdialog->setInterface(InterfaceString);
|
||||
|
||||
connectdialog->setInit(InterfaceString,DeviceString);
|
||||
|
||||
connect(connectdialog,SIGNAL(cancelSignal()),
|
||||
this,SLOT(closeTab()));
|
||||
@@ -105,6 +104,8 @@ void LinkUI::on_commandClicked()
|
||||
connect(this,SIGNAL(PortConnect(QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant)),
|
||||
connectdialog,SLOT(PortConnected(QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant)));
|
||||
|
||||
connectdialog->setInit(InterfaceString,DeviceString);
|
||||
|
||||
|
||||
//当前界面恢复到初始状态
|
||||
recover();//这个会删除btn指针
|
||||
|
||||
@@ -152,11 +152,11 @@ StatusUI::StatusUI(QWidget *parent) :
|
||||
setColor(ui->label_fix2,state::inital);
|
||||
//=====================================
|
||||
|
||||
setColor(ui->label_atteck_1,state::inital);
|
||||
setColor(ui->label_slide_1,state::inital);
|
||||
//setColor(ui->label_atteck_1,state::inital);
|
||||
//setColor(ui->label_slide_1,state::inital);
|
||||
setColor(ui->label_tas_1,state::inital);
|
||||
|
||||
setColor(ui->label_Ma_1,state::inital);
|
||||
//setColor(ui->label_Ma_1,state::inital);
|
||||
setColor( ui->label_ps_1,state::inital);
|
||||
setColor(ui->label_qBar_1,state::inital);
|
||||
//===================================
|
||||
|
||||
+14
-17
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>674</width>
|
||||
<height>614</height>
|
||||
<height>616</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -683,19 +683,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="21" column="1">
|
||||
<widget class="QLabel" name="label_Ma_1">
|
||||
<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="31" column="1">
|
||||
<widget class="QLabel" name="label_alt_real">
|
||||
<property name="styleSheet">
|
||||
@@ -1290,7 +1277,7 @@
|
||||
<item row="20" column="0">
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="text">
|
||||
<string>空速[m/s]</string>
|
||||
<string>真/表[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1310,7 +1297,7 @@
|
||||
<item row="22" column="0">
|
||||
<widget class="QLabel" name="label_47">
|
||||
<property name="text">
|
||||
<string>静压[Pa]</string>
|
||||
<string>静压[kPa]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1667,7 +1654,7 @@
|
||||
<item row="23" column="0">
|
||||
<widget class="QLabel" name="label_53">
|
||||
<property name="text">
|
||||
<string>动压[Pa]</string>
|
||||
<string>动压[kPa]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1752,6 +1739,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="21" column="1">
|
||||
<widget class="QLabel" name="label_Ma_1">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
|
||||
@@ -260,6 +260,16 @@ void Diagram::setEngine(uint32_t pos,QVariant value)
|
||||
break;
|
||||
case 3:
|
||||
ui->label_FuelPressure->setText(value.toString());
|
||||
|
||||
if((value.toFloat() <= 10)||(value.toFloat() >= 80))
|
||||
{
|
||||
setColor(ui->label_FuelPressure,state::failure);
|
||||
}
|
||||
else
|
||||
{
|
||||
setColor(ui->label_FuelPressure,state::inital);
|
||||
}
|
||||
|
||||
break;
|
||||
case 4:
|
||||
ui->label_Innage->setText(value.toString());
|
||||
|
||||
+221
-201
@@ -71,106 +71,21 @@
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>侧滑角[°]</string>
|
||||
<string>攻角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_measure_roll">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<string>地速[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLabel" name="label_measure_tas">
|
||||
<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="3">
|
||||
<widget class="QLabel" name="label_target_heading">
|
||||
<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="1">
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="text">
|
||||
<string>表速[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLabel" name="label_target_altitude">
|
||||
<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="1">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>航迹角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="label_target_pitch">
|
||||
<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_measure_vrate">
|
||||
<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_measure_altitude">
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_measure_pitch">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
@@ -183,7 +98,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="label_measure_cas">
|
||||
<widget class="QLabel" name="label_measure_tas">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
@@ -195,21 +110,47 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_27">
|
||||
<item row="6" column="2">
|
||||
<widget class="QLabel" name="label_measure_altitude">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>真空速[m/s]</string>
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>攻角[°]</string>
|
||||
<string>航迹角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="11" column="1">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<property name="text">
|
||||
<string>爬升率[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="3">
|
||||
<widget class="QLabel" name="label_target_tas">
|
||||
<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_measure_atteck">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -234,14 +175,186 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="6" column="3">
|
||||
<widget class="QLabel" name="label_target_altitude">
|
||||
<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="3">
|
||||
<widget class="QLabel" name="label_target_pitch">
|
||||
<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_measure_gs">
|
||||
<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_measure_heading">
|
||||
<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_measure_slide">
|
||||
<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="1">
|
||||
<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_24">
|
||||
<property name="text">
|
||||
<string>表速[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLabel" name="label_target_heading">
|
||||
<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="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>侧滑角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>俯仰角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QLabel" name="label_measure_ma">
|
||||
<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="11" column="2">
|
||||
<widget class="QLabel" name="label_measure_vrate">
|
||||
<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_measure_roll">
|
||||
<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">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>滚转角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>海拔[m]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="label_30">
|
||||
<property name="text">
|
||||
<string>马赫数[Ma]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="label_measure_cas">
|
||||
<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="3">
|
||||
<widget class="QLabel" name="label_target_roll">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -266,113 +379,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_measure_slide">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
<string>实测</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="label_measure_gs">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="text">
|
||||
<string>地速[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QLabel" name="label_measure_ma">
|
||||
<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_measure_pitch">
|
||||
<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">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>俯仰角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<property name="text">
|
||||
<string>爬升率[m/s]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>滚转角[°]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_measure_heading">
|
||||
<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="1">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>海拔[m]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QLabel" name="label_target_tas">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(189, 189, 189);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
<string>指令</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
||||
@@ -57,6 +57,8 @@ void Tools_Index2::setFloat(void)
|
||||
this->setParent(nullptr);
|
||||
QScreen *screen=QGuiApplication::primaryScreen ();;
|
||||
this->move((screen->availableGeometry().width()-this->width())/2,(screen->availableGeometry().height()-this->height())/2);
|
||||
this->setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||
this->resize(600,320);
|
||||
this->show();
|
||||
}
|
||||
else
|
||||
|
||||
+11
-11
@@ -1274,14 +1274,14 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
statusui->setDigitalAtmosphereSystem2(2,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.beta,'f',1));
|
||||
statusui->setDigitalAtmosphereSystem2(3,QString::number(dlink->mavlinknode->vehicle.vfr_hud.airspeed,'f',1));
|
||||
statusui->setDigitalAtmosphereSystem2(4,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.mach,'f',2));
|
||||
statusui->setDigitalAtmosphereSystem2(5,QString::number(dlink->mavlinknode->vehicle.scaled_pressure.press_abs,'f',1));
|
||||
statusui->setDigitalAtmosphereSystem2(6,QString::number(dlink->mavlinknode->vehicle.scaled_pressure.press_diff,'f',1));
|
||||
statusui->setDigitalAtmosphereSystem2(5,QString::number(dlink->mavlinknode->vehicle.scaled_pressure.press_abs,'f',3));
|
||||
statusui->setDigitalAtmosphereSystem2(6,QString::number(dlink->mavlinknode->vehicle.scaled_pressure.press_diff,'f',3));
|
||||
|
||||
|
||||
statusui->setDigitalAtmosphereSystem1(3,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.Airspeed,'f',1));
|
||||
statusui->setDigitalAtmosphereSystem1(4,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.mach,'f',2));
|
||||
statusui->setDigitalAtmosphereSystem1(5,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.ps,'f',1));
|
||||
statusui->setDigitalAtmosphereSystem1(6,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.qbar,'f',1));
|
||||
//statusui->setDigitalAtmosphereSystem1(4,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.mach,'f',2));
|
||||
statusui->setDigitalAtmosphereSystem1(5,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.ps * 0.01,'f',3));
|
||||
statusui->setDigitalAtmosphereSystem1(6,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.qbar * 0.01,'f',3));
|
||||
|
||||
|
||||
statusui->setState(1,QString::number(dlink->mavlinknode->vehicle.attitude.roll * 57.3,'f',1),
|
||||
@@ -1468,9 +1468,9 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
dlink->mavlinknode->vehicle.ins1.gx,
|
||||
dlink->mavlinknode->vehicle.ins1.gy,
|
||||
dlink->mavlinknode->vehicle.ins1.gx,
|
||||
dlink->mavlinknode->vehicle.ins1.roll,
|
||||
dlink->mavlinknode->vehicle.ins1.pitch,
|
||||
dlink->mavlinknode->vehicle.ins1.yaw);//ins
|
||||
dlink->mavlinknode->vehicle.ins1.roll * 57.3,
|
||||
dlink->mavlinknode->vehicle.ins1.pitch * 57.3,
|
||||
dlink->mavlinknode->vehicle.ins1.yaw * 57.3);//ins
|
||||
toolsui->diagram->setAttitude(2,
|
||||
dlink->mavlinknode->vehicle.ins2.ax,
|
||||
dlink->mavlinknode->vehicle.ins2.ay,
|
||||
@@ -1478,9 +1478,9 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
dlink->mavlinknode->vehicle.ins2.gx,
|
||||
dlink->mavlinknode->vehicle.ins2.gy,
|
||||
dlink->mavlinknode->vehicle.ins2.gx,
|
||||
dlink->mavlinknode->vehicle.ins2.roll,
|
||||
dlink->mavlinknode->vehicle.ins2.pitch,
|
||||
dlink->mavlinknode->vehicle.ins2.yaw);//sbg
|
||||
dlink->mavlinknode->vehicle.ins2.roll * 57.3,
|
||||
dlink->mavlinknode->vehicle.ins2.pitch * 57.3,
|
||||
dlink->mavlinknode->vehicle.ins2.yaw * 57.3);//sbg
|
||||
|
||||
toolsui->diagram->setBaseState(1,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.alpha,'f',1),0);
|
||||
toolsui->diagram->setBaseState(2,QString::number(dlink->mavlinknode->vehicle.emb_atom_com.beta,'f',1),0);
|
||||
|
||||
@@ -1094,6 +1094,15 @@ void OPMapWidget::setWPLock(bool const & lock)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
WayPointLine *l = qgraphicsitem_cast<WayPointLine *>(i);
|
||||
if (l) {
|
||||
l->setEdit(isEdit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,6 +71,9 @@ UAVItem::UAVItem(MapGraphicItem *map, OPMapWidget *parent, QString uavPic ,uint8
|
||||
connect(map, SIGNAL(childRefreshPosition()), this, SLOT(RefreshPos()));
|
||||
connect(map, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
|
||||
connect(map, SIGNAL(zoomChanged(double, double, double)), this, SLOT(zoomChangedSlot()));
|
||||
|
||||
|
||||
|
||||
}
|
||||
UAVItem::~UAVItem()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file waypointline.cpp
|
||||
@@ -45,6 +45,9 @@ WayPointLine::WayPointLine(WayPointItem *from, WayPointItem *to, MapGraphicItem
|
||||
this->setZValue(2);
|
||||
}
|
||||
connect(map, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
|
||||
|
||||
isEdit = true;
|
||||
|
||||
}
|
||||
|
||||
WayPointLine::WayPointLine(HomeItem *from, WayPointItem *to, MapGraphicItem *map, QColor color, bool dashed, int width) : QGraphicsLineItem(map),
|
||||
@@ -62,6 +65,9 @@ WayPointLine::WayPointLine(HomeItem *from, WayPointItem *to, MapGraphicItem *map
|
||||
this->setZValue(2);
|
||||
}
|
||||
connect(map, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
|
||||
|
||||
isEdit = true;
|
||||
|
||||
}
|
||||
int WayPointLine::type() const
|
||||
{
|
||||
@@ -81,10 +87,27 @@ void WayPointLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
Q_UNUSED(widget);
|
||||
|
||||
QPen myPen = pen();
|
||||
myPen.setColor(myColor);
|
||||
qreal arrowSize = 10;
|
||||
|
||||
|
||||
if(isEdit == false)
|
||||
{
|
||||
myPen.setColor(myColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
myPen.setColor("#ffff00");
|
||||
}
|
||||
|
||||
|
||||
//qreal arrowSize = 10;
|
||||
painter->setPen(myPen);
|
||||
painter->setBrush(myColor);
|
||||
|
||||
/*
|
||||
if(isEdit == false)
|
||||
{
|
||||
painter->setBrush(myColor);
|
||||
}
|
||||
*/
|
||||
|
||||
double angle = ::acos(line().dx() / line().length());
|
||||
if (line().dy() >= 0) {
|
||||
@@ -122,6 +145,14 @@ void WayPointLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
painter->drawLine(line());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void WayPointLine::setEdit(bool value)
|
||||
{
|
||||
isEdit = value;
|
||||
}
|
||||
|
||||
|
||||
void WayPointLine::refreshLocations()
|
||||
{
|
||||
this->setLine(destination->pos().x(), destination->pos().y(), source->pos().x(), source->pos().y());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file waypointline.h
|
||||
@@ -57,6 +57,17 @@ public:
|
||||
{
|
||||
myColor = color;
|
||||
}
|
||||
|
||||
|
||||
void setEdit(bool value);
|
||||
|
||||
|
||||
bool Edit(void)
|
||||
{
|
||||
return isEdit;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
QGraphicsItem *source;
|
||||
QGraphicsItem *destination;
|
||||
@@ -84,6 +95,20 @@ public slots:
|
||||
void refreshLocations();
|
||||
void waypointdeleted();
|
||||
void setOpacitySlot(qreal opacity);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool isEdit = false;
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endif // WAYPOINTLINE_H
|
||||
|
||||
Reference in New Issue
Block a user