平面路径操作消息
This commit is contained in:
parent
4e4b2ff9b4
commit
438820944a
|
@ -322,7 +322,7 @@ void DeduceFramework::execute(std::shared_ptr<Immediate> map,
|
|||
out << result;
|
||||
}
|
||||
|
||||
#include "VisibleBox.h"
|
||||
#include "VisibleCube.h"
|
||||
ComponentFactory::ComponentFactory()
|
||||
{
|
||||
auto ins = std::make_shared<VisibleCubePlugin>();
|
||||
|
|
|
@ -1 +1,68 @@
|
|||
#include "route_access.h"
|
||||
|
||||
PlainRouteReset::PlainRouteReset()
|
||||
:AbstractMessage(NAME(PlainRouteReset)) {
|
||||
}
|
||||
|
||||
void PlainRouteReset::recoveryFrom(const QJsonObject& obj)
|
||||
{
|
||||
AbstractMessage::recoveryFrom(obj);
|
||||
STRING_PEAK(this->_route_name);
|
||||
|
||||
QStringList lonlist, latlist;
|
||||
STRLIST_PEAK(lonlist);
|
||||
STRLIST_PEAK(latlist);
|
||||
for (auto idx = 0; idx < lonlist.size(); ++idx) {
|
||||
auto lon = lonlist.at(idx).toDouble();
|
||||
auto lat = latlist.at(idx).toDouble();
|
||||
this->_lonlat_list << LonLatPos{ lon, lat };
|
||||
}
|
||||
}
|
||||
|
||||
void PlainRouteReset::saveTo(QJsonObject& obj) const
|
||||
{
|
||||
AbstractMessage::saveTo(obj);
|
||||
STRING_SAVE(this->_route_name);
|
||||
|
||||
QStringList lonlist, latlist;
|
||||
for (auto pos : this->_lonlat_list) {
|
||||
lonlist << QString("%1").arg(pos._lon_deg);
|
||||
latlist << QString("%1").arg(pos._lat_deg);
|
||||
}
|
||||
STRLIST_SAVE(lonlist);
|
||||
STRLIST_SAVE(latlist);
|
||||
}
|
||||
|
||||
NewPlainRoute::NewPlainRoute()
|
||||
:AbstractMessage(NAME(NewPlainRoute)) {
|
||||
}
|
||||
|
||||
void NewPlainRoute::recoveryFrom(const QJsonObject& obj)
|
||||
{
|
||||
AbstractMessage::recoveryFrom(obj);
|
||||
STRING_PEAK(_route_name);
|
||||
}
|
||||
|
||||
void NewPlainRoute::saveTo(QJsonObject& obj) const
|
||||
{
|
||||
AbstractMessage::saveTo(obj);
|
||||
STRING_SAVE(_route_name);
|
||||
}
|
||||
|
||||
RemovePlainRoute::RemovePlainRoute()
|
||||
:AbstractMessage(NAME(RemovePlainRoute))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RemovePlainRoute::recoveryFrom(const QJsonObject& obj)
|
||||
{
|
||||
AbstractMessage::recoveryFrom(obj);
|
||||
STRING_PEAK(_route_name);
|
||||
}
|
||||
|
||||
void RemovePlainRoute::saveTo(QJsonObject& obj) const
|
||||
{
|
||||
AbstractMessage::saveTo(obj);
|
||||
STRING_SAVE(_route_name);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,43 @@
|
|||
#pragma once
|
||||
#include "messagebasic.h"
|
||||
#include <standardglobe.h>
|
||||
|
||||
struct NewPlainRoute : public AbstractMessage {
|
||||
QList<QPointF> lonlatList;
|
||||
/// <summary>
|
||||
/// 新建平面路径
|
||||
/// </summary>
|
||||
struct MESSAGEBASIC_EXPORT NewPlainRoute : public AbstractMessage {
|
||||
QString _route_name;
|
||||
|
||||
NewPlainRoute();
|
||||
|
||||
// Serializable
|
||||
void recoveryFrom(const QJsonObject& obj) override;
|
||||
void saveTo(QJsonObject& obj) const override;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 删除平面路径
|
||||
/// </summary>
|
||||
struct MESSAGEBASIC_EXPORT RemovePlainRoute : public AbstractMessage {
|
||||
QString _route_name;
|
||||
|
||||
RemovePlainRoute();
|
||||
|
||||
// Serializable
|
||||
void recoveryFrom(const QJsonObject& obj) override;
|
||||
void saveTo(QJsonObject& obj) const override;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 重置平面路径
|
||||
/// </summary>
|
||||
struct MESSAGEBASIC_EXPORT PlainRouteReset : public AbstractMessage {
|
||||
QList<LonLatPos> _lonlat_list;
|
||||
QString _route_name;
|
||||
|
||||
PlainRouteReset();
|
||||
|
||||
// Serializable
|
||||
void recoveryFrom(const QJsonObject& obj) override;
|
||||
void saveTo(QJsonObject& obj) const override;
|
||||
};
|
Loading…
Reference in New Issue