mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 07:51:01 +02:00
Render API JSDoc stubs
This commit is contained in:
parent
176dbb5557
commit
7cef329939
2 changed files with 49 additions and 2 deletions
|
@ -104,8 +104,17 @@ public:
|
||||||
|
|
||||||
virtual void setPresetList(const QJsonObject& object);
|
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
|
// 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); }
|
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(); }
|
Q_INVOKABLE void load(const QVariantMap& map) { qObjectFromJsonValue(QJsonObject::fromVariantMap(map), *this); emit loaded(); }
|
||||||
|
|
||||||
// Running Time measurement
|
// Running Time measurement
|
||||||
|
@ -114,11 +123,31 @@ public:
|
||||||
double getCPURunTime() const { return _msCPURunTime; }
|
double getCPURunTime() const { return _msCPURunTime; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Render.load
|
||||||
|
* @param {object} map
|
||||||
|
*/
|
||||||
void load(const QJsonObject& val) { qObjectFromJsonValue(val, *this); emit loaded(); }
|
void load(const QJsonObject& val) { qObjectFromJsonValue(val, *this); emit loaded(); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Render.loaded
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
void loaded();
|
void loaded();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Render.newStats
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
void newStats();
|
void newStats();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Render.dirtyEnabled
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
void dirtyEnabled();
|
void dirtyEnabled();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -127,6 +156,16 @@ public:
|
||||||
using Config = JobConfig;
|
using Config = JobConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @namespace Render
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
|
* @property {number} cpuRunTime - <em>Read-only.</em>
|
||||||
|
* @property {boolean} enabled
|
||||||
|
*/
|
||||||
class TaskConfig : public JobConfig {
|
class TaskConfig : public JobConfig {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -137,8 +176,11 @@ public:
|
||||||
TaskConfig() = default ;
|
TaskConfig() = default ;
|
||||||
TaskConfig(bool enabled) : JobConfig(enabled) {}
|
TaskConfig(bool enabled) : JobConfig(enabled) {}
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Render.getConfig
|
||||||
|
* @param {string} name
|
||||||
|
* @returns {object}
|
||||||
|
*/
|
||||||
// Get a sub job config through task.getConfig(path)
|
// Get a sub job config through task.getConfig(path)
|
||||||
// where path can be:
|
// where path can be:
|
||||||
// - <job_name> search for the first job named job_name traversing the the sub graph of task and jobs (from this task as root)
|
// - <job_name> 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;
|
JobConcept* _task;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Render.refresh
|
||||||
|
*/
|
||||||
void refresh();
|
void refresh();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ exports.handlers = {
|
||||||
'../../libraries/script-engine/src',
|
'../../libraries/script-engine/src',
|
||||||
'../../libraries/shared/src',
|
'../../libraries/shared/src',
|
||||||
'../../libraries/shared/src/shared',
|
'../../libraries/shared/src/shared',
|
||||||
|
'../../libraries/task/src/task',
|
||||||
'../../libraries/trackers/src/trackers',
|
'../../libraries/trackers/src/trackers',
|
||||||
'../../libraries/ui/src',
|
'../../libraries/ui/src',
|
||||||
'../../libraries/ui/src/ui',
|
'../../libraries/ui/src/ui',
|
||||||
|
|
Loading…
Reference in a new issue