diff --git a/libraries/task/src/task/Config.h b/libraries/task/src/task/Config.h index 36dfb35f25..ceb7e6c245 100644 --- a/libraries/task/src/task/Config.h +++ b/libraries/task/src/task/Config.h @@ -104,8 +104,17 @@ public: virtual void setPresetList(const QJsonObject& object); + /**jsdoc + * @function Render.toJSON + * @returns {string} + */ // This must be named toJSON to integrate with the global scripting JSON object Q_INVOKABLE QString toJSON() { return QJsonDocument(toJsonValue(*this).toObject()).toJson(QJsonDocument::Compact); } + + /**jsdoc + * @function Render.load + * @param {object} map + */ Q_INVOKABLE void load(const QVariantMap& map) { qObjectFromJsonValue(QJsonObject::fromVariantMap(map), *this); emit loaded(); } // Running Time measurement @@ -114,11 +123,31 @@ public: double getCPURunTime() const { return _msCPURunTime; } public slots: + + /**jsdoc + * @function Render.load + * @param {object} map + */ void load(const QJsonObject& val) { qObjectFromJsonValue(val, *this); emit loaded(); } signals: + + /**jsdoc + * @function Render.loaded + * @returns {Signal} + */ void loaded(); + + /**jsdoc + * @function Render.newStats + * @returns {Signal} + */ void newStats(); + + /**jsdoc + * @function Render.dirtyEnabled + * @returns {Signal} + */ void dirtyEnabled(); }; @@ -127,6 +156,16 @@ public: using Config = JobConfig; }; + +/**jsdoc + * @namespace Render + * + * @hifi-interface + * @hifi-client-entity + * + * @property {number} cpuRunTime - Read-only. + * @property {boolean} enabled + */ class TaskConfig : public JobConfig { Q_OBJECT public: @@ -137,8 +176,11 @@ public: TaskConfig() = default ; TaskConfig(bool enabled) : JobConfig(enabled) {} - - + /**jsdoc + * @function Render.getConfig + * @param {string} name + * @returns {object} + */ // Get a sub job config through task.getConfig(path) // where path can be: // - search for the first job named job_name traversing the the sub graph of task and jobs (from this task as root) @@ -176,6 +218,10 @@ public: JobConcept* _task; public slots: + + /**jsdoc + * @function Render.refresh + */ void refresh(); }; diff --git a/tools/jsdoc/plugins/hifi.js b/tools/jsdoc/plugins/hifi.js index 91f6476772..d063d43990 100644 --- a/tools/jsdoc/plugins/hifi.js +++ b/tools/jsdoc/plugins/hifi.js @@ -57,6 +57,7 @@ exports.handlers = { '../../libraries/script-engine/src', '../../libraries/shared/src', '../../libraries/shared/src/shared', + '../../libraries/task/src/task', '../../libraries/trackers/src/trackers', '../../libraries/ui/src', '../../libraries/ui/src/ui',