From 6d7b6f3e0a1b73c0c86548631d2292e821414bc2 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 20 Jul 2019 10:19:22 +1200 Subject: [PATCH] AvatarInputs JSDoc --- interface/src/ui/AvatarInputs.h | 75 ++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/interface/src/ui/AvatarInputs.h b/interface/src/ui/AvatarInputs.h index 976771d82b..9e7d231dd2 100644 --- a/interface/src/ui/AvatarInputs.h +++ b/interface/src/ui/AvatarInputs.h @@ -24,18 +24,31 @@ class AvatarInputs : public QObject { HIFI_QML_DECL /**jsdoc - * API to help manage your Avatar's input + * The AvatarInputs API provides facilities to manage user inputs. + * * @namespace AvatarInputs * * @hifi-interface * @hifi-client-entity * @hifi-avatar * - * @property {boolean} cameraEnabled Read-only. - * @property {boolean} cameraMuted Read-only. - * @property {boolean} isHMD Read-only. - * @property {boolean} showAudioTools - * @property {boolean} showBubbleTools + * @property {boolean} cameraEnabled - true if webcam face tracking is enabled, false if it is + * disabled. + * Read-only. + *

Deprecated: This property is deprecated and will be removed.

+ * @property {boolean} cameraMuted - true if webcam face tracking is muted (temporarily disabled), + * false it if isn't. + * Read-only. + *

Deprecated: This property is deprecated and will be removed.

+ * @property {boolean} ignoreRadiusEnabled - true if the privacy shield is enabled, false if it + * is disabled. + * Read-only. + * @property {boolean} isHMD - true if the display mode is HMD, false if it isn't. + * Read-only. + * @property {boolean} showAudioTools - true if the microphone mute button and audio level meter are shown, + * false if they are hidden. + * @property {boolean} showBubbleTools - true if the privacy shield UI button is shown, false if + * it is hidden. */ AI_PROPERTY(bool, cameraEnabled, false) @@ -51,9 +64,10 @@ public: static AvatarInputs* getInstance(); /**jsdoc + * Converts non-linear audio loudness to a linear audio level. * @function AvatarInputs.loudnessToAudioLevel - * @param {number} loudness - * @returns {number} + * @param {number} loudness - The non-linear audio loudness. + * @returns {number} The linear audio level. */ Q_INVOKABLE float loudnessToAudioLevel(float loudness); @@ -67,76 +81,96 @@ public: public slots: /**jsdoc + * Sets whether or not the microphone mute button and audio level meter is shown. * @function AvatarInputs.setShowAudioTools - * @param {boolean} showAudioTools + * @param {boolean} showAudioTools - true to show the microphone mute button and audio level meter, + * false to hide it. */ void setShowAudioTools(bool showAudioTools); /**jsdoc + * Sets whether or not the privacy shield button is shown. * @function AvatarInputs.setShowBubbleTools - * @param {boolean} showBubbleTools + * @param {boolean} showBubbleTools - true to show the privacy shield button, false to hide it. */ void setShowBubbleTools(bool showBubbleTools); signals: /**jsdoc + * Triggered when webcam face tracking is enabled or disabled. + * @deprecated This signal is deprecated and will be removed. * @function AvatarInputs.cameraEnabledChanged * @returns {Signal} */ void cameraEnabledChanged(); /**jsdoc + * Triggered when webcam face tracking is muted (temporarily disabled) or unmuted. + * @deprecated This signal is deprecated and will be removed. * @function AvatarInputs.cameraMutedChanged * @returns {Signal} */ void cameraMutedChanged(); /**jsdoc + * Triggered when the display mode changes between desktop and HMD. * @function AvatarInputs.isHMDChanged * @returns {Signal} */ - void isHMDChanged(); /**jsdoc + * Triggered when the visibility of the microphone mute button and audio level meter changes. * @function AvatarInputs.showAudioToolsChanged - * @param {boolean} show + * @param {boolean} show - true if the microphone mute button and audio level meter are shown, + * false if they are is hidden. * @returns {Signal} */ void showAudioToolsChanged(bool show); /**jsdoc + * Triggered when the visibility of the privacy shield button changes. * @function AvatarInputs.showBubbleToolsChanged - * @param {boolean} show + * @param {boolean} show - true if the privacy shield UI button is shown, false if + * it is hidden. * @returns {Signal} */ void showBubbleToolsChanged(bool show); /**jsdoc + * Triggered when another user enters the privacy shield. * @function AvatarInputs.avatarEnteredIgnoreRadius - * @param {QUuid} avatarID + * @param {QUuid} avatarID - The session ID of the user that entered the privacy shield. * @returns {Signal} - */ + * @example Report when a user enters the privacy shield. + * AvatarInputs.avatarEnteredIgnoreRadius.connect(function(avatarID) { + * print("User entered the privacy shield: " + avatarID); + * }; + */ void avatarEnteredIgnoreRadius(QUuid avatarID); /**jsdoc + * Triggered when another user leaves the privacy shield. + *

Note: Currently doesn't work.

* @function AvatarInputs.avatarLeftIgnoreRadius - * @param {QUuid} avatarID + * @param {QUuid} avatarID - The session ID of the user that exited the privacy shield. * @returns {Signal} - */ + * @deprecated This signal is deprecated and will be removed. + */ void avatarLeftIgnoreRadius(QUuid avatarID); /**jsdoc + * Triggered when the privacy shield is enabled or disabled. * @function AvatarInputs.ignoreRadiusEnabledChanged - * @param {boolean} enabled + * @param {boolean} enabled - true if the privacy shield is enabled, false if it is disabled. * @returns {Signal} */ void ignoreRadiusEnabledChanged(bool enabled); /**jsdoc + * Triggered when another user enters the privacy shield. * @function AvatarInputs.enteredIgnoreRadiusChanged - * @param {boolean} enabled * @returns {Signal} */ void enteredIgnoreRadiusChanged(); @@ -144,11 +178,14 @@ signals: protected: /**jsdoc + * Resets sensors, audio, avatar animations, and the avatar rig. * @function AvatarInputs.resetSensors */ Q_INVOKABLE void resetSensors(); /**jsdoc + * Toggles the muting (temporary disablement) of webcam face tracking on/off. + *

Deprecated: This function is deprecated and will be removed.

* @function AvatarInputs.toggleCameraMute */ Q_INVOKABLE void toggleCameraMute();