18 #include <QJsonDocument> 113 title =
new QString(
"");
149 if(
title !=
nullptr) {
170 QByteArray array (json.toStdString().c_str());
171 QJsonDocument doc = QJsonDocument::fromJson(array);
172 QJsonObject jsonObject = doc.object();
232 QJsonDocument doc(*obj);
233 QByteArray bytes = doc.toJson();
235 return QString(bytes);
240 QJsonObject* obj =
new QJsonObject();
245 obj->insert(
"bandwidth", QJsonValue(
bandwidth));
248 obj->insert(
"lowCutoff", QJsonValue(
low_cutoff));
251 obj->insert(
"usb", QJsonValue(
usb));
260 obj->insert(
"spanLog2", QJsonValue(
span_log2));
269 obj->insert(
"dsb", QJsonValue(
dsb));
272 obj->insert(
"audioMute", QJsonValue(
audio_mute));
275 obj->insert(
"playLoop", QJsonValue(
play_loop));
278 obj->insert(
"agc", QJsonValue(
agc));
281 obj->insert(
"rgbColor", QJsonValue(
rgb_color));
283 if(
title !=
nullptr && *
title != QString(
"")){
547 bool isObjectUpdated =
false;
563 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
573 return isObjectUpdated;
void setReverseApiAddress(QString *reverse_api_address)
void setSpanLog2(qint32 span_log2)
QString * reverse_api_address
qint32 getReverseApiDeviceIndex()
void setReverseApiChannelIndex(qint32 reverse_api_channel_index)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
virtual ~SWGSSBModSettings()
void setAudioBinaural(qint32 audio_binaural)
qint32 getUseReverseApi()
void setCwKeyer(SWGCWKeyerSettings *cw_keyer)
void setToneFrequency(float tone_frequency)
QString * getAudioDeviceName()
bool m_audio_binaural_isSet
qint64 input_frequency_offset
void setVolumeFactor(float volume_factor)
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
bool m_use_reverse_api_isSet
qint32 audio_flip_channels
virtual QJsonObject * asJsonObject() override
qint32 getReverseApiPort()
qint32 getReverseApiChannelIndex()
bool m_audio_flip_channels_isSet
QString * audio_device_name
SWGCWKeyerSettings * getCwKeyer()
virtual QString asJson() override
bool m_input_frequency_offset_isSet
void setAudioDeviceName(QString *audio_device_name)
void setUseReverseApi(qint32 use_reverse_api)
void setInputFrequencyOffset(qint64 input_frequency_offset)
bool m_mod_af_input_isSet
qint32 reverse_api_device_index
void setLowCutoff(float low_cutoff)
void setTitle(QString *title)
virtual bool isSet() override
bool m_reverse_api_device_index_isSet
qint32 getAudioFlipChannels()
void setRgbColor(qint32 rgb_color)
qint32 getAudioBinaural()
void setPlayLoop(qint32 play_loop)
bool m_reverse_api_port_isSet
void setAudioMute(qint32 audio_mute)
void setReverseApiPort(qint32 reverse_api_port)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setAudioFlipChannels(qint32 audio_flip_channels)
qint64 getInputFrequencyOffset()
virtual void fromJsonObject(QJsonObject &json) override
void setModAfInput(qint32 mod_af_input)
virtual bool isSet() override
SWGCWKeyerSettings * cw_keyer
bool m_reverse_api_address_isSet
bool m_volume_factor_isSet
bool m_audio_device_name_isSet
qint32 reverse_api_channel_index
bool m_tone_frequency_isSet
QString * getReverseApiAddress()
virtual SWGSSBModSettings * fromJson(QString &jsonString) override
bool m_reverse_api_channel_index_isSet
void setBandwidth(float bandwidth)