18 #include <QJsonDocument> 55 group =
new QString(
"");
75 if(
group !=
nullptr) {
95 QByteArray array (json.toStdString().c_str());
96 QJsonDocument doc = QJsonDocument::fromJson(array);
97 QJsonObject jsonObject = doc.object();
127 QJsonDocument doc(*obj);
128 QByteArray bytes = doc.toJson();
130 return QString(bytes);
135 QJsonObject* obj =
new QJsonObject();
136 if(
group !=
nullptr && *
group != QString(
"")){
149 obj->insert(
"key", QJsonValue(
key));
158 obj->insert(
"release", QJsonValue(
release));
247 bool isObjectUpdated =
false;
249 if(
group !=
nullptr && *
group != QString(
"")){ isObjectUpdated =
true;
break;}
251 if(
command !=
nullptr && *
command != QString(
"")){ isObjectUpdated =
true;
break;}
258 return isObjectUpdated;
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setArgString(QString *arg_string)
virtual SWGCommand * fromJson(QString &jsonString) override
bool m_key_modifiers_isSet
virtual QJsonObject * asJsonObject() override
virtual QString asJson() override
void setDescription(QString *description)
void setCommand(QString *command)
void setGroup(QString *group)
void setKeyModifiers(qint32 key_modifiers)
bool m_associate_key_isSet
QString * getDescription()
virtual void fromJsonObject(QJsonObject &json) override
virtual bool isSet() override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setRelease(qint32 release)
void setAssociateKey(qint32 associate_key)