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();
259 obj->insert(
"lowCutoff", QJsonValue(
low_cutoff));
271 obj->insert(
"gainIn", QJsonValue(
gain_in));
274 obj->insert(
"gainOut", QJsonValue(
gain_out));
277 obj->insert(
"squelch", QJsonValue(
squelch));
292 obj->insert(
"rgbColor", QJsonValue(
rgb_color));
298 obj->insert(
"udpPort", QJsonValue(
udp_port));
300 if(
title !=
nullptr && *
title != QString(
"")){
565 bool isObjectUpdated =
false;
585 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
592 return isObjectUpdated;
void setLowCutoff(float low_cutoff)
virtual SWGUDPSourceSettings * fromJson(QString &jsonString) override
qint32 getReverseApiDeviceIndex()
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
QString * reverse_api_address
void setReverseApiChannelIndex(qint32 reverse_api_channel_index)
void setFmDeviation(qint32 fm_deviation)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
QString * getReverseApiAddress()
virtual QString asJson() override
bool m_stereo_input_isSet
void setReverseApiAddress(QString *reverse_api_address)
qint64 input_frequency_offset
bool m_reverse_api_channel_index_isSet
void setSampleFormat(qint32 sample_format)
void setReverseApiPort(qint32 reverse_api_port)
void setUdpAddress(QString *udp_address)
bool m_reverse_api_device_index_isSet
qint32 reverse_api_device_index
void setStereoInput(qint32 stereo_input)
void setSquelchGate(float squelch_gate)
bool m_auto_rw_balance_isSet
virtual void fromJsonObject(QJsonObject &json) override
void setAmModFactor(float am_mod_factor)
void setInputSampleRate(float input_sample_rate)
bool m_am_mod_factor_isSet
void setSquelch(float squelch)
void setUseReverseApi(qint32 use_reverse_api)
bool m_sample_format_isSet
bool m_reverse_api_port_isSet
bool m_squelch_gate_isSet
bool m_reverse_api_address_isSet
void setSquelchEnabled(qint32 squelch_enabled)
qint64 getInputFrequencyOffset()
virtual bool isSet() override
void setTitle(QString *title)
bool m_rf_bandwidth_isSet
qint32 getAutoRwBalance()
bool m_use_reverse_api_isSet
void setUdpPort(qint32 udp_port)
qint32 reverse_api_channel_index
qint32 getUseReverseApi()
void setGainIn(float gain_in)
bool m_input_sample_rate_isSet
virtual ~SWGUDPSourceSettings()
qint32 getReverseApiPort()
void setRgbColor(qint32 rgb_color)
float getInputSampleRate()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setInputFrequencyOffset(qint64 input_frequency_offset)
void setAutoRwBalance(qint32 auto_rw_balance)
qint32 getSquelchEnabled()
bool m_fm_deviation_isSet
void setRfBandwidth(float rf_bandwidth)
QString * getUdpAddress()
bool m_channel_mute_isSet
qint32 getReverseApiChannelIndex()
bool m_input_frequency_offset_isSet
virtual QJsonObject * asJsonObject() override
void setChannelMute(qint32 channel_mute)
bool m_squelch_enabled_isSet
void setGainOut(float gain_out)