|
|
|
|
@ -42,12 +42,16 @@ SWGFreqDisplaySettings::SWGFreqDisplaySettings() {
@@ -42,12 +42,16 @@ SWGFreqDisplaySettings::SWGFreqDisplaySettings() {
|
|
|
|
|
m_frequency_units_isSet = false; |
|
|
|
|
show_units = 0; |
|
|
|
|
m_show_units_isSet = false; |
|
|
|
|
freq_decimal_places = 0; |
|
|
|
|
m_freq_decimal_places_isSet = false; |
|
|
|
|
power_decimal_places = 0; |
|
|
|
|
m_power_decimal_places_isSet = false; |
|
|
|
|
textcolor = 0; |
|
|
|
|
m_textcolor_isSet = false; |
|
|
|
|
drop_shadow_enabled = 0; |
|
|
|
|
m_drop_shadow_enabled_isSet = false; |
|
|
|
|
drop_shadow_color = 0; |
|
|
|
|
m_drop_shadow_color_isSet = false; |
|
|
|
|
title = nullptr; |
|
|
|
|
m_title_isSet = false; |
|
|
|
|
rgb_color = 0; |
|
|
|
|
@ -86,12 +90,16 @@ SWGFreqDisplaySettings::init() {
@@ -86,12 +90,16 @@ SWGFreqDisplaySettings::init() {
|
|
|
|
|
m_frequency_units_isSet = false; |
|
|
|
|
show_units = 0; |
|
|
|
|
m_show_units_isSet = false; |
|
|
|
|
freq_decimal_places = 0; |
|
|
|
|
m_freq_decimal_places_isSet = false; |
|
|
|
|
power_decimal_places = 0; |
|
|
|
|
m_power_decimal_places_isSet = false; |
|
|
|
|
textcolor = 0; |
|
|
|
|
m_textcolor_isSet = false; |
|
|
|
|
drop_shadow_enabled = 0; |
|
|
|
|
m_drop_shadow_enabled_isSet = false; |
|
|
|
|
drop_shadow_color = 0; |
|
|
|
|
m_drop_shadow_color_isSet = false; |
|
|
|
|
title = new QString(""); |
|
|
|
|
m_title_isSet = false; |
|
|
|
|
rgb_color = 0; |
|
|
|
|
@ -126,6 +134,8 @@ SWGFreqDisplaySettings::cleanup() {
@@ -126,6 +134,8 @@ SWGFreqDisplaySettings::cleanup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(title != nullptr) {
|
|
|
|
|
delete title; |
|
|
|
|
} |
|
|
|
|
@ -167,12 +177,16 @@ SWGFreqDisplaySettings::fromJsonObject(QJsonObject &pJson) {
@@ -167,12 +177,16 @@ SWGFreqDisplaySettings::fromJsonObject(QJsonObject &pJson) {
|
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&show_units, pJson["showUnits"], "qint32", ""); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&freq_decimal_places, pJson["freqDecimalPlaces"], "qint32", ""); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&power_decimal_places, pJson["powerDecimalPlaces"], "qint32", ""); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&textcolor, pJson["textcolor"], "qint32", ""); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&drop_shadow_enabled, pJson["dropShadowEnabled"], "qint32", ""); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&drop_shadow_color, pJson["dropShadowColor"], "qint32", ""); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); |
|
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", ""); |
|
|
|
|
@ -226,6 +240,9 @@ SWGFreqDisplaySettings::asJsonObject() {
@@ -226,6 +240,9 @@ SWGFreqDisplaySettings::asJsonObject() {
|
|
|
|
|
if(m_show_units_isSet){ |
|
|
|
|
obj->insert("showUnits", QJsonValue(show_units)); |
|
|
|
|
} |
|
|
|
|
if(m_freq_decimal_places_isSet){ |
|
|
|
|
obj->insert("freqDecimalPlaces", QJsonValue(freq_decimal_places)); |
|
|
|
|
} |
|
|
|
|
if(m_power_decimal_places_isSet){ |
|
|
|
|
obj->insert("powerDecimalPlaces", QJsonValue(power_decimal_places)); |
|
|
|
|
} |
|
|
|
|
@ -235,6 +252,9 @@ SWGFreqDisplaySettings::asJsonObject() {
@@ -235,6 +252,9 @@ SWGFreqDisplaySettings::asJsonObject() {
|
|
|
|
|
if(m_drop_shadow_enabled_isSet){ |
|
|
|
|
obj->insert("dropShadowEnabled", QJsonValue(drop_shadow_enabled)); |
|
|
|
|
} |
|
|
|
|
if(m_drop_shadow_color_isSet){ |
|
|
|
|
obj->insert("dropShadowColor", QJsonValue(drop_shadow_color)); |
|
|
|
|
} |
|
|
|
|
if(title != nullptr && *title != QString("")){ |
|
|
|
|
toJsonValue(QString("title"), title, obj, QString("QString")); |
|
|
|
|
} |
|
|
|
|
@ -333,6 +353,16 @@ SWGFreqDisplaySettings::setShowUnits(qint32 show_units) {
@@ -333,6 +353,16 @@ SWGFreqDisplaySettings::setShowUnits(qint32 show_units) {
|
|
|
|
|
this->m_show_units_isSet = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
qint32 |
|
|
|
|
SWGFreqDisplaySettings::getFreqDecimalPlaces() { |
|
|
|
|
return freq_decimal_places; |
|
|
|
|
} |
|
|
|
|
void |
|
|
|
|
SWGFreqDisplaySettings::setFreqDecimalPlaces(qint32 freq_decimal_places) { |
|
|
|
|
this->freq_decimal_places = freq_decimal_places; |
|
|
|
|
this->m_freq_decimal_places_isSet = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
qint32 |
|
|
|
|
SWGFreqDisplaySettings::getPowerDecimalPlaces() { |
|
|
|
|
return power_decimal_places; |
|
|
|
|
@ -363,6 +393,16 @@ SWGFreqDisplaySettings::setDropShadowEnabled(qint32 drop_shadow_enabled) {
@@ -363,6 +393,16 @@ SWGFreqDisplaySettings::setDropShadowEnabled(qint32 drop_shadow_enabled) {
|
|
|
|
|
this->m_drop_shadow_enabled_isSet = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
qint32 |
|
|
|
|
SWGFreqDisplaySettings::getDropShadowColor() { |
|
|
|
|
return drop_shadow_color; |
|
|
|
|
} |
|
|
|
|
void |
|
|
|
|
SWGFreqDisplaySettings::setDropShadowColor(qint32 drop_shadow_color) { |
|
|
|
|
this->drop_shadow_color = drop_shadow_color; |
|
|
|
|
this->m_drop_shadow_color_isSet = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QString* |
|
|
|
|
SWGFreqDisplaySettings::getTitle() { |
|
|
|
|
return title; |
|
|
|
|
@ -469,6 +509,9 @@ SWGFreqDisplaySettings::isSet(){
@@ -469,6 +509,9 @@ SWGFreqDisplaySettings::isSet(){
|
|
|
|
|
if(m_show_units_isSet){ |
|
|
|
|
isObjectUpdated = true; break; |
|
|
|
|
} |
|
|
|
|
if(m_freq_decimal_places_isSet){ |
|
|
|
|
isObjectUpdated = true; break; |
|
|
|
|
} |
|
|
|
|
if(m_power_decimal_places_isSet){ |
|
|
|
|
isObjectUpdated = true; break; |
|
|
|
|
} |
|
|
|
|
@ -478,6 +521,9 @@ SWGFreqDisplaySettings::isSet(){
@@ -478,6 +521,9 @@ SWGFreqDisplaySettings::isSet(){
|
|
|
|
|
if(m_drop_shadow_enabled_isSet){ |
|
|
|
|
isObjectUpdated = true; break; |
|
|
|
|
} |
|
|
|
|
if(m_drop_shadow_color_isSet){ |
|
|
|
|
isObjectUpdated = true; break; |
|
|
|
|
} |
|
|
|
|
if(title && *title != QString("")){ |
|
|
|
|
isObjectUpdated = true; break; |
|
|
|
|
} |
|
|
|
|
|