mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-10 13:40:37 -04:00
Update Map API
This commit is contained in:
parent
50035d40c8
commit
8201bfba20
swagger/sdrangel
api/swagger/include
code/qt5/client
@ -4,6 +4,9 @@ MapSettings:
|
||||
displayNames:
|
||||
description: Display object names on the map (1 for yes, 0 for no)
|
||||
type: integer
|
||||
terrain:
|
||||
description: "Terrain used for 3D map (E.g: 'Ellipsoid' or 'Cesium World Terrain')"
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
rgbColor:
|
||||
@ -118,7 +121,7 @@ MapItem:
|
||||
type: number
|
||||
format: float
|
||||
altitudeReference:
|
||||
description: "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND"
|
||||
description: "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND."
|
||||
type: integer
|
||||
animations:
|
||||
description: "Animations to play"
|
||||
@ -156,6 +159,12 @@ MapItem:
|
||||
availableUntil:
|
||||
description: "Date and time until after which this item should no longer appear on 3D map"
|
||||
type: string
|
||||
colorValid:
|
||||
description: "0 - Use default color, 1 - Use specified color"
|
||||
type: integer
|
||||
color:
|
||||
description: "RGBA for polygon and polyline"
|
||||
type: integer
|
||||
|
||||
MapAnimation:
|
||||
description: "Animation to play in the model on the 3D map"
|
||||
|
@ -90,6 +90,10 @@ SWGMapItem::SWGMapItem() {
|
||||
m_extruded_height_isSet = false;
|
||||
available_until = nullptr;
|
||||
m_available_until_isSet = false;
|
||||
color_valid = 0;
|
||||
m_color_valid_isSet = false;
|
||||
color = 0;
|
||||
m_color_isSet = false;
|
||||
}
|
||||
|
||||
SWGMapItem::~SWGMapItem() {
|
||||
@ -160,6 +164,10 @@ SWGMapItem::init() {
|
||||
m_extruded_height_isSet = false;
|
||||
available_until = new QString("");
|
||||
m_available_until_isSet = false;
|
||||
color_valid = 0;
|
||||
m_color_valid_isSet = false;
|
||||
color = 0;
|
||||
m_color_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -235,6 +243,8 @@ SWGMapItem::cleanup() {
|
||||
if(available_until != nullptr) {
|
||||
delete available_until;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGMapItem*
|
||||
@ -310,6 +320,10 @@ SWGMapItem::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&available_until, pJson["availableUntil"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&color_valid, pJson["colorValid"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&color, pJson["color"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
@ -419,6 +433,12 @@ SWGMapItem::asJsonObject() {
|
||||
if(available_until != nullptr && *available_until != QString("")){
|
||||
toJsonValue(QString("availableUntil"), available_until, obj, QString("QString"));
|
||||
}
|
||||
if(m_color_valid_isSet){
|
||||
obj->insert("colorValid", QJsonValue(color_valid));
|
||||
}
|
||||
if(m_color_isSet){
|
||||
obj->insert("color", QJsonValue(color));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
@ -733,6 +753,26 @@ SWGMapItem::setAvailableUntil(QString* available_until) {
|
||||
this->m_available_until_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGMapItem::getColorValid() {
|
||||
return color_valid;
|
||||
}
|
||||
void
|
||||
SWGMapItem::setColorValid(qint32 color_valid) {
|
||||
this->color_valid = color_valid;
|
||||
this->m_color_valid_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGMapItem::getColor() {
|
||||
return color;
|
||||
}
|
||||
void
|
||||
SWGMapItem::setColor(qint32 color) {
|
||||
this->color = color;
|
||||
this->m_color_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGMapItem::isSet(){
|
||||
@ -831,6 +871,12 @@ SWGMapItem::isSet(){
|
||||
if(available_until && *available_until != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_color_valid_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_color_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
|
@ -138,6 +138,12 @@ public:
|
||||
QString* getAvailableUntil();
|
||||
void setAvailableUntil(QString* available_until);
|
||||
|
||||
qint32 getColorValid();
|
||||
void setColorValid(qint32 color_valid);
|
||||
|
||||
qint32 getColor();
|
||||
void setColor(qint32 color);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
@ -235,6 +241,12 @@ private:
|
||||
QString* available_until;
|
||||
bool m_available_until_isSet;
|
||||
|
||||
qint32 color_valid;
|
||||
bool m_color_valid_isSet;
|
||||
|
||||
qint32 color;
|
||||
bool m_color_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -90,6 +90,10 @@ SWGMapItem_2::SWGMapItem_2() {
|
||||
m_extruded_height_isSet = false;
|
||||
available_until = nullptr;
|
||||
m_available_until_isSet = false;
|
||||
color_valid = 0;
|
||||
m_color_valid_isSet = false;
|
||||
color = 0;
|
||||
m_color_isSet = false;
|
||||
}
|
||||
|
||||
SWGMapItem_2::~SWGMapItem_2() {
|
||||
@ -160,6 +164,10 @@ SWGMapItem_2::init() {
|
||||
m_extruded_height_isSet = false;
|
||||
available_until = new QString("");
|
||||
m_available_until_isSet = false;
|
||||
color_valid = 0;
|
||||
m_color_valid_isSet = false;
|
||||
color = 0;
|
||||
m_color_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -235,6 +243,8 @@ SWGMapItem_2::cleanup() {
|
||||
if(available_until != nullptr) {
|
||||
delete available_until;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGMapItem_2*
|
||||
@ -310,6 +320,10 @@ SWGMapItem_2::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&available_until, pJson["availableUntil"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&color_valid, pJson["colorValid"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&color, pJson["color"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
@ -419,6 +433,12 @@ SWGMapItem_2::asJsonObject() {
|
||||
if(available_until != nullptr && *available_until != QString("")){
|
||||
toJsonValue(QString("availableUntil"), available_until, obj, QString("QString"));
|
||||
}
|
||||
if(m_color_valid_isSet){
|
||||
obj->insert("colorValid", QJsonValue(color_valid));
|
||||
}
|
||||
if(m_color_isSet){
|
||||
obj->insert("color", QJsonValue(color));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
@ -733,6 +753,26 @@ SWGMapItem_2::setAvailableUntil(QString* available_until) {
|
||||
this->m_available_until_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGMapItem_2::getColorValid() {
|
||||
return color_valid;
|
||||
}
|
||||
void
|
||||
SWGMapItem_2::setColorValid(qint32 color_valid) {
|
||||
this->color_valid = color_valid;
|
||||
this->m_color_valid_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGMapItem_2::getColor() {
|
||||
return color;
|
||||
}
|
||||
void
|
||||
SWGMapItem_2::setColor(qint32 color) {
|
||||
this->color = color;
|
||||
this->m_color_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGMapItem_2::isSet(){
|
||||
@ -831,6 +871,12 @@ SWGMapItem_2::isSet(){
|
||||
if(available_until && *available_until != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_color_valid_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_color_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
|
@ -138,6 +138,12 @@ public:
|
||||
QString* getAvailableUntil();
|
||||
void setAvailableUntil(QString* available_until);
|
||||
|
||||
qint32 getColorValid();
|
||||
void setColorValid(qint32 color_valid);
|
||||
|
||||
qint32 getColor();
|
||||
void setColor(qint32 color);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
@ -235,6 +241,12 @@ private:
|
||||
QString* available_until;
|
||||
bool m_available_until_isSet;
|
||||
|
||||
qint32 color_valid;
|
||||
bool m_color_valid_isSet;
|
||||
|
||||
qint32 color;
|
||||
bool m_color_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ SWGMapSettings::SWGMapSettings(QString* json) {
|
||||
SWGMapSettings::SWGMapSettings() {
|
||||
display_names = 0;
|
||||
m_display_names_isSet = false;
|
||||
terrain = nullptr;
|
||||
m_terrain_isSet = false;
|
||||
title = nullptr;
|
||||
m_title_isSet = false;
|
||||
rgb_color = 0;
|
||||
@ -56,6 +58,8 @@ void
|
||||
SWGMapSettings::init() {
|
||||
display_names = 0;
|
||||
m_display_names_isSet = false;
|
||||
terrain = new QString("");
|
||||
m_terrain_isSet = false;
|
||||
title = new QString("");
|
||||
m_title_isSet = false;
|
||||
rgb_color = 0;
|
||||
@ -77,6 +81,9 @@ SWGMapSettings::init() {
|
||||
void
|
||||
SWGMapSettings::cleanup() {
|
||||
|
||||
if(terrain != nullptr) {
|
||||
delete terrain;
|
||||
}
|
||||
if(title != nullptr) {
|
||||
delete title;
|
||||
}
|
||||
@ -106,6 +113,8 @@ void
|
||||
SWGMapSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&display_names, pJson["displayNames"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&terrain, pJson["terrain"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
|
||||
@ -141,6 +150,9 @@ SWGMapSettings::asJsonObject() {
|
||||
if(m_display_names_isSet){
|
||||
obj->insert("displayNames", QJsonValue(display_names));
|
||||
}
|
||||
if(terrain != nullptr && *terrain != QString("")){
|
||||
toJsonValue(QString("terrain"), terrain, obj, QString("QString"));
|
||||
}
|
||||
if(title != nullptr && *title != QString("")){
|
||||
toJsonValue(QString("title"), title, obj, QString("QString"));
|
||||
}
|
||||
@ -179,6 +191,16 @@ SWGMapSettings::setDisplayNames(qint32 display_names) {
|
||||
this->m_display_names_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGMapSettings::getTerrain() {
|
||||
return terrain;
|
||||
}
|
||||
void
|
||||
SWGMapSettings::setTerrain(QString* terrain) {
|
||||
this->terrain = terrain;
|
||||
this->m_terrain_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGMapSettings::getTitle() {
|
||||
return title;
|
||||
@ -267,6 +289,9 @@ SWGMapSettings::isSet(){
|
||||
if(m_display_names_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(terrain && *terrain != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(title && *title != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -46,6 +46,9 @@ public:
|
||||
qint32 getDisplayNames();
|
||||
void setDisplayNames(qint32 display_names);
|
||||
|
||||
QString* getTerrain();
|
||||
void setTerrain(QString* terrain);
|
||||
|
||||
QString* getTitle();
|
||||
void setTitle(QString* title);
|
||||
|
||||
@ -77,6 +80,9 @@ private:
|
||||
qint32 display_names;
|
||||
bool m_display_names_isSet;
|
||||
|
||||
QString* terrain;
|
||||
bool m_terrain_isSet;
|
||||
|
||||
QString* title;
|
||||
bool m_title_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user