18 #include <QJsonDocument> 123 title =
new QString(
"");
159 if(
title !=
nullptr) {
173 QByteArray array (json.toStdString().c_str());
174 QJsonDocument doc = QJsonDocument::fromJson(array);
175 QJsonObject jsonObject = doc.object();
237 QJsonDocument doc(*obj);
238 QByteArray bytes = doc.toJson();
240 return QString(bytes);
245 QJsonObject* obj =
new QJsonObject();
265 obj->insert(
"gain", QJsonValue(
gain));
268 obj->insert(
"squelchDB", QJsonValue(
squelch_db));
277 obj->insert(
"agc", QJsonValue(
agc));
286 obj->insert(
"volume", QJsonValue(
volume));
292 obj->insert(
"udpPort", QJsonValue(
udp_port));
295 obj->insert(
"audioPort", QJsonValue(
audio_port));
298 obj->insert(
"rgbColor", QJsonValue(
rgb_color));
300 if(
title !=
nullptr && *
title != QString(
"")){
565 bool isObjectUpdated =
false;
585 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
592 return isObjectUpdated;
bool m_reverse_api_port_isSet
void setSquelchGate(qint32 squelch_gate)
bool m_reverse_api_device_index_isSet
qint32 getReverseApiPort()
bool m_squelch_gate_isSet
void setSampleFormat(qint32 sample_format)
virtual SWGUDPSinkSettings * fromJson(QString &jsonString) override
QString * getReverseApiAddress()
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setTitle(QString *title)
QString * getUdpAddress()
void setChannelMute(qint32 channel_mute)
void setFmDeviation(qint32 fm_deviation)
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
void setReverseApiPort(qint32 reverse_api_port)
bool m_fm_deviation_isSet
void setSquelchDb(qint32 squelch_db)
void setRfBandwidth(float rf_bandwidth)
bool m_audio_stereo_isSet
qint64 getInputFrequencyOffset()
void setInputFrequencyOffset(qint64 input_frequency_offset)
void setReverseApiChannelIndex(qint32 reverse_api_channel_index)
void setUdpAddress(QString *udp_address)
bool m_sample_format_isSet
bool m_channel_mute_isSet
virtual ~SWGUDPSinkSettings()
bool m_reverse_api_channel_index_isSet
qint32 getReverseApiChannelIndex()
qint32 getUseReverseApi()
qint64 input_frequency_offset
qint32 getReverseApiDeviceIndex()
void setUdpPort(qint32 udp_port)
virtual QJsonObject * asJsonObject() override
void setAudioPort(qint32 audio_port)
void setAudioStereo(qint32 audio_stereo)
bool m_use_reverse_api_isSet
void setSquelchEnabled(qint32 squelch_enabled)
virtual QString asJson() override
void setRgbColor(qint32 rgb_color)
bool m_audio_active_isSet
bool m_rf_bandwidth_isSet
void setAudioActive(qint32 audio_active)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
float getOutputSampleRate()
qint32 reverse_api_device_index
void setUseReverseApi(qint32 use_reverse_api)
qint32 reverse_api_channel_index
bool m_squelch_enabled_isSet
qint32 getSquelchEnabled()
QString * reverse_api_address
bool m_reverse_api_address_isSet
void setOutputSampleRate(float output_sample_rate)
virtual void fromJsonObject(QJsonObject &json) override
void setReverseApiAddress(QString *reverse_api_address)
virtual bool isSet() override
void setVolume(qint32 volume)
bool m_input_frequency_offset_isSet
bool m_output_sample_rate_isSet