Regenerate swagger files

This commit is contained in:
Jon Beniston 2022-02-04 20:48:14 +00:00
parent 72980c691d
commit cc93815414
21 changed files with 1785 additions and 153 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 KiB

After

Width:  |  Height:  |  Size: 351 KiB

BIN
doc/img/Map_plugin_apt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 KiB

View File

@ -2,49 +2,87 @@ APTDemodSettings:
description: APTDemod
properties:
inputFrequencyOffset:
description: channel center frequency shift from baseband center in Hz
description: Channel center frequency shift from baseband center in Hz
type: integer
format: int64
rfBandwidth:
description: channel RF bandwidth in Hz
description: Channel RF bandwidth in Hz
type: number
format: float
fmDeviation:
description: frequency deviation in Hz
description: Frequency deviation in Hz
type: integer
cropNoise:
description: crop noise from top and bottom of image
description: Crop noise from top and bottom of image
type: integer
denoise:
description: apply denoise filter to image
description: Apply denoise filter to image
type: integer
linearEqualise:
description: apply linear equalisation to image
description: Apply linear equalisation to image
type: integer
histogramEqualise:
description: apply histogram equalisation to image
description: Apply histogram equalisation to image
type: integer
precipitationOverlay:
description: create colour overlay of precipitation
description: Create colour overlay of precipitation
type: integer
flip:
description: flip image for South to North passes
description: Flip image for South to North passes
type: integer
channels:
description: which channel to display (0=both, 1=A, 2=B)
description: Which channel to display (0=both, 1=A, 2=B, 3=Temperature, 4+=palette)
type: integer
decodeEnabled:
description: controls whether the decoder is enabled
description: Controls whether the decoder is enabled
type: integer
autoSave:
description: automatically save images when acquisition is stopped
description: Automatically save images when acquisition is stopped
type: integer
autoSavePath:
description: directory to automatically save images in
description: Directory to automatically save images in
type: string
autoSaveMinScanLines:
desciption: minimum number of scanlines (after cropping) for an image to be automatically saved
description: Minimum number of scanlines (after cropping) for an image to be automatically saved
type: integer
saveCombined:
type: integer
description: Save image with channels A and B
saveSeparate:
description: Save channel A and B as separate image files
type: integer
saveProjection:
description: Save equidistant cylindrical projection of image
type: integer
scanlinesPerImageUpdate:
description: Interval in scanlines between image processing and projection
type: integer
transparencyThreshold:
description: Threshold below which pixels will be fully transparent (0-255)
type: integer
opacityThreshold:
description: Threshold above which pixels will be fully opaque (0-255)
type: integer
palettes:
description: "; separated list of 256x256 image files that can be used as colour maps"
type: string
palette:
description: "Index in to palletes. Used when channels=4"
type: integer
horizontalPixelsPerDegree:
description: "Horizontal pixels per degree longitude in projected image"
type: integer
verticalPixelsPerDegree:
description: "Vertical pixels per degree latitude in projected image"
type: integer
satTimeOffset:
description: "Time offset in seconds, for aligning image on map"
type: number
format: float
satYaw:
description: "Yaw angle offset in degrees, for aligning image on map"
type: number
format: float
rgbColor:
type: integer
title:

View File

@ -28,6 +28,9 @@ MapActions:
find:
description: "The name of the item or the location to centre the map on"
type: string
setDateTime:
description: "Date and time to set for the map (ISO 8601 extended format)"
type: string
MapItem:
description: "An item to draw on the map. Set image to an empty string to remove item from the map."
@ -38,31 +41,33 @@ MapItem:
description: "A name for the item"
type: string
image:
description: "Filename or URL of image to draw on the map"
description: "Filename or URL of image to draw on the 2D map"
type: string
imageRotation:
description: "Angle to rotate the image by"
type: integer
default: 0
imageMinZoom:
description: "Minimim zoom value"
type: integer
default: 11
text:
descrption: "Text to draw on the map when item is selected"
type: string
latitude:
description: "Latitude in decimal degrees, positive to the north"
description: "Latitude in decimal degrees, positive to the North"
type: number
format: float
longitude:
description: "Longitude in decimal degrees, positive to the east"
description: "Longitude in decimal degrees, positive to the East"
type: number
format: float
altitude:
description: "Altitude / height above sea level in metres"
type: number
format: float
fixedPosition:
description: "Indicates whether position of item is constant with time (0 - variable, 1 - fixed)"
type: integer
positionDateTime:
description: "Date and time at this position (ISO 8601 extended format)"
type: string
track:
description: "Track/path the item has taken"
type: array
@ -73,17 +78,111 @@ MapItem:
type: array
items:
$ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapCoordinate"
model:
description: "3D .glb/*.gltf model for displaying on 3D map"
type: string
orientation:
description: "How to orientate the model (0 - Along direction of motion, 1 - Use heading, pitch and roll)"
type: integer
heading:
description: "Heading angle, in decimal degrees clockwise from North"
type: number
format: float
pitch:
description: "Pitch angle, in decimal degrees"
type: number
format: float
roll:
description: "Roll angle, in decimal degrees"
type: number
format: float
orientationDateTime:
description: "Date and time at this orientation (ISO 8601 extended format)"
type: string
label:
description: "Label for the model"
type: string
labelAltitudeOffset:
description: "Veritical offset to position label at"
type: number
format: float
modelAltitudeOffset:
description: "Vertical offset to adjust model by to prevent it from going underground when altitude is 0"
type: number
format: float
altitudeReference:
description: "0 - NONE (Absolule), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND"
type: integer
animations:
description: "Animations to play"
type: array
items:
$ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapAnimation"
type:
description: "(0 - Map Item, 1 - Image Tile)"
type: integer
imageTileWest:
type: number
format: float
imageTileSouth:
type: number
format: float
imageTileEast:
type: number
format: float
imageTileNorth:
type: number
format: float
MapAnimation:
description: "Animation to play in the model on the 3D map"
properties:
name:
description: "Name of animation to play (As in .glb/.glTF file)"
type: string
reverse:
description: "(0 - Forward, 1 - Reverse)"
type: integer
loop:
description: "(0 - Play once, 1 - Play in loop)"
type: integer
startDateTime:
description: "Date and time to start playing this animation (ISO 8601 extended format)"
type: string
startOffset:
description: "Fractional [0..1] offset in to animations timeline to start animation at"
type: number
format: float
default: 0.0
multiplier:
description: "Speed multiplier for animation. >1 plays faster"
type: number
format: float
default: 1.0
duration:
description: "Time in seconds to play animation for. 0 to play whole animation"
type: number
format: float
default: 0.0
stop:
description: "Stop a looped animation from playing"
type: integer
MapCoordinate:
description: "A map coordinate"
properties:
latitude:
description: "Latitude in decimal degrees, positive to the North"
type: number
format: float
longitude:
description: "Longitude in decimal degrees, positive to the East"
type: number
format: float
altitude:
description: "Altitude / height above sea level in metres"
type: number
format: float
dateTime:
description: "Date and time at this coordinate (ISO 8601 extended format)"
type: string

View File

@ -32,6 +32,10 @@ SWGAPTDemodActions_aos::SWGAPTDemodActions_aos() {
m_satellite_name_isSet = false;
north_to_south_pass = 0;
m_north_to_south_pass_isSet = false;
tle = nullptr;
m_tle_isSet = false;
date_time = nullptr;
m_date_time_isSet = false;
}
SWGAPTDemodActions_aos::~SWGAPTDemodActions_aos() {
@ -44,6 +48,10 @@ SWGAPTDemodActions_aos::init() {
m_satellite_name_isSet = false;
north_to_south_pass = 0;
m_north_to_south_pass_isSet = false;
tle = new QString("");
m_tle_isSet = false;
date_time = new QString("");
m_date_time_isSet = false;
}
void
@ -52,6 +60,12 @@ SWGAPTDemodActions_aos::cleanup() {
delete satellite_name;
}
if(tle != nullptr) {
delete tle;
}
if(date_time != nullptr) {
delete date_time;
}
}
SWGAPTDemodActions_aos*
@ -69,6 +83,10 @@ SWGAPTDemodActions_aos::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&north_to_south_pass, pJson["northToSouthPass"], "qint32", "");
::SWGSDRangel::setValue(&tle, pJson["tle"], "QString", "QString");
::SWGSDRangel::setValue(&date_time, pJson["dateTime"], "QString", "QString");
}
QString
@ -91,6 +109,12 @@ SWGAPTDemodActions_aos::asJsonObject() {
if(m_north_to_south_pass_isSet){
obj->insert("northToSouthPass", QJsonValue(north_to_south_pass));
}
if(tle != nullptr && *tle != QString("")){
toJsonValue(QString("tle"), tle, obj, QString("QString"));
}
if(date_time != nullptr && *date_time != QString("")){
toJsonValue(QString("dateTime"), date_time, obj, QString("QString"));
}
return obj;
}
@ -115,6 +139,26 @@ SWGAPTDemodActions_aos::setNorthToSouthPass(qint32 north_to_south_pass) {
this->m_north_to_south_pass_isSet = true;
}
QString*
SWGAPTDemodActions_aos::getTle() {
return tle;
}
void
SWGAPTDemodActions_aos::setTle(QString* tle) {
this->tle = tle;
this->m_tle_isSet = true;
}
QString*
SWGAPTDemodActions_aos::getDateTime() {
return date_time;
}
void
SWGAPTDemodActions_aos::setDateTime(QString* date_time) {
this->date_time = date_time;
this->m_date_time_isSet = true;
}
bool
SWGAPTDemodActions_aos::isSet(){
@ -126,6 +170,12 @@ SWGAPTDemodActions_aos::isSet(){
if(m_north_to_south_pass_isSet){
isObjectUpdated = true; break;
}
if(tle && *tle != QString("")){
isObjectUpdated = true; break;
}
if(date_time && *date_time != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -48,6 +48,12 @@ public:
qint32 getNorthToSouthPass();
void setNorthToSouthPass(qint32 north_to_south_pass);
QString* getTle();
void setTle(QString* tle);
QString* getDateTime();
void setDateTime(QString* date_time);
virtual bool isSet() override;
@ -58,6 +64,12 @@ private:
qint32 north_to_south_pass;
bool m_north_to_south_pass_isSet;
QString* tle;
bool m_tle_isSet;
QString* date_time;
bool m_date_time_isSet;
};
}

View File

@ -56,6 +56,30 @@ SWGAPTDemodSettings::SWGAPTDemodSettings() {
m_auto_save_path_isSet = false;
auto_save_min_scan_lines = 0;
m_auto_save_min_scan_lines_isSet = false;
save_combined = 0;
m_save_combined_isSet = false;
save_separate = 0;
m_save_separate_isSet = false;
save_projection = 0;
m_save_projection_isSet = false;
scanlines_per_image_update = 0;
m_scanlines_per_image_update_isSet = false;
transparency_threshold = 0;
m_transparency_threshold_isSet = false;
opacity_threshold = 0;
m_opacity_threshold_isSet = false;
palettes = nullptr;
m_palettes_isSet = false;
palette = 0;
m_palette_isSet = false;
horizontal_pixels_per_degree = 0;
m_horizontal_pixels_per_degree_isSet = false;
vertical_pixels_per_degree = 0;
m_vertical_pixels_per_degree_isSet = false;
sat_time_offset = 0.0f;
m_sat_time_offset_isSet = false;
sat_yaw = 0.0f;
m_sat_yaw_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = nullptr;
@ -112,6 +136,30 @@ SWGAPTDemodSettings::init() {
m_auto_save_path_isSet = false;
auto_save_min_scan_lines = 0;
m_auto_save_min_scan_lines_isSet = false;
save_combined = 0;
m_save_combined_isSet = false;
save_separate = 0;
m_save_separate_isSet = false;
save_projection = 0;
m_save_projection_isSet = false;
scanlines_per_image_update = 0;
m_scanlines_per_image_update_isSet = false;
transparency_threshold = 0;
m_transparency_threshold_isSet = false;
opacity_threshold = 0;
m_opacity_threshold_isSet = false;
palettes = new QString("");
m_palettes_isSet = false;
palette = 0;
m_palette_isSet = false;
horizontal_pixels_per_degree = 0;
m_horizontal_pixels_per_degree_isSet = false;
vertical_pixels_per_degree = 0;
m_vertical_pixels_per_degree_isSet = false;
sat_time_offset = 0.0f;
m_sat_time_offset_isSet = false;
sat_yaw = 0.0f;
m_sat_yaw_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = new QString("");
@ -153,6 +201,20 @@ SWGAPTDemodSettings::cleanup() {
}
if(palettes != nullptr) {
delete palettes;
}
if(title != nullptr) {
delete title;
}
@ -211,6 +273,30 @@ SWGAPTDemodSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&auto_save_min_scan_lines, pJson["autoSaveMinScanLines"], "qint32", "");
::SWGSDRangel::setValue(&save_combined, pJson["saveCombined"], "qint32", "");
::SWGSDRangel::setValue(&save_separate, pJson["saveSeparate"], "qint32", "");
::SWGSDRangel::setValue(&save_projection, pJson["saveProjection"], "qint32", "");
::SWGSDRangel::setValue(&scanlines_per_image_update, pJson["scanlinesPerImageUpdate"], "qint32", "");
::SWGSDRangel::setValue(&transparency_threshold, pJson["transparencyThreshold"], "qint32", "");
::SWGSDRangel::setValue(&opacity_threshold, pJson["opacityThreshold"], "qint32", "");
::SWGSDRangel::setValue(&palettes, pJson["palettes"], "QString", "QString");
::SWGSDRangel::setValue(&palette, pJson["palette"], "qint32", "");
::SWGSDRangel::setValue(&horizontal_pixels_per_degree, pJson["horizontalPixelsPerDegree"], "qint32", "");
::SWGSDRangel::setValue(&vertical_pixels_per_degree, pJson["verticalPixelsPerDegree"], "qint32", "");
::SWGSDRangel::setValue(&sat_time_offset, pJson["satTimeOffset"], "float", "");
::SWGSDRangel::setValue(&sat_yaw, pJson["satYaw"], "float", "");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
@ -289,6 +375,42 @@ SWGAPTDemodSettings::asJsonObject() {
if(m_auto_save_min_scan_lines_isSet){
obj->insert("autoSaveMinScanLines", QJsonValue(auto_save_min_scan_lines));
}
if(m_save_combined_isSet){
obj->insert("saveCombined", QJsonValue(save_combined));
}
if(m_save_separate_isSet){
obj->insert("saveSeparate", QJsonValue(save_separate));
}
if(m_save_projection_isSet){
obj->insert("saveProjection", QJsonValue(save_projection));
}
if(m_scanlines_per_image_update_isSet){
obj->insert("scanlinesPerImageUpdate", QJsonValue(scanlines_per_image_update));
}
if(m_transparency_threshold_isSet){
obj->insert("transparencyThreshold", QJsonValue(transparency_threshold));
}
if(m_opacity_threshold_isSet){
obj->insert("opacityThreshold", QJsonValue(opacity_threshold));
}
if(palettes != nullptr && *palettes != QString("")){
toJsonValue(QString("palettes"), palettes, obj, QString("QString"));
}
if(m_palette_isSet){
obj->insert("palette", QJsonValue(palette));
}
if(m_horizontal_pixels_per_degree_isSet){
obj->insert("horizontalPixelsPerDegree", QJsonValue(horizontal_pixels_per_degree));
}
if(m_vertical_pixels_per_degree_isSet){
obj->insert("verticalPixelsPerDegree", QJsonValue(vertical_pixels_per_degree));
}
if(m_sat_time_offset_isSet){
obj->insert("satTimeOffset", QJsonValue(sat_time_offset));
}
if(m_sat_yaw_isSet){
obj->insert("satYaw", QJsonValue(sat_yaw));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
@ -463,6 +585,126 @@ SWGAPTDemodSettings::setAutoSaveMinScanLines(qint32 auto_save_min_scan_lines) {
this->m_auto_save_min_scan_lines_isSet = true;
}
qint32
SWGAPTDemodSettings::getSaveCombined() {
return save_combined;
}
void
SWGAPTDemodSettings::setSaveCombined(qint32 save_combined) {
this->save_combined = save_combined;
this->m_save_combined_isSet = true;
}
qint32
SWGAPTDemodSettings::getSaveSeparate() {
return save_separate;
}
void
SWGAPTDemodSettings::setSaveSeparate(qint32 save_separate) {
this->save_separate = save_separate;
this->m_save_separate_isSet = true;
}
qint32
SWGAPTDemodSettings::getSaveProjection() {
return save_projection;
}
void
SWGAPTDemodSettings::setSaveProjection(qint32 save_projection) {
this->save_projection = save_projection;
this->m_save_projection_isSet = true;
}
qint32
SWGAPTDemodSettings::getScanlinesPerImageUpdate() {
return scanlines_per_image_update;
}
void
SWGAPTDemodSettings::setScanlinesPerImageUpdate(qint32 scanlines_per_image_update) {
this->scanlines_per_image_update = scanlines_per_image_update;
this->m_scanlines_per_image_update_isSet = true;
}
qint32
SWGAPTDemodSettings::getTransparencyThreshold() {
return transparency_threshold;
}
void
SWGAPTDemodSettings::setTransparencyThreshold(qint32 transparency_threshold) {
this->transparency_threshold = transparency_threshold;
this->m_transparency_threshold_isSet = true;
}
qint32
SWGAPTDemodSettings::getOpacityThreshold() {
return opacity_threshold;
}
void
SWGAPTDemodSettings::setOpacityThreshold(qint32 opacity_threshold) {
this->opacity_threshold = opacity_threshold;
this->m_opacity_threshold_isSet = true;
}
QString*
SWGAPTDemodSettings::getPalettes() {
return palettes;
}
void
SWGAPTDemodSettings::setPalettes(QString* palettes) {
this->palettes = palettes;
this->m_palettes_isSet = true;
}
qint32
SWGAPTDemodSettings::getPalette() {
return palette;
}
void
SWGAPTDemodSettings::setPalette(qint32 palette) {
this->palette = palette;
this->m_palette_isSet = true;
}
qint32
SWGAPTDemodSettings::getHorizontalPixelsPerDegree() {
return horizontal_pixels_per_degree;
}
void
SWGAPTDemodSettings::setHorizontalPixelsPerDegree(qint32 horizontal_pixels_per_degree) {
this->horizontal_pixels_per_degree = horizontal_pixels_per_degree;
this->m_horizontal_pixels_per_degree_isSet = true;
}
qint32
SWGAPTDemodSettings::getVerticalPixelsPerDegree() {
return vertical_pixels_per_degree;
}
void
SWGAPTDemodSettings::setVerticalPixelsPerDegree(qint32 vertical_pixels_per_degree) {
this->vertical_pixels_per_degree = vertical_pixels_per_degree;
this->m_vertical_pixels_per_degree_isSet = true;
}
float
SWGAPTDemodSettings::getSatTimeOffset() {
return sat_time_offset;
}
void
SWGAPTDemodSettings::setSatTimeOffset(float sat_time_offset) {
this->sat_time_offset = sat_time_offset;
this->m_sat_time_offset_isSet = true;
}
float
SWGAPTDemodSettings::getSatYaw() {
return sat_yaw;
}
void
SWGAPTDemodSettings::setSatYaw(float sat_yaw) {
this->sat_yaw = sat_yaw;
this->m_sat_yaw_isSet = true;
}
qint32
SWGAPTDemodSettings::getRgbColor() {
return rgb_color;
@ -610,6 +852,42 @@ SWGAPTDemodSettings::isSet(){
if(m_auto_save_min_scan_lines_isSet){
isObjectUpdated = true; break;
}
if(m_save_combined_isSet){
isObjectUpdated = true; break;
}
if(m_save_separate_isSet){
isObjectUpdated = true; break;
}
if(m_save_projection_isSet){
isObjectUpdated = true; break;
}
if(m_scanlines_per_image_update_isSet){
isObjectUpdated = true; break;
}
if(m_transparency_threshold_isSet){
isObjectUpdated = true; break;
}
if(m_opacity_threshold_isSet){
isObjectUpdated = true; break;
}
if(palettes && *palettes != QString("")){
isObjectUpdated = true; break;
}
if(m_palette_isSet){
isObjectUpdated = true; break;
}
if(m_horizontal_pixels_per_degree_isSet){
isObjectUpdated = true; break;
}
if(m_vertical_pixels_per_degree_isSet){
isObjectUpdated = true; break;
}
if(m_sat_time_offset_isSet){
isObjectUpdated = true; break;
}
if(m_sat_yaw_isSet){
isObjectUpdated = true; break;
}
if(m_rgb_color_isSet){
isObjectUpdated = true; break;
}

View File

@ -86,6 +86,42 @@ public:
qint32 getAutoSaveMinScanLines();
void setAutoSaveMinScanLines(qint32 auto_save_min_scan_lines);
qint32 getSaveCombined();
void setSaveCombined(qint32 save_combined);
qint32 getSaveSeparate();
void setSaveSeparate(qint32 save_separate);
qint32 getSaveProjection();
void setSaveProjection(qint32 save_projection);
qint32 getScanlinesPerImageUpdate();
void setScanlinesPerImageUpdate(qint32 scanlines_per_image_update);
qint32 getTransparencyThreshold();
void setTransparencyThreshold(qint32 transparency_threshold);
qint32 getOpacityThreshold();
void setOpacityThreshold(qint32 opacity_threshold);
QString* getPalettes();
void setPalettes(QString* palettes);
qint32 getPalette();
void setPalette(qint32 palette);
qint32 getHorizontalPixelsPerDegree();
void setHorizontalPixelsPerDegree(qint32 horizontal_pixels_per_degree);
qint32 getVerticalPixelsPerDegree();
void setVerticalPixelsPerDegree(qint32 vertical_pixels_per_degree);
float getSatTimeOffset();
void setSatTimeOffset(float sat_time_offset);
float getSatYaw();
void setSatYaw(float sat_yaw);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
@ -162,6 +198,42 @@ private:
qint32 auto_save_min_scan_lines;
bool m_auto_save_min_scan_lines_isSet;
qint32 save_combined;
bool m_save_combined_isSet;
qint32 save_separate;
bool m_save_separate_isSet;
qint32 save_projection;
bool m_save_projection_isSet;
qint32 scanlines_per_image_update;
bool m_scanlines_per_image_update_isSet;
qint32 transparency_threshold;
bool m_transparency_threshold_isSet;
qint32 opacity_threshold;
bool m_opacity_threshold_isSet;
QString* palettes;
bool m_palettes_isSet;
qint32 palette;
bool m_palette_isSet;
qint32 horizontal_pixels_per_degree;
bool m_horizontal_pixels_per_degree_isSet;
qint32 vertical_pixels_per_degree;
bool m_vertical_pixels_per_degree_isSet;
float sat_time_offset;
bool m_sat_time_offset_isSet;
float sat_yaw;
bool m_sat_yaw_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;

View File

@ -45,7 +45,7 @@ SWGDeviceSetApi::devicesetChannelActionsPost(qint32 device_set_index, qint32 cha
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -158,7 +158,7 @@ SWGDeviceSetApi::devicesetChannelPost(qint32 device_set_index, SWGChannelSetting
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -329,7 +329,7 @@ SWGDeviceSetApi::devicesetChannelSettingsPatch(qint32 device_set_index, qint32 c
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -388,7 +388,7 @@ SWGDeviceSetApi::devicesetChannelSettingsPut(qint32 device_set_index, qint32 cha
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -499,7 +499,7 @@ SWGDeviceSetApi::devicesetDeviceActionsPost(qint32 device_set_index, SWGDeviceAc
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -556,7 +556,7 @@ SWGDeviceSetApi::devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem&
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -667,7 +667,7 @@ SWGDeviceSetApi::devicesetDeviceRunDelete(qint32 device_set_index, SWGDeviceSett
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -778,7 +778,7 @@ SWGDeviceSetApi::devicesetDeviceRunPost(qint32 device_set_index, SWGDeviceSettin
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -889,7 +889,7 @@ SWGDeviceSetApi::devicesetDeviceSettingsPatch(qint32 device_set_index, SWGDevice
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -946,7 +946,7 @@ SWGDeviceSetApi::devicesetDeviceSettingsPut(qint32 device_set_index, SWGDeviceSe
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1005,7 +1005,7 @@ SWGDeviceSetApi::devicesetDeviceSubsystemRunDelete(qint32 device_set_index, qint
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1120,7 +1120,7 @@ SWGDeviceSetApi::devicesetDeviceSubsystemRunPost(qint32 device_set_index, qint32
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1501,7 +1501,7 @@ SWGDeviceSetApi::devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSp
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1558,7 +1558,7 @@ SWGDeviceSetApi::devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpec
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);

View File

@ -45,7 +45,7 @@ SWGFeatureSetApi::featuresetFEatureSettingsPut(qint32 feature_set_index, qint32
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -104,7 +104,7 @@ SWGFeatureSetApi::featuresetFeatureActionsPost(qint32 feature_set_index, qint32
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -217,7 +217,7 @@ SWGFeatureSetApi::featuresetFeaturePost(qint32 feature_set_index, SWGFeatureSett
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -556,7 +556,7 @@ SWGFeatureSetApi::featuresetFeatureSettingsPatch(qint32 feature_set_index, qint3
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -667,7 +667,7 @@ SWGFeatureSetApi::featuresetPresetPatch(qint32 feature_set_index, SWGFeaturePres
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -724,7 +724,7 @@ SWGFeatureSetApi::featuresetPresetPost(qint32 feature_set_index, SWGFeaturePrese
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -781,7 +781,7 @@ SWGFeatureSetApi::featuresetPresetPut(qint32 feature_set_index, SWGFeaturePreset
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);

View File

@ -16,7 +16,6 @@
#include <QFileInfo>
#include <QBuffer>
#include <QtGlobal>
#include <QRandomGenerator>
namespace SWGSDRangel {
@ -54,7 +53,7 @@ void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename
SWGHttpRequestWorker::SWGHttpRequestWorker(QObject *parent)
: QObject(parent), manager(nullptr)
{
QRandomGenerator::global()->seed(QDateTime::currentDateTime().toTime_t());
qsrand(QDateTime::currentDateTime().toTime_t());
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(on_manager_finished(QNetworkReply*)));
@ -144,12 +143,12 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
isFormData = true;
foreach (QString key, input->vars.keys()) {
if (!first) {
request_content.append('&');
request_content.append("&");
}
first = false;
request_content.append(QUrl::toPercentEncoding(key));
request_content.append('=');
request_content.append("=");
request_content.append(QUrl::toPercentEncoding(input->vars.value(key)));
}
@ -164,30 +163,30 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
boundary = "__-----------------------"
+ QString::number(QDateTime::currentDateTime().toTime_t())
+ QString::number(QRandomGenerator::global()->generate());
+ QString::number(qrand());
QString boundary_delimiter = "--";
QString new_line = "\r\n";
// add variables
foreach (QString key, input->vars.keys()) {
// add boundary
request_content.append(boundary_delimiter.toUtf8());
request_content.append(boundary.toUtf8());
request_content.append(new_line.toUtf8());
request_content.append(boundary_delimiter);
request_content.append(boundary);
request_content.append(new_line);
// add header
request_content.append(QString("Content-Disposition: form-data; ").toUtf8());
request_content.append(http_attribute_encode("name", key).toUtf8());
request_content.append(new_line.toUtf8());
request_content.append(QString("Content-Type: text/plain").toUtf8());
request_content.append(new_line.toUtf8());
request_content.append("Content-Disposition: form-data; ");
request_content.append(http_attribute_encode("name", key));
request_content.append(new_line);
request_content.append("Content-Type: text/plain");
request_content.append(new_line);
// add header to body splitter
request_content.append(new_line.toUtf8());
request_content.append(new_line);
// add variable content
request_content.append((input->vars.value(key)).toUtf8());
request_content.append(new_line.toUtf8());
request_content.append(input->vars.value(key));
request_content.append(new_line);
}
// add files
@ -219,41 +218,40 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
}
// add boundary
request_content.append(boundary_delimiter.toUtf8());
request_content.append(boundary.toUtf8());
request_content.append(new_line.toUtf8());
request_content.append(boundary_delimiter);
request_content.append(boundary);
request_content.append(new_line);
// add header
QString s = QString("Content-Disposition: form-data; %1; %2").arg(
request_content.append(QString("Content-Disposition: form-data; %1; %2").arg(
http_attribute_encode("name", file_info->variable_name),
http_attribute_encode("filename", file_info->request_filename)
);
request_content.append(s.toUtf8());
request_content.append(new_line.toUtf8());
));
request_content.append(new_line);
if (file_info->mime_type != nullptr && !file_info->mime_type.isEmpty()) {
request_content.append(QString("Content-Type: ").toUtf8());
request_content.append((file_info->mime_type).toUtf8());
request_content.append(new_line.toUtf8());
request_content.append("Content-Type: ");
request_content.append(file_info->mime_type);
request_content.append(new_line);
}
request_content.append(QString("Content-Transfer-Encoding: binary").toUtf8());
request_content.append(new_line.toUtf8());
request_content.append("Content-Transfer-Encoding: binary");
request_content.append(new_line);
// add header to body splitter
request_content.append(new_line.toUtf8());
request_content.append(new_line);
// add file content
request_content.append(file.readAll());
request_content.append(new_line.toUtf8());
request_content.append(new_line);
file.close();
}
// add end of body
request_content.append(boundary_delimiter.toUtf8());
request_content.append(boundary.toUtf8());
request_content.append(boundary_delimiter.toUtf8());
request_content.append(boundary_delimiter);
request_content.append(boundary);
request_content.append(boundary_delimiter);
}
if(input->request_body.size() > 0) {

View File

@ -145,7 +145,7 @@ SWGInstanceApi::instanceAMBEDevicesPatch(SWGAMBEDevices& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -200,7 +200,7 @@ SWGInstanceApi::instanceAMBEDevicesPut(SWGAMBEDevices& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -411,7 +411,7 @@ SWGInstanceApi::instanceAudioInputDelete(SWGAudioInputDevice& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -466,7 +466,7 @@ SWGInstanceApi::instanceAudioInputPatch(SWGAudioInputDevice& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -573,7 +573,7 @@ SWGInstanceApi::instanceAudioOutputDelete(SWGAudioOutputDevice& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -628,7 +628,7 @@ SWGInstanceApi::instanceAudioOutputPatch(SWGAudioOutputDevice& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -795,7 +795,7 @@ SWGInstanceApi::instanceConfigPatch(SWGInstanceConfigResponse& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -850,7 +850,7 @@ SWGInstanceApi::instanceConfigPut(SWGInstanceConfigResponse& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1069,7 +1069,7 @@ SWGInstanceApi::instanceFeaturePresetDelete(SWGFeaturePresetIdentifier& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1340,7 +1340,7 @@ SWGInstanceApi::instanceLimeRFEConfigPut(SWGLimeRFESettings& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1455,7 +1455,7 @@ SWGInstanceApi::instanceLimeRFERunPut(SWGLimeRFESettings& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1614,7 +1614,7 @@ SWGInstanceApi::instanceLocationPut(SWGLocationInformation& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1721,7 +1721,7 @@ SWGInstanceApi::instanceLoggingPut(SWGLoggingInfo& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1776,7 +1776,7 @@ SWGInstanceApi::instancePresetDelete(SWGPresetIdentifier& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1831,7 +1831,7 @@ SWGInstanceApi::instancePresetFilePost(SWGPresetExport& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1886,7 +1886,7 @@ SWGInstanceApi::instancePresetFilePut(SWGPresetImport& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -1993,7 +1993,7 @@ SWGInstanceApi::instancePresetPatch(SWGPresetTransfer& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -2048,7 +2048,7 @@ SWGInstanceApi::instancePresetPost(SWGPresetTransfer& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);
@ -2103,7 +2103,7 @@ SWGInstanceApi::instancePresetPut(SWGPresetTransfer& body) {
QString output = body.asJson();
input.request_body.append(output.toUtf8());
input.request_body.append(output);

View File

@ -30,6 +30,8 @@ SWGMapActions::SWGMapActions(QString* json) {
SWGMapActions::SWGMapActions() {
find = nullptr;
m_find_isSet = false;
set_date_time = nullptr;
m_set_date_time_isSet = false;
}
SWGMapActions::~SWGMapActions() {
@ -40,6 +42,8 @@ void
SWGMapActions::init() {
find = new QString("");
m_find_isSet = false;
set_date_time = new QString("");
m_set_date_time_isSet = false;
}
void
@ -47,6 +51,9 @@ SWGMapActions::cleanup() {
if(find != nullptr) {
delete find;
}
if(set_date_time != nullptr) {
delete set_date_time;
}
}
SWGMapActions*
@ -62,6 +69,8 @@ void
SWGMapActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&find, pJson["find"], "QString", "QString");
::SWGSDRangel::setValue(&set_date_time, pJson["setDateTime"], "QString", "QString");
}
QString
@ -81,6 +90,9 @@ SWGMapActions::asJsonObject() {
if(find != nullptr && *find != QString("")){
toJsonValue(QString("find"), find, obj, QString("QString"));
}
if(set_date_time != nullptr && *set_date_time != QString("")){
toJsonValue(QString("setDateTime"), set_date_time, obj, QString("QString"));
}
return obj;
}
@ -95,6 +107,16 @@ SWGMapActions::setFind(QString* find) {
this->m_find_isSet = true;
}
QString*
SWGMapActions::getSetDateTime() {
return set_date_time;
}
void
SWGMapActions::setSetDateTime(QString* set_date_time) {
this->set_date_time = set_date_time;
this->m_set_date_time_isSet = true;
}
bool
SWGMapActions::isSet(){
@ -103,6 +125,9 @@ SWGMapActions::isSet(){
if(find && *find != QString("")){
isObjectUpdated = true; break;
}
if(set_date_time && *set_date_time != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -45,6 +45,9 @@ public:
QString* getFind();
void setFind(QString* find);
QString* getSetDateTime();
void setSetDateTime(QString* set_date_time);
virtual bool isSet() override;
@ -52,6 +55,9 @@ private:
QString* find;
bool m_find_isSet;
QString* set_date_time;
bool m_set_date_time_isSet;
};
}

View File

@ -34,6 +34,8 @@ SWGMapCoordinate::SWGMapCoordinate() {
m_longitude_isSet = false;
altitude = 0.0f;
m_altitude_isSet = false;
date_time = nullptr;
m_date_time_isSet = false;
}
SWGMapCoordinate::~SWGMapCoordinate() {
@ -48,6 +50,8 @@ SWGMapCoordinate::init() {
m_longitude_isSet = false;
altitude = 0.0f;
m_altitude_isSet = false;
date_time = new QString("");
m_date_time_isSet = false;
}
void
@ -55,6 +59,9 @@ SWGMapCoordinate::cleanup() {
if(date_time != nullptr) {
delete date_time;
}
}
SWGMapCoordinate*
@ -74,6 +81,8 @@ SWGMapCoordinate::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&altitude, pJson["altitude"], "float", "");
::SWGSDRangel::setValue(&date_time, pJson["dateTime"], "QString", "QString");
}
QString
@ -99,6 +108,9 @@ SWGMapCoordinate::asJsonObject() {
if(m_altitude_isSet){
obj->insert("altitude", QJsonValue(altitude));
}
if(date_time != nullptr && *date_time != QString("")){
toJsonValue(QString("dateTime"), date_time, obj, QString("QString"));
}
return obj;
}
@ -133,6 +145,16 @@ SWGMapCoordinate::setAltitude(float altitude) {
this->m_altitude_isSet = true;
}
QString*
SWGMapCoordinate::getDateTime() {
return date_time;
}
void
SWGMapCoordinate::setDateTime(QString* date_time) {
this->date_time = date_time;
this->m_date_time_isSet = true;
}
bool
SWGMapCoordinate::isSet(){
@ -147,6 +169,9 @@ SWGMapCoordinate::isSet(){
if(m_altitude_isSet){
isObjectUpdated = true; break;
}
if(date_time && *date_time != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
@ -50,6 +51,9 @@ public:
float getAltitude();
void setAltitude(float altitude);
QString* getDateTime();
void setDateTime(QString* date_time);
virtual bool isSet() override;
@ -63,6 +67,9 @@ private:
float altitude;
bool m_altitude_isSet;
QString* date_time;
bool m_date_time_isSet;
};
}

View File

@ -34,8 +34,6 @@ SWGMapItem::SWGMapItem() {
m_image_isSet = false;
image_rotation = 0;
m_image_rotation_isSet = false;
image_min_zoom = 0;
m_image_min_zoom_isSet = false;
text = nullptr;
m_text_isSet = false;
latitude = 0.0f;
@ -44,10 +42,46 @@ SWGMapItem::SWGMapItem() {
m_longitude_isSet = false;
altitude = 0.0f;
m_altitude_isSet = false;
fixed_position = 0;
m_fixed_position_isSet = false;
position_date_time = nullptr;
m_position_date_time_isSet = false;
track = nullptr;
m_track_isSet = false;
predicted_track = nullptr;
m_predicted_track_isSet = false;
model = nullptr;
m_model_isSet = false;
orientation = 0;
m_orientation_isSet = false;
heading = 0.0f;
m_heading_isSet = false;
pitch = 0.0f;
m_pitch_isSet = false;
roll = 0.0f;
m_roll_isSet = false;
orientation_date_time = nullptr;
m_orientation_date_time_isSet = false;
label = nullptr;
m_label_isSet = false;
label_altitude_offset = 0.0f;
m_label_altitude_offset_isSet = false;
model_altitude_offset = 0.0f;
m_model_altitude_offset_isSet = false;
altitude_reference = 0;
m_altitude_reference_isSet = false;
animations = nullptr;
m_animations_isSet = false;
type = 0;
m_type_isSet = false;
image_tile_west = 0.0f;
m_image_tile_west_isSet = false;
image_tile_south = 0.0f;
m_image_tile_south_isSet = false;
image_tile_east = 0.0f;
m_image_tile_east_isSet = false;
image_tile_north = 0.0f;
m_image_tile_north_isSet = false;
}
SWGMapItem::~SWGMapItem() {
@ -62,8 +96,6 @@ SWGMapItem::init() {
m_image_isSet = false;
image_rotation = 0;
m_image_rotation_isSet = false;
image_min_zoom = 0;
m_image_min_zoom_isSet = false;
text = new QString("");
m_text_isSet = false;
latitude = 0.0f;
@ -72,10 +104,46 @@ SWGMapItem::init() {
m_longitude_isSet = false;
altitude = 0.0f;
m_altitude_isSet = false;
fixed_position = 0;
m_fixed_position_isSet = false;
position_date_time = new QString("");
m_position_date_time_isSet = false;
track = new QList<SWGMapCoordinate*>();
m_track_isSet = false;
predicted_track = new QList<SWGMapCoordinate*>();
m_predicted_track_isSet = false;
model = new QString("");
m_model_isSet = false;
orientation = 0;
m_orientation_isSet = false;
heading = 0.0f;
m_heading_isSet = false;
pitch = 0.0f;
m_pitch_isSet = false;
roll = 0.0f;
m_roll_isSet = false;
orientation_date_time = new QString("");
m_orientation_date_time_isSet = false;
label = new QString("");
m_label_isSet = false;
label_altitude_offset = 0.0f;
m_label_altitude_offset_isSet = false;
model_altitude_offset = 0.0f;
m_model_altitude_offset_isSet = false;
altitude_reference = 0;
m_altitude_reference_isSet = false;
animations = new QList<SWGMapAnimation*>();
m_animations_isSet = false;
type = 0;
m_type_isSet = false;
image_tile_west = 0.0f;
m_image_tile_west_isSet = false;
image_tile_south = 0.0f;
m_image_tile_south_isSet = false;
image_tile_east = 0.0f;
m_image_tile_east_isSet = false;
image_tile_north = 0.0f;
m_image_tile_north_isSet = false;
}
void
@ -87,13 +155,16 @@ SWGMapItem::cleanup() {
delete image;
}
if(text != nullptr) {
delete text;
}
if(position_date_time != nullptr) {
delete position_date_time;
}
if(track != nullptr) {
auto arr = track;
for(auto o: *arr) {
@ -108,6 +179,34 @@ SWGMapItem::cleanup() {
}
delete predicted_track;
}
if(model != nullptr) {
delete model;
}
if(orientation_date_time != nullptr) {
delete orientation_date_time;
}
if(label != nullptr) {
delete label;
}
if(animations != nullptr) {
auto arr = animations;
for(auto o: *arr) {
delete o;
}
delete animations;
}
}
SWGMapItem*
@ -127,8 +226,6 @@ SWGMapItem::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&image_rotation, pJson["imageRotation"], "qint32", "");
::SWGSDRangel::setValue(&image_min_zoom, pJson["imageMinZoom"], "qint32", "");
::SWGSDRangel::setValue(&text, pJson["text"], "QString", "QString");
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", "");
@ -137,10 +234,46 @@ SWGMapItem::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&altitude, pJson["altitude"], "float", "");
::SWGSDRangel::setValue(&fixed_position, pJson["fixedPosition"], "qint32", "");
::SWGSDRangel::setValue(&position_date_time, pJson["positionDateTime"], "QString", "QString");
::SWGSDRangel::setValue(&track, pJson["track"], "QList", "SWGMapCoordinate");
::SWGSDRangel::setValue(&predicted_track, pJson["predictedTrack"], "QList", "SWGMapCoordinate");
::SWGSDRangel::setValue(&model, pJson["model"], "QString", "QString");
::SWGSDRangel::setValue(&orientation, pJson["orientation"], "qint32", "");
::SWGSDRangel::setValue(&heading, pJson["heading"], "float", "");
::SWGSDRangel::setValue(&pitch, pJson["pitch"], "float", "");
::SWGSDRangel::setValue(&roll, pJson["roll"], "float", "");
::SWGSDRangel::setValue(&orientation_date_time, pJson["orientationDateTime"], "QString", "QString");
::SWGSDRangel::setValue(&label, pJson["label"], "QString", "QString");
::SWGSDRangel::setValue(&label_altitude_offset, pJson["labelAltitudeOffset"], "float", "");
::SWGSDRangel::setValue(&model_altitude_offset, pJson["modelAltitudeOffset"], "float", "");
::SWGSDRangel::setValue(&altitude_reference, pJson["altitudeReference"], "qint32", "");
::SWGSDRangel::setValue(&animations, pJson["animations"], "QList", "SWGMapAnimation");
::SWGSDRangel::setValue(&type, pJson["type"], "qint32", "");
::SWGSDRangel::setValue(&image_tile_west, pJson["imageTileWest"], "float", "");
::SWGSDRangel::setValue(&image_tile_south, pJson["imageTileSouth"], "float", "");
::SWGSDRangel::setValue(&image_tile_east, pJson["imageTileEast"], "float", "");
::SWGSDRangel::setValue(&image_tile_north, pJson["imageTileNorth"], "float", "");
}
QString
@ -166,9 +299,6 @@ SWGMapItem::asJsonObject() {
if(m_image_rotation_isSet){
obj->insert("imageRotation", QJsonValue(image_rotation));
}
if(m_image_min_zoom_isSet){
obj->insert("imageMinZoom", QJsonValue(image_min_zoom));
}
if(text != nullptr && *text != QString("")){
toJsonValue(QString("text"), text, obj, QString("QString"));
}
@ -181,12 +311,66 @@ SWGMapItem::asJsonObject() {
if(m_altitude_isSet){
obj->insert("altitude", QJsonValue(altitude));
}
if(m_fixed_position_isSet){
obj->insert("fixedPosition", QJsonValue(fixed_position));
}
if(position_date_time != nullptr && *position_date_time != QString("")){
toJsonValue(QString("positionDateTime"), position_date_time, obj, QString("QString"));
}
if(track && track->size() > 0){
toJsonArray((QList<void*>*)track, obj, "track", "SWGMapCoordinate");
}
if(predicted_track && predicted_track->size() > 0){
toJsonArray((QList<void*>*)predicted_track, obj, "predictedTrack", "SWGMapCoordinate");
}
if(model != nullptr && *model != QString("")){
toJsonValue(QString("model"), model, obj, QString("QString"));
}
if(m_orientation_isSet){
obj->insert("orientation", QJsonValue(orientation));
}
if(m_heading_isSet){
obj->insert("heading", QJsonValue(heading));
}
if(m_pitch_isSet){
obj->insert("pitch", QJsonValue(pitch));
}
if(m_roll_isSet){
obj->insert("roll", QJsonValue(roll));
}
if(orientation_date_time != nullptr && *orientation_date_time != QString("")){
toJsonValue(QString("orientationDateTime"), orientation_date_time, obj, QString("QString"));
}
if(label != nullptr && *label != QString("")){
toJsonValue(QString("label"), label, obj, QString("QString"));
}
if(m_label_altitude_offset_isSet){
obj->insert("labelAltitudeOffset", QJsonValue(label_altitude_offset));
}
if(m_model_altitude_offset_isSet){
obj->insert("modelAltitudeOffset", QJsonValue(model_altitude_offset));
}
if(m_altitude_reference_isSet){
obj->insert("altitudeReference", QJsonValue(altitude_reference));
}
if(animations && animations->size() > 0){
toJsonArray((QList<void*>*)animations, obj, "animations", "SWGMapAnimation");
}
if(m_type_isSet){
obj->insert("type", QJsonValue(type));
}
if(m_image_tile_west_isSet){
obj->insert("imageTileWest", QJsonValue(image_tile_west));
}
if(m_image_tile_south_isSet){
obj->insert("imageTileSouth", QJsonValue(image_tile_south));
}
if(m_image_tile_east_isSet){
obj->insert("imageTileEast", QJsonValue(image_tile_east));
}
if(m_image_tile_north_isSet){
obj->insert("imageTileNorth", QJsonValue(image_tile_north));
}
return obj;
}
@ -221,16 +405,6 @@ SWGMapItem::setImageRotation(qint32 image_rotation) {
this->m_image_rotation_isSet = true;
}
qint32
SWGMapItem::getImageMinZoom() {
return image_min_zoom;
}
void
SWGMapItem::setImageMinZoom(qint32 image_min_zoom) {
this->image_min_zoom = image_min_zoom;
this->m_image_min_zoom_isSet = true;
}
QString*
SWGMapItem::getText() {
return text;
@ -271,6 +445,26 @@ SWGMapItem::setAltitude(float altitude) {
this->m_altitude_isSet = true;
}
qint32
SWGMapItem::getFixedPosition() {
return fixed_position;
}
void
SWGMapItem::setFixedPosition(qint32 fixed_position) {
this->fixed_position = fixed_position;
this->m_fixed_position_isSet = true;
}
QString*
SWGMapItem::getPositionDateTime() {
return position_date_time;
}
void
SWGMapItem::setPositionDateTime(QString* position_date_time) {
this->position_date_time = position_date_time;
this->m_position_date_time_isSet = true;
}
QList<SWGMapCoordinate*>*
SWGMapItem::getTrack() {
return track;
@ -291,6 +485,166 @@ SWGMapItem::setPredictedTrack(QList<SWGMapCoordinate*>* predicted_track) {
this->m_predicted_track_isSet = true;
}
QString*
SWGMapItem::getModel() {
return model;
}
void
SWGMapItem::setModel(QString* model) {
this->model = model;
this->m_model_isSet = true;
}
qint32
SWGMapItem::getOrientation() {
return orientation;
}
void
SWGMapItem::setOrientation(qint32 orientation) {
this->orientation = orientation;
this->m_orientation_isSet = true;
}
float
SWGMapItem::getHeading() {
return heading;
}
void
SWGMapItem::setHeading(float heading) {
this->heading = heading;
this->m_heading_isSet = true;
}
float
SWGMapItem::getPitch() {
return pitch;
}
void
SWGMapItem::setPitch(float pitch) {
this->pitch = pitch;
this->m_pitch_isSet = true;
}
float
SWGMapItem::getRoll() {
return roll;
}
void
SWGMapItem::setRoll(float roll) {
this->roll = roll;
this->m_roll_isSet = true;
}
QString*
SWGMapItem::getOrientationDateTime() {
return orientation_date_time;
}
void
SWGMapItem::setOrientationDateTime(QString* orientation_date_time) {
this->orientation_date_time = orientation_date_time;
this->m_orientation_date_time_isSet = true;
}
QString*
SWGMapItem::getLabel() {
return label;
}
void
SWGMapItem::setLabel(QString* label) {
this->label = label;
this->m_label_isSet = true;
}
float
SWGMapItem::getLabelAltitudeOffset() {
return label_altitude_offset;
}
void
SWGMapItem::setLabelAltitudeOffset(float label_altitude_offset) {
this->label_altitude_offset = label_altitude_offset;
this->m_label_altitude_offset_isSet = true;
}
float
SWGMapItem::getModelAltitudeOffset() {
return model_altitude_offset;
}
void
SWGMapItem::setModelAltitudeOffset(float model_altitude_offset) {
this->model_altitude_offset = model_altitude_offset;
this->m_model_altitude_offset_isSet = true;
}
qint32
SWGMapItem::getAltitudeReference() {
return altitude_reference;
}
void
SWGMapItem::setAltitudeReference(qint32 altitude_reference) {
this->altitude_reference = altitude_reference;
this->m_altitude_reference_isSet = true;
}
QList<SWGMapAnimation*>*
SWGMapItem::getAnimations() {
return animations;
}
void
SWGMapItem::setAnimations(QList<SWGMapAnimation*>* animations) {
this->animations = animations;
this->m_animations_isSet = true;
}
qint32
SWGMapItem::getType() {
return type;
}
void
SWGMapItem::setType(qint32 type) {
this->type = type;
this->m_type_isSet = true;
}
float
SWGMapItem::getImageTileWest() {
return image_tile_west;
}
void
SWGMapItem::setImageTileWest(float image_tile_west) {
this->image_tile_west = image_tile_west;
this->m_image_tile_west_isSet = true;
}
float
SWGMapItem::getImageTileSouth() {
return image_tile_south;
}
void
SWGMapItem::setImageTileSouth(float image_tile_south) {
this->image_tile_south = image_tile_south;
this->m_image_tile_south_isSet = true;
}
float
SWGMapItem::getImageTileEast() {
return image_tile_east;
}
void
SWGMapItem::setImageTileEast(float image_tile_east) {
this->image_tile_east = image_tile_east;
this->m_image_tile_east_isSet = true;
}
float
SWGMapItem::getImageTileNorth() {
return image_tile_north;
}
void
SWGMapItem::setImageTileNorth(float image_tile_north) {
this->image_tile_north = image_tile_north;
this->m_image_tile_north_isSet = true;
}
bool
SWGMapItem::isSet(){
@ -305,9 +659,6 @@ SWGMapItem::isSet(){
if(m_image_rotation_isSet){
isObjectUpdated = true; break;
}
if(m_image_min_zoom_isSet){
isObjectUpdated = true; break;
}
if(text && *text != QString("")){
isObjectUpdated = true; break;
}
@ -320,12 +671,66 @@ SWGMapItem::isSet(){
if(m_altitude_isSet){
isObjectUpdated = true; break;
}
if(m_fixed_position_isSet){
isObjectUpdated = true; break;
}
if(position_date_time && *position_date_time != QString("")){
isObjectUpdated = true; break;
}
if(track && (track->size() > 0)){
isObjectUpdated = true; break;
}
if(predicted_track && (predicted_track->size() > 0)){
isObjectUpdated = true; break;
}
if(model && *model != QString("")){
isObjectUpdated = true; break;
}
if(m_orientation_isSet){
isObjectUpdated = true; break;
}
if(m_heading_isSet){
isObjectUpdated = true; break;
}
if(m_pitch_isSet){
isObjectUpdated = true; break;
}
if(m_roll_isSet){
isObjectUpdated = true; break;
}
if(orientation_date_time && *orientation_date_time != QString("")){
isObjectUpdated = true; break;
}
if(label && *label != QString("")){
isObjectUpdated = true; break;
}
if(m_label_altitude_offset_isSet){
isObjectUpdated = true; break;
}
if(m_model_altitude_offset_isSet){
isObjectUpdated = true; break;
}
if(m_altitude_reference_isSet){
isObjectUpdated = true; break;
}
if(animations && (animations->size() > 0)){
isObjectUpdated = true; break;
}
if(m_type_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_west_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_south_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_east_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_north_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGMapAnimation.h"
#include "SWGMapCoordinate.h"
#include <QList>
#include <QString>
@ -53,9 +54,6 @@ public:
qint32 getImageRotation();
void setImageRotation(qint32 image_rotation);
qint32 getImageMinZoom();
void setImageMinZoom(qint32 image_min_zoom);
QString* getText();
void setText(QString* text);
@ -68,12 +66,66 @@ public:
float getAltitude();
void setAltitude(float altitude);
qint32 getFixedPosition();
void setFixedPosition(qint32 fixed_position);
QString* getPositionDateTime();
void setPositionDateTime(QString* position_date_time);
QList<SWGMapCoordinate*>* getTrack();
void setTrack(QList<SWGMapCoordinate*>* track);
QList<SWGMapCoordinate*>* getPredictedTrack();
void setPredictedTrack(QList<SWGMapCoordinate*>* predicted_track);
QString* getModel();
void setModel(QString* model);
qint32 getOrientation();
void setOrientation(qint32 orientation);
float getHeading();
void setHeading(float heading);
float getPitch();
void setPitch(float pitch);
float getRoll();
void setRoll(float roll);
QString* getOrientationDateTime();
void setOrientationDateTime(QString* orientation_date_time);
QString* getLabel();
void setLabel(QString* label);
float getLabelAltitudeOffset();
void setLabelAltitudeOffset(float label_altitude_offset);
float getModelAltitudeOffset();
void setModelAltitudeOffset(float model_altitude_offset);
qint32 getAltitudeReference();
void setAltitudeReference(qint32 altitude_reference);
QList<SWGMapAnimation*>* getAnimations();
void setAnimations(QList<SWGMapAnimation*>* animations);
qint32 getType();
void setType(qint32 type);
float getImageTileWest();
void setImageTileWest(float image_tile_west);
float getImageTileSouth();
void setImageTileSouth(float image_tile_south);
float getImageTileEast();
void setImageTileEast(float image_tile_east);
float getImageTileNorth();
void setImageTileNorth(float image_tile_north);
virtual bool isSet() override;
@ -87,9 +139,6 @@ private:
qint32 image_rotation;
bool m_image_rotation_isSet;
qint32 image_min_zoom;
bool m_image_min_zoom_isSet;
QString* text;
bool m_text_isSet;
@ -102,12 +151,66 @@ private:
float altitude;
bool m_altitude_isSet;
qint32 fixed_position;
bool m_fixed_position_isSet;
QString* position_date_time;
bool m_position_date_time_isSet;
QList<SWGMapCoordinate*>* track;
bool m_track_isSet;
QList<SWGMapCoordinate*>* predicted_track;
bool m_predicted_track_isSet;
QString* model;
bool m_model_isSet;
qint32 orientation;
bool m_orientation_isSet;
float heading;
bool m_heading_isSet;
float pitch;
bool m_pitch_isSet;
float roll;
bool m_roll_isSet;
QString* orientation_date_time;
bool m_orientation_date_time_isSet;
QString* label;
bool m_label_isSet;
float label_altitude_offset;
bool m_label_altitude_offset_isSet;
float model_altitude_offset;
bool m_model_altitude_offset_isSet;
qint32 altitude_reference;
bool m_altitude_reference_isSet;
QList<SWGMapAnimation*>* animations;
bool m_animations_isSet;
qint32 type;
bool m_type_isSet;
float image_tile_west;
bool m_image_tile_west_isSet;
float image_tile_south;
bool m_image_tile_south_isSet;
float image_tile_east;
bool m_image_tile_east_isSet;
float image_tile_north;
bool m_image_tile_north_isSet;
};
}

View File

@ -34,8 +34,6 @@ SWGMapItem_2::SWGMapItem_2() {
m_image_isSet = false;
image_rotation = 0;
m_image_rotation_isSet = false;
image_min_zoom = 0;
m_image_min_zoom_isSet = false;
text = nullptr;
m_text_isSet = false;
latitude = 0.0f;
@ -44,10 +42,46 @@ SWGMapItem_2::SWGMapItem_2() {
m_longitude_isSet = false;
altitude = 0.0f;
m_altitude_isSet = false;
fixed_position = 0;
m_fixed_position_isSet = false;
position_date_time = nullptr;
m_position_date_time_isSet = false;
track = nullptr;
m_track_isSet = false;
predicted_track = nullptr;
m_predicted_track_isSet = false;
model = nullptr;
m_model_isSet = false;
orientation = 0;
m_orientation_isSet = false;
heading = 0.0f;
m_heading_isSet = false;
pitch = 0.0f;
m_pitch_isSet = false;
roll = 0.0f;
m_roll_isSet = false;
orientation_date_time = nullptr;
m_orientation_date_time_isSet = false;
label = nullptr;
m_label_isSet = false;
label_altitude_offset = 0.0f;
m_label_altitude_offset_isSet = false;
model_altitude_offset = 0.0f;
m_model_altitude_offset_isSet = false;
altitude_reference = 0;
m_altitude_reference_isSet = false;
animations = nullptr;
m_animations_isSet = false;
type = 0;
m_type_isSet = false;
image_tile_west = 0.0f;
m_image_tile_west_isSet = false;
image_tile_south = 0.0f;
m_image_tile_south_isSet = false;
image_tile_east = 0.0f;
m_image_tile_east_isSet = false;
image_tile_north = 0.0f;
m_image_tile_north_isSet = false;
}
SWGMapItem_2::~SWGMapItem_2() {
@ -62,8 +96,6 @@ SWGMapItem_2::init() {
m_image_isSet = false;
image_rotation = 0;
m_image_rotation_isSet = false;
image_min_zoom = 0;
m_image_min_zoom_isSet = false;
text = new QString("");
m_text_isSet = false;
latitude = 0.0f;
@ -72,10 +104,46 @@ SWGMapItem_2::init() {
m_longitude_isSet = false;
altitude = 0.0f;
m_altitude_isSet = false;
fixed_position = 0;
m_fixed_position_isSet = false;
position_date_time = new QString("");
m_position_date_time_isSet = false;
track = new QList<SWGMapCoordinate*>();
m_track_isSet = false;
predicted_track = new QList<SWGMapCoordinate*>();
m_predicted_track_isSet = false;
model = new QString("");
m_model_isSet = false;
orientation = 0;
m_orientation_isSet = false;
heading = 0.0f;
m_heading_isSet = false;
pitch = 0.0f;
m_pitch_isSet = false;
roll = 0.0f;
m_roll_isSet = false;
orientation_date_time = new QString("");
m_orientation_date_time_isSet = false;
label = new QString("");
m_label_isSet = false;
label_altitude_offset = 0.0f;
m_label_altitude_offset_isSet = false;
model_altitude_offset = 0.0f;
m_model_altitude_offset_isSet = false;
altitude_reference = 0;
m_altitude_reference_isSet = false;
animations = new QList<SWGMapAnimation*>();
m_animations_isSet = false;
type = 0;
m_type_isSet = false;
image_tile_west = 0.0f;
m_image_tile_west_isSet = false;
image_tile_south = 0.0f;
m_image_tile_south_isSet = false;
image_tile_east = 0.0f;
m_image_tile_east_isSet = false;
image_tile_north = 0.0f;
m_image_tile_north_isSet = false;
}
void
@ -87,13 +155,16 @@ SWGMapItem_2::cleanup() {
delete image;
}
if(text != nullptr) {
delete text;
}
if(position_date_time != nullptr) {
delete position_date_time;
}
if(track != nullptr) {
auto arr = track;
for(auto o: *arr) {
@ -108,6 +179,34 @@ SWGMapItem_2::cleanup() {
}
delete predicted_track;
}
if(model != nullptr) {
delete model;
}
if(orientation_date_time != nullptr) {
delete orientation_date_time;
}
if(label != nullptr) {
delete label;
}
if(animations != nullptr) {
auto arr = animations;
for(auto o: *arr) {
delete o;
}
delete animations;
}
}
SWGMapItem_2*
@ -127,8 +226,6 @@ SWGMapItem_2::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&image_rotation, pJson["imageRotation"], "qint32", "");
::SWGSDRangel::setValue(&image_min_zoom, pJson["imageMinZoom"], "qint32", "");
::SWGSDRangel::setValue(&text, pJson["text"], "QString", "QString");
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", "");
@ -137,10 +234,46 @@ SWGMapItem_2::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&altitude, pJson["altitude"], "float", "");
::SWGSDRangel::setValue(&fixed_position, pJson["fixedPosition"], "qint32", "");
::SWGSDRangel::setValue(&position_date_time, pJson["positionDateTime"], "QString", "QString");
::SWGSDRangel::setValue(&track, pJson["track"], "QList", "SWGMapCoordinate");
::SWGSDRangel::setValue(&predicted_track, pJson["predictedTrack"], "QList", "SWGMapCoordinate");
::SWGSDRangel::setValue(&model, pJson["model"], "QString", "QString");
::SWGSDRangel::setValue(&orientation, pJson["orientation"], "qint32", "");
::SWGSDRangel::setValue(&heading, pJson["heading"], "float", "");
::SWGSDRangel::setValue(&pitch, pJson["pitch"], "float", "");
::SWGSDRangel::setValue(&roll, pJson["roll"], "float", "");
::SWGSDRangel::setValue(&orientation_date_time, pJson["orientationDateTime"], "QString", "QString");
::SWGSDRangel::setValue(&label, pJson["label"], "QString", "QString");
::SWGSDRangel::setValue(&label_altitude_offset, pJson["labelAltitudeOffset"], "float", "");
::SWGSDRangel::setValue(&model_altitude_offset, pJson["modelAltitudeOffset"], "float", "");
::SWGSDRangel::setValue(&altitude_reference, pJson["altitudeReference"], "qint32", "");
::SWGSDRangel::setValue(&animations, pJson["animations"], "QList", "SWGMapAnimation");
::SWGSDRangel::setValue(&type, pJson["type"], "qint32", "");
::SWGSDRangel::setValue(&image_tile_west, pJson["imageTileWest"], "float", "");
::SWGSDRangel::setValue(&image_tile_south, pJson["imageTileSouth"], "float", "");
::SWGSDRangel::setValue(&image_tile_east, pJson["imageTileEast"], "float", "");
::SWGSDRangel::setValue(&image_tile_north, pJson["imageTileNorth"], "float", "");
}
QString
@ -166,9 +299,6 @@ SWGMapItem_2::asJsonObject() {
if(m_image_rotation_isSet){
obj->insert("imageRotation", QJsonValue(image_rotation));
}
if(m_image_min_zoom_isSet){
obj->insert("imageMinZoom", QJsonValue(image_min_zoom));
}
if(text != nullptr && *text != QString("")){
toJsonValue(QString("text"), text, obj, QString("QString"));
}
@ -181,12 +311,66 @@ SWGMapItem_2::asJsonObject() {
if(m_altitude_isSet){
obj->insert("altitude", QJsonValue(altitude));
}
if(m_fixed_position_isSet){
obj->insert("fixedPosition", QJsonValue(fixed_position));
}
if(position_date_time != nullptr && *position_date_time != QString("")){
toJsonValue(QString("positionDateTime"), position_date_time, obj, QString("QString"));
}
if(track && track->size() > 0){
toJsonArray((QList<void*>*)track, obj, "track", "SWGMapCoordinate");
}
if(predicted_track && predicted_track->size() > 0){
toJsonArray((QList<void*>*)predicted_track, obj, "predictedTrack", "SWGMapCoordinate");
}
if(model != nullptr && *model != QString("")){
toJsonValue(QString("model"), model, obj, QString("QString"));
}
if(m_orientation_isSet){
obj->insert("orientation", QJsonValue(orientation));
}
if(m_heading_isSet){
obj->insert("heading", QJsonValue(heading));
}
if(m_pitch_isSet){
obj->insert("pitch", QJsonValue(pitch));
}
if(m_roll_isSet){
obj->insert("roll", QJsonValue(roll));
}
if(orientation_date_time != nullptr && *orientation_date_time != QString("")){
toJsonValue(QString("orientationDateTime"), orientation_date_time, obj, QString("QString"));
}
if(label != nullptr && *label != QString("")){
toJsonValue(QString("label"), label, obj, QString("QString"));
}
if(m_label_altitude_offset_isSet){
obj->insert("labelAltitudeOffset", QJsonValue(label_altitude_offset));
}
if(m_model_altitude_offset_isSet){
obj->insert("modelAltitudeOffset", QJsonValue(model_altitude_offset));
}
if(m_altitude_reference_isSet){
obj->insert("altitudeReference", QJsonValue(altitude_reference));
}
if(animations && animations->size() > 0){
toJsonArray((QList<void*>*)animations, obj, "animations", "SWGMapAnimation");
}
if(m_type_isSet){
obj->insert("type", QJsonValue(type));
}
if(m_image_tile_west_isSet){
obj->insert("imageTileWest", QJsonValue(image_tile_west));
}
if(m_image_tile_south_isSet){
obj->insert("imageTileSouth", QJsonValue(image_tile_south));
}
if(m_image_tile_east_isSet){
obj->insert("imageTileEast", QJsonValue(image_tile_east));
}
if(m_image_tile_north_isSet){
obj->insert("imageTileNorth", QJsonValue(image_tile_north));
}
return obj;
}
@ -221,16 +405,6 @@ SWGMapItem_2::setImageRotation(qint32 image_rotation) {
this->m_image_rotation_isSet = true;
}
qint32
SWGMapItem_2::getImageMinZoom() {
return image_min_zoom;
}
void
SWGMapItem_2::setImageMinZoom(qint32 image_min_zoom) {
this->image_min_zoom = image_min_zoom;
this->m_image_min_zoom_isSet = true;
}
QString*
SWGMapItem_2::getText() {
return text;
@ -271,6 +445,26 @@ SWGMapItem_2::setAltitude(float altitude) {
this->m_altitude_isSet = true;
}
qint32
SWGMapItem_2::getFixedPosition() {
return fixed_position;
}
void
SWGMapItem_2::setFixedPosition(qint32 fixed_position) {
this->fixed_position = fixed_position;
this->m_fixed_position_isSet = true;
}
QString*
SWGMapItem_2::getPositionDateTime() {
return position_date_time;
}
void
SWGMapItem_2::setPositionDateTime(QString* position_date_time) {
this->position_date_time = position_date_time;
this->m_position_date_time_isSet = true;
}
QList<SWGMapCoordinate*>*
SWGMapItem_2::getTrack() {
return track;
@ -291,6 +485,166 @@ SWGMapItem_2::setPredictedTrack(QList<SWGMapCoordinate*>* predicted_track) {
this->m_predicted_track_isSet = true;
}
QString*
SWGMapItem_2::getModel() {
return model;
}
void
SWGMapItem_2::setModel(QString* model) {
this->model = model;
this->m_model_isSet = true;
}
qint32
SWGMapItem_2::getOrientation() {
return orientation;
}
void
SWGMapItem_2::setOrientation(qint32 orientation) {
this->orientation = orientation;
this->m_orientation_isSet = true;
}
float
SWGMapItem_2::getHeading() {
return heading;
}
void
SWGMapItem_2::setHeading(float heading) {
this->heading = heading;
this->m_heading_isSet = true;
}
float
SWGMapItem_2::getPitch() {
return pitch;
}
void
SWGMapItem_2::setPitch(float pitch) {
this->pitch = pitch;
this->m_pitch_isSet = true;
}
float
SWGMapItem_2::getRoll() {
return roll;
}
void
SWGMapItem_2::setRoll(float roll) {
this->roll = roll;
this->m_roll_isSet = true;
}
QString*
SWGMapItem_2::getOrientationDateTime() {
return orientation_date_time;
}
void
SWGMapItem_2::setOrientationDateTime(QString* orientation_date_time) {
this->orientation_date_time = orientation_date_time;
this->m_orientation_date_time_isSet = true;
}
QString*
SWGMapItem_2::getLabel() {
return label;
}
void
SWGMapItem_2::setLabel(QString* label) {
this->label = label;
this->m_label_isSet = true;
}
float
SWGMapItem_2::getLabelAltitudeOffset() {
return label_altitude_offset;
}
void
SWGMapItem_2::setLabelAltitudeOffset(float label_altitude_offset) {
this->label_altitude_offset = label_altitude_offset;
this->m_label_altitude_offset_isSet = true;
}
float
SWGMapItem_2::getModelAltitudeOffset() {
return model_altitude_offset;
}
void
SWGMapItem_2::setModelAltitudeOffset(float model_altitude_offset) {
this->model_altitude_offset = model_altitude_offset;
this->m_model_altitude_offset_isSet = true;
}
qint32
SWGMapItem_2::getAltitudeReference() {
return altitude_reference;
}
void
SWGMapItem_2::setAltitudeReference(qint32 altitude_reference) {
this->altitude_reference = altitude_reference;
this->m_altitude_reference_isSet = true;
}
QList<SWGMapAnimation*>*
SWGMapItem_2::getAnimations() {
return animations;
}
void
SWGMapItem_2::setAnimations(QList<SWGMapAnimation*>* animations) {
this->animations = animations;
this->m_animations_isSet = true;
}
qint32
SWGMapItem_2::getType() {
return type;
}
void
SWGMapItem_2::setType(qint32 type) {
this->type = type;
this->m_type_isSet = true;
}
float
SWGMapItem_2::getImageTileWest() {
return image_tile_west;
}
void
SWGMapItem_2::setImageTileWest(float image_tile_west) {
this->image_tile_west = image_tile_west;
this->m_image_tile_west_isSet = true;
}
float
SWGMapItem_2::getImageTileSouth() {
return image_tile_south;
}
void
SWGMapItem_2::setImageTileSouth(float image_tile_south) {
this->image_tile_south = image_tile_south;
this->m_image_tile_south_isSet = true;
}
float
SWGMapItem_2::getImageTileEast() {
return image_tile_east;
}
void
SWGMapItem_2::setImageTileEast(float image_tile_east) {
this->image_tile_east = image_tile_east;
this->m_image_tile_east_isSet = true;
}
float
SWGMapItem_2::getImageTileNorth() {
return image_tile_north;
}
void
SWGMapItem_2::setImageTileNorth(float image_tile_north) {
this->image_tile_north = image_tile_north;
this->m_image_tile_north_isSet = true;
}
bool
SWGMapItem_2::isSet(){
@ -305,9 +659,6 @@ SWGMapItem_2::isSet(){
if(m_image_rotation_isSet){
isObjectUpdated = true; break;
}
if(m_image_min_zoom_isSet){
isObjectUpdated = true; break;
}
if(text && *text != QString("")){
isObjectUpdated = true; break;
}
@ -320,12 +671,66 @@ SWGMapItem_2::isSet(){
if(m_altitude_isSet){
isObjectUpdated = true; break;
}
if(m_fixed_position_isSet){
isObjectUpdated = true; break;
}
if(position_date_time && *position_date_time != QString("")){
isObjectUpdated = true; break;
}
if(track && (track->size() > 0)){
isObjectUpdated = true; break;
}
if(predicted_track && (predicted_track->size() > 0)){
isObjectUpdated = true; break;
}
if(model && *model != QString("")){
isObjectUpdated = true; break;
}
if(m_orientation_isSet){
isObjectUpdated = true; break;
}
if(m_heading_isSet){
isObjectUpdated = true; break;
}
if(m_pitch_isSet){
isObjectUpdated = true; break;
}
if(m_roll_isSet){
isObjectUpdated = true; break;
}
if(orientation_date_time && *orientation_date_time != QString("")){
isObjectUpdated = true; break;
}
if(label && *label != QString("")){
isObjectUpdated = true; break;
}
if(m_label_altitude_offset_isSet){
isObjectUpdated = true; break;
}
if(m_model_altitude_offset_isSet){
isObjectUpdated = true; break;
}
if(m_altitude_reference_isSet){
isObjectUpdated = true; break;
}
if(animations && (animations->size() > 0)){
isObjectUpdated = true; break;
}
if(m_type_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_west_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_south_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_east_isSet){
isObjectUpdated = true; break;
}
if(m_image_tile_north_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGMapAnimation.h"
#include "SWGMapCoordinate.h"
#include <QList>
#include <QString>
@ -53,9 +54,6 @@ public:
qint32 getImageRotation();
void setImageRotation(qint32 image_rotation);
qint32 getImageMinZoom();
void setImageMinZoom(qint32 image_min_zoom);
QString* getText();
void setText(QString* text);
@ -68,12 +66,66 @@ public:
float getAltitude();
void setAltitude(float altitude);
qint32 getFixedPosition();
void setFixedPosition(qint32 fixed_position);
QString* getPositionDateTime();
void setPositionDateTime(QString* position_date_time);
QList<SWGMapCoordinate*>* getTrack();
void setTrack(QList<SWGMapCoordinate*>* track);
QList<SWGMapCoordinate*>* getPredictedTrack();
void setPredictedTrack(QList<SWGMapCoordinate*>* predicted_track);
QString* getModel();
void setModel(QString* model);
qint32 getOrientation();
void setOrientation(qint32 orientation);
float getHeading();
void setHeading(float heading);
float getPitch();
void setPitch(float pitch);
float getRoll();
void setRoll(float roll);
QString* getOrientationDateTime();
void setOrientationDateTime(QString* orientation_date_time);
QString* getLabel();
void setLabel(QString* label);
float getLabelAltitudeOffset();
void setLabelAltitudeOffset(float label_altitude_offset);
float getModelAltitudeOffset();
void setModelAltitudeOffset(float model_altitude_offset);
qint32 getAltitudeReference();
void setAltitudeReference(qint32 altitude_reference);
QList<SWGMapAnimation*>* getAnimations();
void setAnimations(QList<SWGMapAnimation*>* animations);
qint32 getType();
void setType(qint32 type);
float getImageTileWest();
void setImageTileWest(float image_tile_west);
float getImageTileSouth();
void setImageTileSouth(float image_tile_south);
float getImageTileEast();
void setImageTileEast(float image_tile_east);
float getImageTileNorth();
void setImageTileNorth(float image_tile_north);
virtual bool isSet() override;
@ -87,9 +139,6 @@ private:
qint32 image_rotation;
bool m_image_rotation_isSet;
qint32 image_min_zoom;
bool m_image_min_zoom_isSet;
QString* text;
bool m_text_isSet;
@ -102,12 +151,66 @@ private:
float altitude;
bool m_altitude_isSet;
qint32 fixed_position;
bool m_fixed_position_isSet;
QString* position_date_time;
bool m_position_date_time_isSet;
QList<SWGMapCoordinate*>* track;
bool m_track_isSet;
QList<SWGMapCoordinate*>* predicted_track;
bool m_predicted_track_isSet;
QString* model;
bool m_model_isSet;
qint32 orientation;
bool m_orientation_isSet;
float heading;
bool m_heading_isSet;
float pitch;
bool m_pitch_isSet;
float roll;
bool m_roll_isSet;
QString* orientation_date_time;
bool m_orientation_date_time_isSet;
QString* label;
bool m_label_isSet;
float label_altitude_offset;
bool m_label_altitude_offset_isSet;
float model_altitude_offset;
bool m_model_altitude_offset_isSet;
qint32 altitude_reference;
bool m_altitude_reference_isSet;
QList<SWGMapAnimation*>* animations;
bool m_animations_isSet;
qint32 type;
bool m_type_isSet;
float image_tile_west;
bool m_image_tile_west_isSet;
float image_tile_south;
bool m_image_tile_south_isSet;
float image_tile_east;
bool m_image_tile_east_isSet;
float image_tile_north;
bool m_image_tile_north_isSet;
};
}

View File

@ -171,6 +171,7 @@
#include "SWGLocationInformation.h"
#include "SWGLoggingInfo.h"
#include "SWGMapActions.h"
#include "SWGMapAnimation.h"
#include "SWGMapCoordinate.h"
#include "SWGMapItem.h"
#include "SWGMapItem_2.h"
@ -1100,6 +1101,11 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGMapAnimation").compare(type) == 0) {
SWGMapAnimation *obj = new SWGMapAnimation();
obj->init();
return obj;
}
if(QString("SWGMapCoordinate").compare(type) == 0) {
SWGMapCoordinate *obj = new SWGMapCoordinate();
obj->init();