18 #include <QJsonDocument> 151 QByteArray array (json.toStdString().c_str());
152 QJsonDocument doc = QJsonDocument::fromJson(array);
153 QJsonObject jsonObject = doc.object();
207 QJsonDocument doc(*obj);
208 QByteArray bytes = doc.toJson();
210 return QString(bytes);
215 QJsonObject* obj =
new QJsonObject();
220 obj->insert(
"tunerGain", QJsonValue(
tuner_gain));
238 obj->insert(
"log2Decim", QJsonValue(
log2_decim));
241 obj->insert(
"fcPos", QJsonValue(
fc_pos));
244 obj->insert(
"dcBlock", QJsonValue(
dc_block));
253 obj->insert(
"lnaOn", QJsonValue(
lna_on));
483 bool isObjectUpdated =
false;
506 return isObjectUpdated;
bool m_bandwidth_index_isSet
void setFileRecordName(QString *file_record_name)
bool m_frequency_band_index_isSet
QString * getFileRecordName()
virtual SWGSDRPlaySettings * fromJson(QString &jsonString) override
bool m_center_frequency_isSet
void setReverseApiPort(qint32 reverse_api_port)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setIqCorrection(qint32 iq_correction)
void setDcBlock(qint32 dc_block)
void setTunerGain(qint32 tuner_gain)
virtual ~SWGSDRPlaySettings()
qint32 getReverseApiPort()
bool m_dev_sample_rate_index_isSet
qint32 getDevSampleRateIndex()
void setBasebandGain(qint32 baseband_gain)
bool m_baseband_gain_isSet
void setIfFrequencyIndex(qint32 if_frequency_index)
qint32 getBandwidthIndex()
QString * getReverseApiAddress()
bool m_reverse_api_port_isSet
qint32 if_frequency_index
void setUseReverseApi(qint32 use_reverse_api)
void setTunerGainMode(qint32 tuner_gain_mode)
qint32 dev_sample_rate_index
void setLnaOn(qint32 lna_on)
virtual QJsonObject * asJsonObject() override
virtual bool isSet() override
virtual QString asJson() override
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
void setLog2Decim(qint32 log2_decim)
void setFrequencyBandIndex(qint32 frequency_band_index)
qint32 frequency_band_index
bool m_tuner_gain_mode_isSet
qint32 getUseReverseApi()
qint32 getFrequencyBandIndex()
void setCenterFrequency(qint32 center_frequency)
bool m_l_oppm_tenths_isSet
QString * reverse_api_address
virtual void fromJsonObject(QJsonObject &json) override
void setBandwidthIndex(qint32 bandwidth_index)
qint32 reverse_api_device_index
bool m_if_frequency_index_isSet
void setFcPos(qint32 fc_pos)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
QString * file_record_name
bool m_file_record_name_isSet
bool m_reverse_api_address_isSet
bool m_reverse_api_device_index_isSet
void setLOppmTenths(qint32 l_oppm_tenths)
void setDevSampleRateIndex(qint32 dev_sample_rate_index)
qint32 getIfFrequencyIndex()
qint32 getCenterFrequency()
qint32 getReverseApiDeviceIndex()
bool m_iq_correction_isSet
void setMixerAmpOn(qint32 mixer_amp_on)
bool m_mixer_amp_on_isSet
void setReverseApiAddress(QString *reverse_api_address)
qint32 getTunerGainMode()
bool m_use_reverse_api_isSet