18 #include <QJsonDocument> 105 title =
new QString(
"");
136 if(
title !=
nullptr) {
153 QByteArray array (json.toStdString().c_str());
154 QJsonDocument doc = QJsonDocument::fromJson(array);
155 QJsonObject jsonObject = doc.object();
209 QJsonDocument doc(*obj);
210 QByteArray bytes = doc.toJson();
212 return QString(bytes);
217 QJsonObject* obj =
new QJsonObject();
237 obj->insert(
"squelch", QJsonValue(
squelch));
240 obj->insert(
"volume", QJsonValue(
volume));
243 obj->insert(
"ctcssOn", QJsonValue(
ctcss_on));
246 obj->insert(
"highPass", QJsonValue(
high_pass));
249 obj->insert(
"audioMute", QJsonValue(
audio_mute));
252 obj->insert(
"ctcssIndex", QJsonValue(
ctcss_index));
255 obj->insert(
"rgbColor", QJsonValue(
rgb_color));
257 if(
title !=
nullptr && *
title != QString(
"")){
485 bool isObjectUpdated =
false;
500 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
508 return isObjectUpdated;
virtual QString asJson() override
virtual void fromJsonObject(QJsonObject &json) override
void setUseReverseApi(qint32 use_reverse_api)
void setAfBandwidth(float af_bandwidth)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
virtual bool isSet() override
virtual ~SWGNFMDemodSettings()
QString * reverse_api_address
qint32 getReverseApiPort()
virtual QJsonObject * asJsonObject() override
qint32 getUseReverseApi()
qint64 getInputFrequencyOffset()
void setAudioMute(qint32 audio_mute)
bool m_input_frequency_offset_isSet
bool m_af_bandwidth_isSet
void setSquelch(float squelch)
void setTitle(QString *title)
bool m_reverse_api_channel_index_isSet
bool m_audio_device_name_isSet
void setHighPass(qint32 high_pass)
bool m_rf_bandwidth_isSet
QString * getReverseApiAddress()
bool m_reverse_api_address_isSet
bool m_use_reverse_api_isSet
qint32 reverse_api_channel_index
bool m_delta_squelch_isSet
bool m_reverse_api_port_isSet
void setInputFrequencyOffset(qint64 input_frequency_offset)
void setVolume(float volume)
void setSquelchGate(qint32 squelch_gate)
virtual SWGNFMDemodSettings * fromJson(QString &jsonString) override
void setDeltaSquelch(qint32 delta_squelch)
void setReverseApiAddress(QString *reverse_api_address)
void setRfBandwidth(float rf_bandwidth)
bool m_fm_deviation_isSet
qint64 input_frequency_offset
qint32 getReverseApiDeviceIndex()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setAudioDeviceName(QString *audio_device_name)
void setRgbColor(qint32 rgb_color)
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
bool m_reverse_api_device_index_isSet
bool m_squelch_gate_isSet
void setCtcssIndex(qint32 ctcss_index)
qint32 getReverseApiChannelIndex()
qint32 reverse_api_device_index
QString * getAudioDeviceName()
void setCtcssOn(qint32 ctcss_on)
void setReverseApiPort(qint32 reverse_api_port)
void setFmDeviation(qint32 fm_deviation)
QString * audio_device_name
void setReverseApiChannelIndex(qint32 reverse_api_channel_index)