18 #include <QJsonDocument> 89 title =
new QString(
"");
119 if(
title !=
nullptr) {
140 QByteArray array (json.toStdString().c_str());
141 QJsonDocument doc = QJsonDocument::fromJson(array);
142 QJsonObject jsonObject = doc.object();
190 QJsonDocument doc(*obj);
191 QByteArray bytes = doc.toJson();
193 return QString(bytes);
198 QJsonObject* obj =
new QJsonObject();
206 obj->insert(
"modFactor", QJsonValue(
mod_factor));
218 obj->insert(
"playLoop", QJsonValue(
play_loop));
221 obj->insert(
"rgbColor", QJsonValue(
rgb_color));
223 if(
title !=
nullptr && *
title != QString(
"")){
427 bool isObjectUpdated =
false;
437 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
447 return isObjectUpdated;
void setModFactor(float mod_factor)
QString * audio_device_name
void setAudioDeviceName(QString *audio_device_name)
qint32 getReverseApiDeviceIndex()
bool m_tone_frequency_isSet
void setToneFrequency(float tone_frequency)
bool m_reverse_api_address_isSet
bool m_volume_factor_isSet
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setVolumeFactor(float volume_factor)
bool m_reverse_api_channel_index_isSet
bool m_mod_af_input_isSet
virtual ~SWGAMModSettings()
void setModAfInput(qint32 mod_af_input)
QString * getReverseApiAddress()
void setReverseApiAddress(QString *reverse_api_address)
virtual void fromJsonObject(QJsonObject &json) override
qint32 reverse_api_device_index
bool m_channel_mute_isSet
bool m_audio_device_name_isSet
SWGCWKeyerSettings * getCwKeyer()
void setUseReverseApi(qint32 use_reverse_api)
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
qint64 getInputFrequencyOffset()
void setChannelMute(qint32 channel_mute)
qint32 getReverseApiPort()
bool m_reverse_api_device_index_isSet
virtual QString asJson() override
void setRgbColor(qint32 rgb_color)
qint32 getReverseApiChannelIndex()
virtual bool isSet() override
qint32 getUseReverseApi()
void setRfBandwidth(float rf_bandwidth)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setInputFrequencyOffset(qint64 input_frequency_offset)
virtual bool isSet() override
void setCwKeyer(SWGCWKeyerSettings *cw_keyer)
void setTitle(QString *title)
void setPlayLoop(qint32 play_loop)
qint64 input_frequency_offset
qint32 reverse_api_channel_index
SWGCWKeyerSettings * cw_keyer
QString * reverse_api_address
void setReverseApiPort(qint32 reverse_api_port)
bool m_input_frequency_offset_isSet
bool m_use_reverse_api_isSet
void setReverseApiChannelIndex(qint32 reverse_api_channel_index)
QString * getAudioDeviceName()
virtual SWGAMModSettings * fromJson(QString &jsonString) override
bool m_rf_bandwidth_isSet
bool m_reverse_api_port_isSet
virtual QJsonObject * asJsonObject() override