18 #include <QJsonDocument> 125 title =
new QString(
"");
167 if(
title !=
nullptr) {
188 QByteArray array (json.toStdString().c_str());
189 QJsonDocument doc = QJsonDocument::fromJson(array);
190 QJsonObject jsonObject = doc.object();
258 QJsonDocument doc(*obj);
259 QByteArray bytes = doc.toJson();
261 return QString(bytes);
266 QJsonObject* obj =
new QJsonObject();
277 obj->insert(
"demodGain", QJsonValue(
demod_gain));
280 obj->insert(
"volume", QJsonValue(
volume));
283 obj->insert(
"baudRate", QJsonValue(
baud_rate));
289 obj->insert(
"squelch", QJsonValue(
squelch));
292 obj->insert(
"audioMute", QJsonValue(
audio_mute));
301 obj->insert(
"slot1On", QJsonValue(
slot1_on));
304 obj->insert(
"slot2On", QJsonValue(
slot2_on));
307 obj->insert(
"tdmaStereo", QJsonValue(
tdma_stereo));
310 obj->insert(
"pllLock", QJsonValue(
pll_lock));
313 obj->insert(
"rgbColor", QJsonValue(
rgb_color));
315 if(
title !=
nullptr && *
title != QString(
"")){
331 obj->insert(
"traceDecay", QJsonValue(
trace_decay));
625 bool isObjectUpdated =
false;
643 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
655 return isObjectUpdated;
void setVolume(float volume)
void setSquelch(float squelch)
void setSquelchGate(qint32 squelch_gate)
qint64 input_frequency_offset
void setSlot1On(qint32 slot1_on)
bool m_input_frequency_offset_isSet
virtual bool isSet() override
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
QString * getReverseApiAddress()
bool m_sync_or_constellation_isSet
bool m_reverse_api_address_isSet
bool m_audio_device_name_isSet
void setBaudRate(qint32 baud_rate)
void setTraceStroke(qint32 trace_stroke)
QString * getAudioDeviceName()
void setUseReverseApi(qint32 use_reverse_api)
virtual QString asJson() override
QString * audio_device_name
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
bool m_rf_bandwidth_isSet
void setSyncOrConstellation(qint32 sync_or_constellation)
virtual SWGDSDDemodSettings * fromJson(QString &jsonString) override
void setHighPassFilter(qint32 high_pass_filter)
void setSlot2On(qint32 slot2_on)
qint32 getReverseApiChannelIndex()
qint32 reverse_api_channel_index
bool m_squelch_gate_isSet
bool m_enable_cosine_filtering_isSet
qint32 reverse_api_device_index
qint32 getUseReverseApi()
void setTitle(QString *title)
virtual ~SWGDSDDemodSettings()
void setTdmaStereo(qint32 tdma_stereo)
bool m_trace_stroke_isSet
void setRgbColor(qint32 rgb_color)
void setAudioDeviceName(QString *audio_device_name)
bool m_fm_deviation_isSet
void setReverseApiAddress(QString *reverse_api_address)
qint64 getInputFrequencyOffset()
bool m_reverse_api_channel_index_isSet
void setFmDeviation(float fm_deviation)
void setTraceLengthMutliplier(qint32 trace_length_mutliplier)
qint32 getReverseApiDeviceIndex()
void setTraceDecay(qint32 trace_decay)
void setRfBandwidth(float rf_bandwidth)
bool m_use_reverse_api_isSet
bool m_high_pass_filter_isSet
qint32 getSyncOrConstellation()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
bool m_reverse_api_port_isSet
qint32 getHighPassFilter()
qint32 enable_cosine_filtering
qint32 getReverseApiPort()
bool m_reverse_api_device_index_isSet
void setDemodGain(float demod_gain)
void setReverseApiChannelIndex(qint32 reverse_api_channel_index)
void setAudioMute(qint32 audio_mute)
qint32 getEnableCosineFiltering()
bool m_trace_length_mutliplier_isSet
QString * reverse_api_address
qint32 getTraceLengthMutliplier()
qint32 sync_or_constellation
virtual void fromJsonObject(QJsonObject &json) override
void setEnableCosineFiltering(qint32 enable_cosine_filtering)
void setReverseApiPort(qint32 reverse_api_port)
void setPllLock(qint32 pll_lock)
void setInputFrequencyOffset(qint64 input_frequency_offset)
qint32 trace_length_mutliplier
virtual QJsonObject * asJsonObject() override