mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:16:16 +02:00
Add JSON interface to render::Job::Config
This commit is contained in:
parent
8bf6c66327
commit
c334e4ebcb
1 changed files with 11 additions and 1 deletions
|
@ -12,7 +12,12 @@
|
||||||
#ifndef hifi_render_Task_h
|
#ifndef hifi_render_Task_h
|
||||||
#define hifi_render_Task_h
|
#define hifi_render_Task_h
|
||||||
|
|
||||||
#include <qscriptengine.h> // QObject
|
#include <QtCore/qobject.h>
|
||||||
|
|
||||||
|
#include <QtCore/qjsondocument.h>
|
||||||
|
#include <QtCore/qjsonobject.h>
|
||||||
|
#include <QtCore/qjsonvalue.h>
|
||||||
|
#include <shared/JSONHelpers.h>
|
||||||
|
|
||||||
#include "Context.h"
|
#include "Context.h"
|
||||||
|
|
||||||
|
@ -65,6 +70,11 @@ public:
|
||||||
|
|
||||||
bool alwaysEnabled{ true };
|
bool alwaysEnabled{ true };
|
||||||
bool enabled{ true };
|
bool enabled{ true };
|
||||||
|
|
||||||
|
Q_INVOKABLE QString toJSON() { return QJsonDocument(toJsonValue(*this).toObject()).toJson(QJsonDocument::Compact); }
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void load(const QJsonValue& json) { qObjectFromJsonValue(json, *this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class TaskConfig : public JobConfig {
|
class TaskConfig : public JobConfig {
|
||||||
|
|
Loading…
Reference in a new issue