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();
226 obj->insert(
"gain", QJsonValue(
gain));
232 obj->insert(
"log2Decim", QJsonValue(
log2_decim));
235 obj->insert(
"fcPos", QJsonValue(
fc_pos));
238 obj->insert(
"dcBlock", QJsonValue(
dc_block));
244 obj->insert(
"agc", QJsonValue(
agc));
483 bool isObjectUpdated =
false;
506 return isObjectUpdated;
virtual QString asJson() override
void setDcBlock(qint32 dc_block)
bool m_dev_sample_rate_isSet
qint32 getReverseApiDeviceIndex()
void setLowSampleRate(qint32 low_sample_rate)
bool m_file_record_name_isSet
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
qint32 getDevSampleRate()
void setDevSampleRate(qint32 dev_sample_rate)
void setOffsetTuning(qint32 offset_tuning)
void setTransverterDeltaFrequency(qint64 transverter_delta_frequency)
virtual SWGRtlSdrSettings * fromJson(QString &jsonString) override
QString * getFileRecordName()
void setIqImbalance(qint32 iq_imbalance)
virtual void fromJsonObject(QJsonObject &json) override
qint32 getTransverterMode()
qint32 reverse_api_device_index
void setNoModMode(qint32 no_mod_mode)
QString * getReverseApiAddress()
bool m_iq_imbalance_isSet
bool m_use_reverse_api_isSet
QString * file_record_name
bool m_rf_bandwidth_isSet
QString * reverse_api_address
bool m_reverse_api_device_index_isSet
bool m_lo_ppm_correction_isSet
void setReverseApiAddress(QString *reverse_api_address)
virtual QJsonObject * asJsonObject() override
qint32 getLowSampleRate()
qint32 getReverseApiPort()
qint64 getTransverterDeltaFrequency()
qint64 getCenterFrequency()
void setReverseApiPort(qint32 reverse_api_port)
bool m_low_sample_rate_isSet
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
qint32 getLoPpmCorrection()
void setCenterFrequency(qint64 center_frequency)
qint32 getUseReverseApi()
void setUseReverseApi(qint32 use_reverse_api)
void setFileRecordName(QString *file_record_name)
virtual bool isSet() override
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
void setTransverterMode(qint32 transverter_mode)
bool m_reverse_api_port_isSet
void setGain(qint32 gain)
void setRfBandwidth(qint32 rf_bandwidth)
void setFcPos(qint32 fc_pos)
bool m_center_frequency_isSet
bool m_transverter_delta_frequency_isSet
void setLoPpmCorrection(qint32 lo_ppm_correction)
virtual ~SWGRtlSdrSettings()
void setLog2Decim(qint32 log2_decim)
bool m_transverter_mode_isSet
bool m_offset_tuning_isSet
bool m_reverse_api_address_isSet
qint64 transverter_delta_frequency