高程显示完成
This commit is contained in:
@@ -197,6 +197,10 @@ void CommandUI::loadCommandJson(const QString& jsonFilename)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void CommandUI::commandAccepted(bool flag,uint16_t command,uint8_t result)
|
||||
{
|
||||
//找到消息的发送者
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
#include <QCommonStyle>
|
||||
#include "QStyle"
|
||||
|
||||
#include "multiselector.h"
|
||||
#include "Selector.h"
|
||||
#include "Inputter.h"
|
||||
#include "CharInputter.h"
|
||||
#include "Confirm.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class CommandUI;
|
||||
|
||||
@@ -8,6 +8,13 @@ QT += quickwidgets
|
||||
QT += quick
|
||||
QT += qml
|
||||
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/CharInputter
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/Inputter
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/MultiSelector
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/Selector
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/Confirm
|
||||
|
||||
|
||||
FORMS += \
|
||||
$$PWD/CommandUI.ui \
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
@@ -23,6 +29,12 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_Accept">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Accept</string>
|
||||
</property>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -130,9 +130,7 @@ void AltitudeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
|
||||
//画图例
|
||||
painter->save();
|
||||
|
||||
painter->translate(20,180);
|
||||
|
||||
ePen.setColor(AltColor);
|
||||
painter->setPen(ePen);
|
||||
painter->drawLine(220,-170,250,-170);
|
||||
@@ -142,7 +140,6 @@ void AltitudeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
painter->setPen(ePen);
|
||||
painter->drawLine(300,-170,330,-170);
|
||||
painter->drawText(QRect(340,-180,40,20),Qt::AlignVCenter|Qt::AlignLeft, tr("地形"));
|
||||
|
||||
painter->restore();
|
||||
|
||||
|
||||
@@ -301,7 +298,7 @@ void AltitudeItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
//qDebug() << event;
|
||||
|
||||
QGraphicsItem::mousePressEvent(event);
|
||||
//QGraphicsItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void AltitudeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
@@ -311,7 +308,7 @@ void AltitudeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
isDragging = false;
|
||||
}
|
||||
QGraphicsItem::mouseReleaseEvent(event);
|
||||
//QGraphicsItem::mouseReleaseEvent(event);
|
||||
|
||||
}
|
||||
void AltitudeItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
@@ -852,6 +852,10 @@ void OPMapWidget::ConnectWP(WayPointItem *item)
|
||||
connect(item,SIGNAL(AltitudeChanged(int,double)),
|
||||
this,SLOT(AltitudeChanged(int,double)), Qt::DirectConnection);
|
||||
|
||||
connect(item,SIGNAL(setCurrentPoint(int)),
|
||||
this,SLOT(setCurrentPoint(int)), Qt::DirectConnection);
|
||||
|
||||
|
||||
|
||||
|
||||
//生成后立即选中,并且把信息发给ui界面
|
||||
@@ -1455,7 +1459,13 @@ void OPMapWidget::AltitudeChanged(int seq,double value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OPMapWidget::setCurrentPoint(int value)
|
||||
{
|
||||
if(altitudeitem)
|
||||
{
|
||||
altitudeitem->setCurrentPoint(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -575,7 +575,7 @@ public slots:
|
||||
|
||||
void ElevationChanged(int seq,double value);
|
||||
void AltitudeChanged(int seq,double value);
|
||||
|
||||
void setCurrentPoint(int value);
|
||||
|
||||
|
||||
void receivedPoint(float param1,float param2,float param3,float param4,
|
||||
|
||||
@@ -353,6 +353,8 @@ void WayPointItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
property.current,
|
||||
property.autocontinue,
|
||||
property.mission_type);
|
||||
|
||||
emit setCurrentPoint(this->Number());
|
||||
}
|
||||
else//这时候是在飞行界面
|
||||
{
|
||||
|
||||
@@ -382,7 +382,7 @@ signals:
|
||||
|
||||
void ElevationChanged(int seq,double value);
|
||||
void AltitudeChanged(int seq,double value);
|
||||
|
||||
void setCurrentPoint(int value);
|
||||
friend class propertyui;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user