18 #include <QJsonDocument> 49 presets =
new QList<SWGPresetItem*>();
70 QByteArray array (json.toStdString().c_str());
71 QJsonDocument doc = QJsonDocument::fromJson(array);
72 QJsonObject jsonObject = doc.object();
92 QJsonDocument doc(*obj);
93 QByteArray bytes = doc.toJson();
95 return QString(bytes);
100 QJsonObject* obj =
new QJsonObject();
105 obj->insert(
"nbPresets", QJsonValue(
nb_presets));
134 QList<SWGPresetItem*>*
147 bool isObjectUpdated =
false;
151 if(
presets->size() > 0){ isObjectUpdated =
true;
break;}
153 return isObjectUpdated;
QList< SWGPresetItem * > * getPresets()
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setGroupName(QString *group_name)
virtual QString asJson() override
virtual QJsonObject * asJsonObject() override
void setNbPresets(qint32 nb_presets)
QList< SWGPresetItem * > * presets
void setPresets(QList< SWGPresetItem *> *presets)
virtual void fromJsonObject(QJsonObject &json) override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void toJsonArray(QList< void *> *value, QJsonObject *output, QString innerName, QString innerType)
virtual SWGPresetGroup * fromJson(QString &jsonString) override
virtual bool isSet() override
virtual ~SWGPresetGroup()