18 #include <QJsonDocument> 103 QByteArray array (json.toStdString().c_str());
104 QJsonDocument doc = QJsonDocument::fromJson(array);
105 QJsonObject jsonObject = doc.object();
139 QJsonDocument doc(*obj);
140 QByteArray bytes = doc.toJson();
142 return QString(bytes);
147 QJsonObject* obj =
new QJsonObject();
149 obj->insert(
"gain", QJsonValue(
gain));
152 obj->insert(
"useAGC", QJsonValue(
use_agc));
155 obj->insert(
"dcBlock", QJsonValue(
dc_block));
285 bool isObjectUpdated =
false;
298 return isObjectUpdated;
void setReverseApiPort(qint32 reverse_api_port)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
QString * getReverseApiAddress()
QString * file_record_name
void setCenterFrequency(qint64 center_frequency)
bool m_server_address_isSet
QString * reverse_api_address
virtual QJsonObject * asJsonObject() override
bool m_reverse_api_port_isSet
QString * getFileRecordName()
bool m_file_record_name_isSet
bool m_reverse_api_device_index_isSet
QString * getServerAddress()
void setServerAddress(QString *server_address)
qint32 reverse_api_device_index
virtual bool isSet() override
bool m_reverse_api_address_isSet
void setFileRecordName(QString *file_record_name)
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
void setUseReverseApi(qint32 use_reverse_api)
virtual void fromJsonObject(QJsonObject &json) override
bool m_use_reverse_api_isSet
virtual QString asJson() override
void setReverseApiAddress(QString *reverse_api_address)
qint32 getUseReverseApi()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setGain(qint32 gain)
qint32 getReverseApiDeviceIndex()
bool m_center_frequency_isSet
virtual ~SWGKiwiSDRSettings()
virtual SWGKiwiSDRSettings * fromJson(QString &jsonString) override
void setUseAgc(qint32 use_agc)
qint32 getReverseApiPort()
void setDcBlock(qint32 dc_block)
qint64 getCenterFrequency()