mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Merge pull request #15605 from ctrlaltdavid/M22528
Case 22528: Snapshot JSDoc
This commit is contained in:
commit
38a379cb38
2 changed files with 23 additions and 6 deletions
|
@ -313,8 +313,9 @@ public slots:
|
|||
* Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured,
|
||||
* {@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured,
|
||||
* {@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted}
|
||||
* are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings >
|
||||
* General > Snapshots.
|
||||
* are emitted.
|
||||
* <p>Snapshots are saved to the path specified in Settings > General > Snapshots, which can be accessed via the
|
||||
* {@link Snapshot} API.</p>
|
||||
*
|
||||
* @function Window.takeSnapshot
|
||||
* @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}
|
||||
|
@ -351,13 +352,15 @@ public slots:
|
|||
* var notify = true;
|
||||
* var animated = true;
|
||||
* var aspect = 1920 / 1080;
|
||||
* var filename = "";
|
||||
* var filename = "example-snapshot";
|
||||
* Window.takeSnapshot(notify, animated, aspect, filename);
|
||||
*/
|
||||
void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString());
|
||||
|
||||
/**jsdoc
|
||||
* Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API.
|
||||
* <p>Snapshots are saved to the path specified in Settings > General > Snapshots, which can be accessed via the
|
||||
* {@link Snapshot} API.</p>
|
||||
* @function Window.takeSecondaryCameraSnapshot
|
||||
* @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}
|
||||
* signal.
|
||||
|
@ -372,6 +375,8 @@ public slots:
|
|||
/**jsdoc
|
||||
* Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been
|
||||
* set up.
|
||||
* <p>Snapshots are saved to the path specified in Settings > General > Snapshots, which can be accessed via the
|
||||
* {@link Snapshot} API.</p>
|
||||
* @function Window.takeSecondaryCamera360Snapshot
|
||||
* @param {Vec3} cameraPosition - The position of the camera for the snapshot.
|
||||
* @param {boolean} [cubemapOutputFormat=false] - If <code>true</code> then the snapshot is saved as a cube map image,
|
||||
|
|
|
@ -38,6 +38,10 @@ private:
|
|||
|
||||
|
||||
/**jsdoc
|
||||
* The <code>Snapshot</code> API provides access to the path that snapshots are saved to. This path is that provided in
|
||||
* Settings > General > Snapshots. Snapshots may be taken using <code>Window</code> API functions such as
|
||||
* {@link Window.takeSnapshot}.
|
||||
*
|
||||
* @namespace Snapshot
|
||||
*
|
||||
* @hifi-interface
|
||||
|
@ -64,23 +68,31 @@ public:
|
|||
signals:
|
||||
|
||||
/**jsdoc
|
||||
* Triggered when the path that snapshots are saved to is changed.
|
||||
* @function Snapshot.snapshotLocationSet
|
||||
* @param {string} location
|
||||
* @param {string} location - The new snapshots location.
|
||||
* @returns {Signal}
|
||||
* @example <caption>Report when the snapshots location is changed.</caption>
|
||||
* // Run this script then change the snapshots location in Settings > General > Snapshots.
|
||||
* Snapshot.snapshotLocationSet.connect(function (path) {
|
||||
* print("New snapshot location: " + path);
|
||||
* });
|
||||
*/
|
||||
void snapshotLocationSet(const QString& value);
|
||||
|
||||
public slots:
|
||||
|
||||
/**jsdoc
|
||||
* Gets the path that snapshots are saved to.
|
||||
* @function Snapshot.getSnapshotsLocation
|
||||
* @returns {string}
|
||||
* @returns {string} The path to save snapshots to.
|
||||
*/
|
||||
Q_INVOKABLE QString getSnapshotsLocation();
|
||||
|
||||
/**jsdoc
|
||||
* Sets the path that snapshots are saved to.
|
||||
* @function Snapshot.setSnapshotsLocation
|
||||
* @param {String} location
|
||||
* @param {String} location - The path to save snapshots to.
|
||||
*/
|
||||
Q_INVOKABLE void setSnapshotsLocation(const QString& location);
|
||||
|
||||
|
|
Loading…
Reference in a new issue