18 #include <QJsonDocument> 98 QByteArray array (json.toStdString().c_str());
99 QJsonDocument doc = QJsonDocument::fromJson(array);
100 QJsonObject jsonObject = doc.object();
132 QJsonDocument doc(*obj);
133 QByteArray bytes = doc.toJson();
135 return QString(bytes);
140 QJsonObject* obj =
new QJsonObject();
151 obj->insert(
"sequence", QJsonValue(
sequence));
154 obj->insert(
"direction", QJsonValue(
direction));
166 obj->insert(
"index", QJsonValue(
index));
265 bool isObjectUpdated =
false;
268 if(
hw_type !=
nullptr && *
hw_type != QString(
"")){ isObjectUpdated =
true;
break;}
269 if(
serial !=
nullptr && *
serial != QString(
"")){ isObjectUpdated =
true;
break;}
277 return isObjectUpdated;
void setDeviceStreamIndex(qint32 device_stream_index)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
qint32 getDeviceNbStreams()
virtual void fromJsonObject(QJsonObject &json) override
void setDeviceSetIndex(qint32 device_set_index)
bool m_device_nb_streams_isSet
virtual bool isSet() override
void setDirection(qint32 direction)
bool m_device_stream_index_isSet
QString * getDisplayedName()
void setDisplayedName(QString *displayed_name)
bool m_device_set_index_isSet
qint32 getDeviceStreamIndex()
void setHwType(QString *hw_type)
void setIndex(qint32 index)
void setDeviceNbStreams(qint32 device_nb_streams)
virtual SWGDeviceListItem * fromJson(QString &jsonString) override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
virtual QString asJson() override
qint32 device_stream_index
bool m_displayed_name_isSet
qint32 getDeviceSetIndex()
void setSequence(qint32 sequence)
void setSerial(QString *serial)
virtual QJsonObject * asJsonObject() override
virtual ~SWGDeviceListItem()