diff --git a/assignment-client/src/Agent.h b/assignment-client/src/Agent.h index 0cdc9e0029..00ef034ad5 100644 --- a/assignment-client/src/Agent.h +++ b/assignment-client/src/Agent.h @@ -33,6 +33,19 @@ #include "entities/EntityTreeHeadlessViewer.h" #include "avatars/ScriptableAvatar.h" +/**jsdoc + * @namespace Agent + * + * @hifi-assignment-client + * + * @property {boolean} isAvatar + * @property {boolean} isPlayingAvatarSound Read-only. + * @property {boolean} isListeningToAudioStream + * @property {boolean} isNoiseGateEnabled + * @property {number} lastReceivedAudioLoudness Read-only. + * @property {Uuid} sessionUUID Read-only. + */ + class Agent : public ThreadedAssignment { Q_OBJECT @@ -60,10 +73,27 @@ public: virtual void aboutToFinish() override; public slots: + /**jsdoc + * @function Agent.run + */ void run() override; + + /**jsdoc + * @function Agent.playAvatarSound + * @param {object} avatarSound + */ void playAvatarSound(SharedSoundPointer avatarSound); + /**jsdoc + * @function Agent.setIsAvatar + * @param {boolean} isAvatar + */ void setIsAvatar(bool isAvatar); + + /**jsdoc + * @function Agent.isAvatar + * @returns {boolean} + */ bool isAvatar() const { return _isAvatar; } private slots: diff --git a/assignment-client/src/entities/EntityTreeHeadlessViewer.h b/assignment-client/src/entities/EntityTreeHeadlessViewer.h index 17bb37186a..f4d5911821 100644 --- a/assignment-client/src/entities/EntityTreeHeadlessViewer.h +++ b/assignment-client/src/entities/EntityTreeHeadlessViewer.h @@ -23,6 +23,13 @@ class EntitySimulation; +/**jsdoc + * @namespace EntityViewer + * + * @hifi-assignment-client + */ +// API functions are defined in OctreeHeadlessViewer. + // Generic client side Octree renderer class. class EntityTreeHeadlessViewer : public OctreeHeadlessViewer { Q_OBJECT diff --git a/assignment-client/src/octree/OctreeHeadlessViewer.h b/assignment-client/src/octree/OctreeHeadlessViewer.h index dea91ce66f..a2a49dceb8 100644 --- a/assignment-client/src/octree/OctreeHeadlessViewer.h +++ b/assignment-client/src/octree/OctreeHeadlessViewer.h @@ -26,28 +26,101 @@ public: static void trackIncomingOctreePacket(const QByteArray& packet, const SharedNodePointer& sendingNode, bool wasStatsPacket); public slots: + + /**jsdoc + * @function EntityViewer.queryOctree + */ void queryOctree(); + // setters for camera attributes + + /**jsdoc + * @function EntityViewer.setPosition + * @param {Vec3} position + */ void setPosition(const glm::vec3& position) { _hasViewFrustum = true; _viewFrustum.setPosition(position); } + + /**jsdoc + * @function EntityViewer.setOrientation + * @param {Quat} orientation + */ void setOrientation(const glm::quat& orientation) { _hasViewFrustum = true; _viewFrustum.setOrientation(orientation); } + + /**jsdoc + * @function EntityViewer.setCenterRadius + * @param {number} radius + */ void setCenterRadius(float radius) { _hasViewFrustum = true; _viewFrustum.setCenterRadius(radius); } + + /**jsdoc + * @function EntityViewer.setKeyholeRadius + * @param {number} radius + * @deprecated Use {@link EntityViewer.setCenterRadius|setCenterRadius} instead. + */ void setKeyholeRadius(float radius) { _hasViewFrustum = true; _viewFrustum.setCenterRadius(radius); } // TODO: remove this legacy support + // setters for LOD and PPS + + /**jsdoc + * @function EntityViewer.setVoxelSizeScale + * @param {number} sizeScale + */ void setVoxelSizeScale(float sizeScale) { _octreeQuery.setOctreeSizeScale(sizeScale) ; } + + /**jsdoc + * @function EntityViewer.setBoundaryLevelAdjust + * @param {number} boundaryLevelAdjust + */ void setBoundaryLevelAdjust(int boundaryLevelAdjust) { _octreeQuery.setBoundaryLevelAdjust(boundaryLevelAdjust); } + + /**jsdoc + * @function EntityViewer.setMaxPacketsPerSecond + * @param {number} maxPacketsPerSecond + */ void setMaxPacketsPerSecond(int maxPacketsPerSecond) { _octreeQuery.setMaxQueryPacketsPerSecond(maxPacketsPerSecond); } // getters for camera attributes + + /**jsdoc + * @function EntityViewer.getPosition + * @returns {Vec3} + */ const glm::vec3& getPosition() const { return _viewFrustum.getPosition(); } + + /**jsdoc + * @function EntityViewer.getOrientation + * @returns {Quat} + */ const glm::quat& getOrientation() const { return _viewFrustum.getOrientation(); } + // getters for LOD and PPS + + /**jsdoc + * @function EntityViewer.getVoxelSizeScale + * @returns {number} + */ float getVoxelSizeScale() const { return _octreeQuery.getOctreeSizeScale(); } + + /**jsdoc + * @function EntityViewer.getBoundaryLevelAdjust + * @returns {number} + */ int getBoundaryLevelAdjust() const { return _octreeQuery.getBoundaryLevelAdjust(); } + + /**jsdoc + * @function EntityViewer.getMaxPacketsPerSecond + * @returns {number} + */ int getMaxPacketsPerSecond() const { return _octreeQuery.getMaxQueryPacketsPerSecond(); } + + /**jsdoc + * @function EntityViewer.getOctreeElementsCount + * @returns {number} + */ unsigned getOctreeElementsCount() const { return _tree->getOctreeElementsCount(); } private: diff --git a/interface/src/Bookmarks.h b/interface/src/Bookmarks.h index 7bd32ce7f1..dc08d4b279 100644 --- a/interface/src/Bookmarks.h +++ b/interface/src/Bookmarks.h @@ -51,6 +51,9 @@ protected slots: /**jsdoc * @function AvatarBookmarks.deleteBookmark */ + /**jsdoc + * @function LocationBookmarks.deleteBookmark + */ void deleteBookmark(); private: diff --git a/interface/src/LocationBookmarks.h b/interface/src/LocationBookmarks.h index 39abea9ba4..70ea50e2e7 100644 --- a/interface/src/LocationBookmarks.h +++ b/interface/src/LocationBookmarks.h @@ -16,6 +16,13 @@ #include "Bookmarks.h" +/**jsdoc + * @namespace LocationBookmarks + * + * @hifi-client-entity + * @hifi-interface + */ + class LocationBookmarks : public Bookmarks, public Dependency { Q_OBJECT SINGLETON_DEPENDENCY @@ -27,7 +34,16 @@ public: static const QString HOME_BOOKMARK; public slots: + + /**jsdoc + * @function LocationBookmarks.addBookmark + */ void addBookmark(); + + /**jsdoc + * @function LocationBookmarks.setHomeLocationToAddress + * @param {string} address + */ void setHomeLocationToAddress(const QVariant& address); protected: diff --git a/interface/src/scripting/Audio.h b/interface/src/scripting/Audio.h index f0a4328c2f..8d16b06995 100644 --- a/interface/src/scripting/Audio.h +++ b/interface/src/scripting/Audio.h @@ -89,7 +89,7 @@ public: /**jsdoc * @function Audio.setReverbOptions - * @param {} options + * @param {AudioEffectOptions} options */ Q_INVOKABLE void setReverbOptions(const AudioEffectOptions* options); diff --git a/interface/src/scripting/WalletScriptingInterface.h b/interface/src/scripting/WalletScriptingInterface.h index 9e40aad087..45661d939b 100644 --- a/interface/src/scripting/WalletScriptingInterface.h +++ b/interface/src/scripting/WalletScriptingInterface.h @@ -30,6 +30,14 @@ public: }; +/**jsdoc + * @namespace Wallet + * + * @hifi-interface + * @hifi-client-entity + * + * @property {number} walletStatus + */ class WalletScriptingInterface : public QObject, public Dependency { Q_OBJECT @@ -38,17 +46,53 @@ class WalletScriptingInterface : public QObject, public Dependency { public: WalletScriptingInterface(); + /**jsdoc + * @function Wallet.refreshWalletStatus + */ Q_INVOKABLE void refreshWalletStatus(); + + /**jsdoc + * @function Wallet.getWalletStatus + * @returns {number} + */ Q_INVOKABLE uint getWalletStatus() { return _walletStatus; } + + /**jsdoc + * @function Wallet.proveAvatarEntityOwnershipVerification + * @param {Uuid} entityID + */ Q_INVOKABLE void proveAvatarEntityOwnershipVerification(const QUuid& entityID); + // setWalletStatus() should never be made Q_INVOKABLE. If it were, // scripts could cause the Wallet to incorrectly report its status. void setWalletStatus(const uint& status); signals: + + /**jsdoc + * @function Wallet.walletStatusChanged + * @returns {Signal} + */ void walletStatusChanged(); + + /**jsdoc + * @function Wallet.walletNotSetup + * @returns {Signal} + */ void walletNotSetup(); + + /**jsdoc + * @function Wallet.ownershipVerificationSuccess + * @property {Uuid} entityID + * @returns {Signal} + */ void ownershipVerificationSuccess(const QUuid& entityID); + + /**jsdoc + * @function Wallet.ownershipVerificationFailed + * @property {Uuid} entityID + * @returns {Signal} + */ void ownershipVerificationFailed(const QUuid& entityID); private: diff --git a/interface/src/ui/Snapshot.h b/interface/src/ui/Snapshot.h index 606313f3c3..4dc937382b 100644 --- a/interface/src/ui/Snapshot.h +++ b/interface/src/ui/Snapshot.h @@ -34,6 +34,14 @@ private: QUrl _URL; }; + +/**jsdoc + * @namespace Snapshot + * + * @hifi-interface + * @hifi-client-entity + */ + class Snapshot : public QObject, public Dependency { Q_OBJECT SINGLETON_DEPENDENCY @@ -46,11 +54,28 @@ public: static void uploadSnapshot(const QString& filename, const QUrl& href = QUrl("")); signals: + + /**jsdoc + * @function Snapshot.snapshotLocationSet + * @param {string} location + * @returns {Signal} + */ void snapshotLocationSet(const QString& value); public slots: + + /**jsdoc + * @function Snapshot.getSnapshotsLocation + * @returns {string} + */ Q_INVOKABLE QString getSnapshotsLocation(); + + /**jsdoc + * @function Snapshot.setSnapshotsLocation + * @param {String} location + */ Q_INVOKABLE void setSnapshotsLocation(const QString& location); + private: static QFile* savedFileForSnapshot(QImage& image, bool isTemporary, diff --git a/interface/src/ui/Stats.h b/interface/src/ui/Stats.h index af3189f20b..ed6e3c9540 100644 --- a/interface/src/ui/Stats.h +++ b/interface/src/ui/Stats.h @@ -23,6 +23,149 @@ private: \ type _##name{ initialValue }; +/**jsdoc + * @namespace Stats + * + * @hifi-interface + * @hifi-client-entity + * @hifi-server-entity + * @hifi-assignment-client + * + * @property {boolean} expanded + * @property {boolean} timingExpanded - Read-only. + * @property {string} monospaceFont - Read-only. + * + * @property {number} serverCount - Read-only. + * @property {number} renderrate - How often the app is creating new gpu::Frames. Read-only. + * @property {number} presentrate - How often the display plugin is presenting to the device. Read-only. + * @property {number} stutterrate - How often the display device is reprojecting old frames. Read-only. + * + * @property {number} appdropped - Read-only. + * @property {number} longsubmits - Read-only. + * @property {number} longrenders - Read-only. + * @property {number} longframes - Read-only. + * + * @property {number} presentnewrate - Read-only. + * @property {number} presentdroprate - Read-only. + * @property {number} gameLoopRate - Read-only. + * @property {number} avatarCount - Read-only. + * @property {number} updatedAvatarCount - Read-only. + * @property {number} notUpdatedAvatarCount - Read-only. + * @property {number} packetInCount - Read-only. + * @property {number} packetOutCount - Read-only. + * @property {number} mbpsIn - Read-only. + * @property {number} mbpsOut - Read-only. + * @property {number} assetMbpsIn - Read-only. + * @property {number} assetMbpsOut - Read-only. + * @property {number} audioPing - Read-only. + * @property {number} avatarPing - Read-only. + * @property {number} entitiesPing - Read-only. + * @property {number} assetPing - Read-only. + * @property {number} messagePing - Read-only. + * @property {Vec3} position - Read-only. + * @property {number} speed - Read-only. + * @property {number} yaw - Read-only. + * @property {number} avatarMixerInKbps - Read-only. + * @property {number} avatarMixerInPps - Read-only. + * @property {number} avatarMixerOutKbps - Read-only. + * @property {number} avatarMixerOutPps - Read-only. + * @property {number} myAvatarSendRate - Read-only. + * + * @property {number} audioMixerInKbps - Read-only. + * @property {number} audioMixerInPps - Read-only. + * @property {number} audioMixerOutKbps - Read-only. + * @property {number} audioMixerOutPps - Read-only. + * @property {number} audioMixerKbps - Read-only. + * @property {number} audioMixerPps - Read-only. + * @property {number} audioOutboundPPS - Read-only. + * @property {number} audioSilentOutboundPPS - Read-only. + * @property {number} audioAudioInboundPPS - Read-only. + * @property {number} audioSilentInboundPPS - Read-only. + * @property {number} audioPacketLoss - Read-only. + * @property {string} audioCodec - Read-only. + * @property {string} audioNoiseGate - Read-only. + * @property {number} entityPacketsInKbps - Read-only. + * + * @property {number} downloads - Read-only. + * @property {number} downloadLimit - Read-only. + * @property {number} downloadsPending - Read-only. + * @property {string[]} downloadUrls - Read-only. + * @property {number} processing - Read-only. + * @property {number} processingPending - Read-only. + * @property {number} triangles - Read-only. + * @property {number} quads - Read-only. + * @property {number} materialSwitches - Read-only. + * @property {number} itemConsidered - Read-only. + * @property {number} itemOutOfView - Read-only. + * @property {number} itemTooSmall - Read-only. + * @property {number} itemRendered - Read-only. + * @property {number} shadowConsidered - Read-only. + * @property {number} shadowOutOfView - Read-only. + * @property {number} shadowTooSmall - Read-only. + * @property {number} shadowRendered - Read-only. + * @property {string} sendingMode - Read-only. + * @property {string} packetStats - Read-only. + * @property {string} lodStatus - Read-only. + * @property {string} timingStats - Read-only. + * @property {string} gameUpdateStats - Read-only. + * @property {number} serverElements - Read-only. + * @property {number} serverInternal - Read-only. + * @property {number} serverLeaves - Read-only. + * @property {number} localElements - Read-only. + * @property {number} localInternal - Read-only. + * @property {number} localLeaves - Read-only. + * @property {number} rectifiedTextureCount - Read-only. + * @property {number} decimatedTextureCount - Read-only. + * @property {number} gpuBuffers - Read-only. + * @property {number} gpuBufferMemory - Read-only. + * @property {number} gpuTextures - Read-only. + * @property {number} glContextSwapchainMemory - Read-only. + * @property {number} qmlTextureMemory - Read-only. + * @property {number} texturePendingTransfers - Read-only. + * @property {number} gpuTextureMemory - Read-only. + * @property {number} gpuTextureResidentMemory - Read-only. + * @property {number} gpuTextureFramebufferMemory - Read-only. + * @property {number} gpuTextureResourceMemory - Read-only. + * @property {number} gpuTextureResourcePopulatedMemory - Read-only. + * @property {number} gpuTextureExternalMemory - Read-only. + * @property {string} gpuTextureMemoryPressureState - Read-only. + * @property {number} gpuFreeMemory - Read-only. + * @property {number} gpuFrameTime - Read-only. + * @property {number} batchFrameTime - Read-only. + * @property {number} engineFrameTime - Read-only. + * @property {number} avatarSimulationTime - Read-only. + * + * + * @property {number} x + * @property {number} y + * @property {number} z + * @property {number} width + * @property {number} height + * + * @property {number} opacity + * @property {boolean} enabled + * @property {boolean} visible + * + * @property {string} state + * @property {number} baselineOffset + * + * @property {boolean} clip + * + * @property {boolean} focus + * @property {boolean} activeFocus - Read-only. + * @property {boolean} activeFocusOnTab + * + * @property {number} rotation + * @property {number} scale + * @property {number} transformOrigin + * + * @property {boolean} smooth + * @property {boolean} antialiasing + * @property {number} implicitWidth + * @property {number} implicitHeight + */ +// Properties from x onwards are QQuickItem properties. + class Stats : public QQuickItem { Q_OBJECT HIFI_QML_DECL @@ -161,105 +304,912 @@ public slots: void forceUpdateStats() { updateStats(true); } signals: + + /**jsdoc + * Triggered when the value of the longsubmits property changes. + * @function Stats.longsubmitsChanged + * @returns {Signal} + */ void longsubmitsChanged(); + + /**jsdoc + * Triggered when the value of the longrenders property changes. + * @function Stats.longrendersChanged + * @returns {Signal} + */ void longrendersChanged(); + + /**jsdoc + * Triggered when the value of the longframes property changes. + * @function Stats.longframesChanged + * @returns {Signal} + */ void longframesChanged(); + + /**jsdoc + * Triggered when the value of the appdropped property changes. + * @function Stats.appdroppedChanged + * @returns {Signal} + */ void appdroppedChanged(); + + /**jsdoc + * Triggered when the value of the expanded property changes. + * @function Stats.expandedChanged + * @returns {Signal} + */ void expandedChanged(); + + /**jsdoc + * Triggered when the value of the timingExpanded property changes. + * @function Stats.timingExpandedChanged + * @returns {Signal} + */ void timingExpandedChanged(); + + /**jsdoc + * Triggered when the value of the serverCount property changes. + * @function Stats.serverCountChanged + * @returns {Signal} + */ void serverCountChanged(); + + /**jsdoc + * Triggered when the value of the renderrate property changes. + * @function Stats.renderrateChanged + * @returns {Signal} + */ void renderrateChanged(); + + /**jsdoc + * Triggered when the value of the presentrate property changes. + * @function Stats.presentrateChanged + * @returns {Signal} + */ void presentrateChanged(); + + /**jsdoc + * Triggered when the value of the presentnewrate property changes. + * @function Stats.presentnewrateChanged + * @returns {Signal} + */ void presentnewrateChanged(); + + /**jsdoc + * Triggered when the value of the presentdroprate property changes. + * @function Stats.presentdroprateChanged + * @returns {Signal} + */ void presentdroprateChanged(); + + /**jsdoc + * Triggered when the value of the stutterrate property changes. + * @function Stats.stutterrateChanged + * @returns {Signal} + */ void stutterrateChanged(); + + /**jsdoc + * Triggered when the value of the gameLoopRate property changes. + * @function Stats.gameLoopRateChanged + * @returns {Signal} + */ void gameLoopRateChanged(); + + /**jsdoc + * Triggered when the value of the avatarCount property changes. + * @function Stats.avatarCountChanged + * @returns {Signal} + */ void avatarCountChanged(); + + /**jsdoc + * Triggered when the value of the updatedAvatarCount property changes. + * @function Stats.updatedAvatarCountChanged + * @returns {Signal} + */ void updatedAvatarCountChanged(); + + /**jsdoc + * Triggered when the value of the notUpdatedAvatarCount property changes. + * @function Stats.notUpdatedAvatarCountChanged + * @returns {Signal} + */ void notUpdatedAvatarCountChanged(); + + /**jsdoc + * Triggered when the value of the packetInCount property changes. + * @function Stats.packetInCountChanged + * @returns {Signal} + */ void packetInCountChanged(); + + /**jsdoc + * Triggered when the value of the packetOutCount property changes. + * @function Stats.packetOutCountChanged + * @returns {Signal} + */ void packetOutCountChanged(); + + /**jsdoc + * Triggered when the value of the mbpsIn property changes. + * @function Stats.mbpsInChanged + * @returns {Signal} + */ void mbpsInChanged(); + + /**jsdoc + * Triggered when the value of the mbpsOut property changes. + * @function Stats.mbpsOutChanged + * @returns {Signal} + */ void mbpsOutChanged(); + + /**jsdoc + * Triggered when the value of the assetMbpsIn property changes. + * @function Stats.assetMbpsInChanged + * @returns {Signal} + */ void assetMbpsInChanged(); + + /**jsdoc + * Triggered when the value of the assetMbpsOut property changes. + * @function Stats.assetMbpsOutChanged + * @returns {Signal} + */ void assetMbpsOutChanged(); + + /**jsdoc + * Triggered when the value of the audioPing property changes. + * @function Stats.audioPingChanged + * @returns {Signal} + */ void audioPingChanged(); + + /**jsdoc + * Triggered when the value of the avatarPing property changes. + * @function Stats.avatarPingChanged + * @returns {Signal} + */ void avatarPingChanged(); + + /**jsdoc + * Triggered when the value of the entitiesPing property changes. + * @function Stats.entitiesPingChanged + * @returns {Signal} + */ void entitiesPingChanged(); + + /**jsdoc + * Triggered when the value of the assetPing property changes. + * @function Stats.assetPingChanged + * @returns {Signal} + */ void assetPingChanged(); + + /**jsdoc + * Triggered when the value of the messagePing property changes. + * @function Stats.messagePingChanged + * @returns {Signal} + */ void messagePingChanged(); + + /**jsdoc + * Triggered when the value of the position property changes. + * @function Stats.positionChanged + * @returns {Signal} + */ void positionChanged(); + + /**jsdoc + * Triggered when the value of the speed property changes. + * @function Stats.speedChanged + * @returns {Signal} + */ void speedChanged(); + + /**jsdoc + * Triggered when the value of the yaw property changes. + * @function Stats.yawChanged + * @returns {Signal} + */ void yawChanged(); + + /**jsdoc + * Triggered when the value of the avatarMixerInKbps property changes. + * @function Stats.avatarMixerInKbpsChanged + * @returns {Signal} + */ void avatarMixerInKbpsChanged(); + + /**jsdoc + * Triggered when the value of the avatarMixerInPps property changes. + * @function Stats.avatarMixerInPpsChanged + * @returns {Signal} + */ void avatarMixerInPpsChanged(); + + /**jsdoc + * Triggered when the value of the avatarMixerOutKbps property changes. + * @function Stats.avatarMixerOutKbpsChanged + * @returns {Signal} + */ void avatarMixerOutKbpsChanged(); + + /**jsdoc + * Triggered when the value of the avatarMixerOutPps property changes. + * @function Stats.avatarMixerOutPpsChanged + * @returns {Signal} + */ void avatarMixerOutPpsChanged(); + + /**jsdoc + * Triggered when the value of the myAvatarSendRate property changes. + * @function Stats.myAvatarSendRateChanged + * @returns {Signal} + */ void myAvatarSendRateChanged(); + + /**jsdoc + * Triggered when the value of the audioMixerInKbps property changes. + * @function Stats.audioMixerInKbpsChanged + * @returns {Signal} + */ void audioMixerInKbpsChanged(); + + /**jsdoc + * Triggered when the value of the audioMixerInPps property changes. + * @function Stats.audioMixerInPpsChanged + * @returns {Signal} + */ void audioMixerInPpsChanged(); + + /**jsdoc + * Triggered when the value of the audioMixerOutKbps property changes. + * @function Stats.audioMixerOutKbpsChanged + * @returns {Signal} + */ void audioMixerOutKbpsChanged(); + + /**jsdoc + * Triggered when the value of the audioMixerOutPps property changes. + * @function Stats.audioMixerOutPpsChanged + * @returns {Signal} + */ void audioMixerOutPpsChanged(); + + /**jsdoc + * Triggered when the value of the audioMixerKbps property changes. + * @function Stats.audioMixerKbpsChanged + * @returns {Signal} + */ void audioMixerKbpsChanged(); + + /**jsdoc + * Triggered when the value of the audioMixerPps property changes. + * @function Stats.audioMixerPpsChanged + * @returns {Signal} + */ void audioMixerPpsChanged(); + + /**jsdoc + * Triggered when the value of the audioOutboundPPS property changes. + * @function Stats.audioOutboundPPSChanged + * @returns {Signal} + */ void audioOutboundPPSChanged(); + + /**jsdoc + * Triggered when the value of the audioSilentOutboundPPS property changes. + * @function Stats.audioSilentOutboundPPSChanged + * @returns {Signal} + */ void audioSilentOutboundPPSChanged(); + + /**jsdoc + * Triggered when the value of the audioAudioInboundPPS property changes. + * @function Stats.audioAudioInboundPPSChanged + * @returns {Signal} + */ void audioAudioInboundPPSChanged(); + + /**jsdoc + * Triggered when the value of the audioSilentInboundPPS property changes. + * @function Stats.audioSilentInboundPPSChanged + * @returns {Signal} + */ void audioSilentInboundPPSChanged(); + + /**jsdoc + * Triggered when the value of the audioPacketLoss property changes. + * @function Stats.audioPacketLossChanged + * @returns {Signal} + */ void audioPacketLossChanged(); + + /**jsdoc + * Triggered when the value of the audioCodec property changes. + * @function Stats.audioCodecChanged + * @returns {Signal} + */ void audioCodecChanged(); + + /**jsdoc + * Triggered when the value of the audioNoiseGate property changes. + * @function Stats.audioNoiseGateChanged + * @returns {Signal} + */ void audioNoiseGateChanged(); + + /**jsdoc + * Triggered when the value of the entityPacketsInKbps property changes. + * @function Stats.entityPacketsInKbpsChanged + * @returns {Signal} + */ void entityPacketsInKbpsChanged(); + + /**jsdoc + * Triggered when the value of the downloads property changes. + * @function Stats.downloadsChanged + * @returns {Signal} + */ void downloadsChanged(); + + /**jsdoc + * Triggered when the value of the downloadLimit property changes. + * @function Stats.downloadLimitChanged + * @returns {Signal} + */ void downloadLimitChanged(); + + /**jsdoc + * Triggered when the value of the downloadsPending property changes. + * @function Stats.downloadsPendingChanged + * @returns {Signal} + */ void downloadsPendingChanged(); + + /**jsdoc + * Triggered when the value of the downloadUrls property changes. + * @function Stats.downloadUrlsChanged + * @returns {Signal} + */ void downloadUrlsChanged(); + + /**jsdoc + * Triggered when the value of the processing property changes. + * @function Stats.processingChanged + * @returns {Signal} + */ void processingChanged(); + + /**jsdoc + * Triggered when the value of the processingPending property changes. + * @function Stats.processingPendingChanged + * @returns {Signal} + */ void processingPendingChanged(); + + /**jsdoc + * Triggered when the value of the triangles property changes. + * @function Stats.trianglesChanged + * @returns {Signal} + */ void trianglesChanged(); + + /**jsdoc + * Triggered when the value of the quads property changes. + * @function Stats.quadsChanged + * @returns {Signal} + */ void quadsChanged(); + + /**jsdoc + * Triggered when the value of the materialSwitches property changes. + * @function Stats.materialSwitchesChanged + * @returns {Signal} + */ void materialSwitchesChanged(); + + /**jsdoc + * Triggered when the value of the itemConsidered property changes. + * @function Stats.itemConsideredChanged + * @returns {Signal} + */ void itemConsideredChanged(); + + /**jsdoc + * Triggered when the value of the itemOutOfView property changes. + * @function Stats.itemOutOfViewChanged + * @returns {Signal} + */ void itemOutOfViewChanged(); + + /**jsdoc + * Triggered when the value of the itemTooSmall property changes. + * @function Stats.itemTooSmallChanged + * @returns {Signal} + */ void itemTooSmallChanged(); + + /**jsdoc + * Triggered when the value of the itemRendered property changes. + * @function Stats.itemRenderedChanged + * @returns {Signal} + */ void itemRenderedChanged(); + + /**jsdoc + * Triggered when the value of the shadowConsidered property changes. + * @function Stats.shadowConsideredChanged + * @returns {Signal} + */ void shadowConsideredChanged(); + + /**jsdoc + * Triggered when the value of the shadowOutOfView property changes. + * @function Stats.shadowOutOfViewChanged + * @returns {Signal} + */ void shadowOutOfViewChanged(); + + /**jsdoc + * Triggered when the value of the shadowTooSmall property changes. + * @function Stats.shadowTooSmallChanged + * @returns {Signal} + */ void shadowTooSmallChanged(); + + /**jsdoc + * Triggered when the value of the shadowRendered property changes. + * @function Stats.shadowRenderedChanged + * @returns {Signal} + */ void shadowRenderedChanged(); + + /**jsdoc + * Triggered when the value of the sendingMode property changes. + * @function Stats.sendingModeChanged + * @returns {Signal} + */ void sendingModeChanged(); + + /**jsdoc + * Triggered when the value of the packetStats property changes. + * @function Stats.packetStatsChanged + * @returns {Signal} + */ void packetStatsChanged(); + + /**jsdoc + * Triggered when the value of the lodStatus property changes. + * @function Stats.lodStatusChanged + * @returns {Signal} + */ void lodStatusChanged(); + + /**jsdoc + * Triggered when the value of the serverElements property changes. + * @function Stats.serverElementsChanged + * @returns {Signal} + */ void serverElementsChanged(); + + /**jsdoc + * Triggered when the value of the serverInternal property changes. + * @function Stats.serverInternalChanged + * @returns {Signal} + */ void serverInternalChanged(); + + /**jsdoc + * Triggered when the value of the serverLeaves property changes. + * @function Stats.serverLeavesChanged + * @returns {Signal} + */ void serverLeavesChanged(); + + /**jsdoc + * Triggered when the value of the localElements property changes. + * @function Stats.localElementsChanged + * @returns {Signal} + */ void localElementsChanged(); + + /**jsdoc + * Triggered when the value of the localInternal property changes. + * @function Stats.localInternalChanged + * @returns {Signal} + */ void localInternalChanged(); + + /**jsdoc + * Triggered when the value of the localLeaves property changes. + * @function Stats.localLeavesChanged + * @returns {Signal} + */ void localLeavesChanged(); + + /**jsdoc + * Triggered when the value of the timingStats property changes. + * @function Stats.timingStatsChanged + * @returns {Signal} + */ void timingStatsChanged(); + + /**jsdoc + * Triggered when the value of the gameUpdateStats property changes. + * @function Stats.gameUpdateStatsChanged + * @returns {Signal} + */ void gameUpdateStatsChanged(); + + /**jsdoc + * Triggered when the value of the glContextSwapchainMemory property changes. + * @function Stats.glContextSwapchainMemoryChanged + * @returns {Signal} + */ void glContextSwapchainMemoryChanged(); + + /**jsdoc + * Triggered when the value of the qmlTextureMemory property changes. + * @function Stats.qmlTextureMemoryChanged + * @returns {Signal} + */ void qmlTextureMemoryChanged(); + + /**jsdoc + * Triggered when the value of the texturePendingTransfers property changes. + * @function Stats.texturePendingTransfersChanged + * @returns {Signal} + */ void texturePendingTransfersChanged(); + + /**jsdoc + * Triggered when the value of the gpuBuffers property changes. + * @function Stats.gpuBuffersChanged + * @returns {Signal} + */ void gpuBuffersChanged(); + + /**jsdoc + * Triggered when the value of the gpuBufferMemory property changes. + * @function Stats.gpuBufferMemoryChanged + * @returns {Signal} + */ void gpuBufferMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextures property changes. + * @function Stats.gpuTexturesChanged + * @returns {Signal} + */ void gpuTexturesChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureMemory property changes. + * @function Stats.gpuTextureMemoryChanged + * @returns {Signal} + */ void gpuTextureMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureResidentMemory property changes. + * @function Stats.gpuTextureResidentMemoryChanged + * @returns {Signal} + */ void gpuTextureResidentMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureFramebufferMemory property changes. + * @function Stats.gpuTextureFramebufferMemoryChanged + * @returns {Signal} + */ void gpuTextureFramebufferMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureResourceMemory property changes. + * @function Stats.gpuTextureResourceMemoryChanged + * @returns {Signal} + */ void gpuTextureResourceMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureResourcePopulatedMemory property changes. + * @function Stats.gpuTextureResourcePopulatedMemoryChanged + * @returns {Signal} + */ void gpuTextureResourcePopulatedMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureExternalMemory property changes. + * @function Stats.gpuTextureExternalMemoryChanged + * @returns {Signal} + */ void gpuTextureExternalMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuTextureMemoryPressureState property changes. + * @function Stats.gpuTextureMemoryPressureStateChanged + * @returns {Signal} + */ void gpuTextureMemoryPressureStateChanged(); + + /**jsdoc + * Triggered when the value of the gpuFreeMemory property changes. + * @function Stats.gpuFreeMemoryChanged + * @returns {Signal} + */ void gpuFreeMemoryChanged(); + + /**jsdoc + * Triggered when the value of the gpuFrameTime property changes. + * @function Stats.gpuFrameTimeChanged + * @returns {Signal} + */ void gpuFrameTimeChanged(); + + /**jsdoc + * Triggered when the value of the batchFrameTime property changes. + * @function Stats.batchFrameTimeChanged + * @returns {Signal} + */ void batchFrameTimeChanged(); + + /**jsdoc + * Triggered when the value of the engineFrameTime property changes. + * @function Stats.engineFrameTimeChanged + * @returns {Signal} + */ void engineFrameTimeChanged(); + + /**jsdoc + * Triggered when the value of the avatarSimulationTime property changes. + * @function Stats.avatarSimulationTimeChanged + * @returns {Signal} + */ void avatarSimulationTimeChanged(); + + /**jsdoc + * Triggered when the value of the rectifiedTextureCount property changes. + * @function Stats.rectifiedTextureCountChanged + * @returns {Signal} + */ void rectifiedTextureCountChanged(); + + /**jsdoc + * Triggered when the value of the decimatedTextureCount property changes. + * @function Stats.decimatedTextureCountChanged + * @returns {Signal} + */ void decimatedTextureCountChanged(); + + // QQuickItem signals. + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {Rect} childrenRect + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {number} baselineOffset + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {string} state + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {boolean} focus + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {boolean} activeFocus + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {boolean} activeFocusOnTab + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {object} parent + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {number} transformOrigin + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {boolean} smooth + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {boolean} antialiasing + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {boolean} clip + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @param {object} window + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + /**jsdoc + * Triggered when the value of the TODO property changes. + * @function Stats.TODO + * @returns {Signal} + */ + + + // QQuickItem functions. + + /**jsdoc + * @function Stats.grabToImage + * @param {object} callback + * @param {Size} [targetSize=0,0] + * @returns {boolean} + */ + + /**jsdoc + * @function Stats.contains + * @param {Vec2} point + * @returns {boolean} + */ + + /**jsdoc + * @function Stats.mapFromItem + * @param {object} item + */ + + /**jsdoc + * @function Stats.mapToItem + * @param {object} item + */ + + /**jsdoc + * @function Stats.mapFromGlobal + * @param {object} global + */ + + /**jsdoc + * @function Stats.mapToGlobal + * @param {object} global + */ + + /**jsdoc + * @function Stats.forceActiveFocus + * @param {number} [reason=7] + */ + + /**jsdoc + * @function Stats.nextItemInFocusChain + * @param {boolean} [forward=true] + * @returns {object} + */ + + /**jsdoc + * @function Stats.childAt + * @param {number} x + * @param {number} y + * @returns {object} + */ + private: int _recentMaxPackets{ 0 } ; // recent max incoming voxel packets to process bool _resetRecentMaxPacketsSoon{ true }; diff --git a/libraries/audio/src/AudioEffectOptions.h b/libraries/audio/src/AudioEffectOptions.h index 9a65301473..18e019731e 100644 --- a/libraries/audio/src/AudioEffectOptions.h +++ b/libraries/audio/src/AudioEffectOptions.h @@ -15,6 +15,38 @@ #include #include +/**jsdoc + * @class AudioEffectOptions + * @param {object} [properties=null] + * + * @hifi-interface + * @hifi-client-entity + * @hifi-server-entity + * @hifi-assignment-client + * + * @property {number} bandwidth + * @property {number} preDelay + * @property {number} lateDelay + * @property {number} reverbTime + * @property {number} earlyDiffusion + * @property {number} lateDiffusion + * @property {number} roomSize + * @property {number} density + * @property {number} bassMult + * @property {number} bassFreq + * @property {number} highGain + * @property {number} highFreq + * @property {number} modRate + * @property {number} modDepth + * @property {number} earlyGain + * @property {number} lateGain + * @property {number} earlyMixLeft + * @property {number} earlyMixRight + * @property {number} lateMixLeft + * @property {number} lateMixRight + * @property {number} wetDryMix + */ + class AudioEffectOptions : public QObject { Q_OBJECT diff --git a/libraries/graphics-scripting/src/graphics-scripting/Forward.h b/libraries/graphics-scripting/src/graphics-scripting/Forward.h index ed8e96a12f..104674eddc 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/Forward.h +++ b/libraries/graphics-scripting/src/graphics-scripting/Forward.h @@ -36,6 +36,30 @@ namespace scriptable { using ModelProviderPointer = std::shared_ptr; using WeakModelProviderPointer = std::weak_ptr; + /**jsdoc + * @typedef {object} Graphics.Material + * @property {string} name + * @property {string} model + * @property {number} opacity + * @property {number} roughness + * @property {number} metallic + * @property {number} scattering + * @property {boolean} unlit + * @propety {Vec3} emissive + * @propety {Vec3} albedo + * @property {string} emissiveMap + * @property {string} albedoMap + * @property {string} opacityMap + * @property {string} metallicMap + * @property {string} specularMap + * @property {string} roughnessMap + * @property {string} glossMap + * @property {string} normalMap + * @property {string} bumpMap + * @property {string} occlusionMap + * @property {string} lightmapMap + * @property {string} scatteringMap + */ class ScriptableMaterial { public: ScriptableMaterial() {} @@ -68,7 +92,7 @@ namespace scriptable { /**jsdoc * @typedef {object} Graphics.MaterialLayer - * @property {Material} material - This layer's material. + * @property {Graphics.Material} material - This layer's material. * @property {number} priority - The priority of this layer. If multiple materials are applied to a mesh part, only the highest priority layer is used. */ class ScriptableMaterialLayer { diff --git a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp index 20b54b02c9..6fd0017ae2 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp +++ b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp @@ -166,6 +166,17 @@ bool GraphicsScriptingInterface::updateMeshPart(scriptable::ScriptableMeshPointe scriptable::ScriptableMeshPointer GraphicsScriptingInterface::newMesh(const QVariantMap& ifsMeshData) { // TODO: this is bare-bones way for now to improvise a new mesh from the scripting side // in the future we want to support a formal C++ structure data type here instead + + /**jsdoc + * @typedef {object} Graphics.IFSData + * @property {string} [name=""] - mesh name (useful for debugging / debug prints). + * @property {string} [topology=""] + * @property {number[]} indices - vertex indices to use for the mesh faces. + * @property {Vec3[]} vertices - vertex positions (model space) + * @property {Vec3[]} [normals=[]] - vertex normals (normalized) + * @property {Vec3[]} [colors=[]] - vertex colors (normalized) + * @property {Vec2[]} [texCoords0=[]] - vertex texture coordinates (normalized) + */ QString meshName = ifsMeshData.value("name").toString(); QString topologyName = ifsMeshData.value("topology").toString(); QVector indices = buffer_helpers::variantToVector(ifsMeshData.value("indices")); diff --git a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h index b88c6345cf..1ec60c4244 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h +++ b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h @@ -46,10 +46,28 @@ public slots: */ scriptable::ScriptableModelPointer getModel(QUuid uuid); + /**jsdoc + * @function Graphics.updateModel + * @param {Uuid} id + * @param {Graphics.Model} model + * @returns {boolean} + */ bool updateModel(QUuid uuid, const scriptable::ScriptableModelPointer& model); + /**jsdoc + * @function Graphics.canUpdateModel + * @param {Uuid} id + * @param {number} [meshIndex=-1] + * @param {number} [partNumber=-1] + * @returns {boolean} + */ bool canUpdateModel(QUuid uuid, int meshIndex = -1, int partNumber = -1); + /**jsdoc + * @function Graphics.newModel + * @param {Graphics.Mesh[]} meshes + * @returns {Graphics.Model} + */ scriptable::ScriptableModelPointer newModel(const scriptable::ScriptableMeshes& meshes); /**jsdoc @@ -59,15 +77,6 @@ public slots: * @param {Graphics.IFSData} ifsMeshData Index-Faced Set (IFS) arrays used to create the new mesh. * @returns {Graphics.Mesh} the resulting Mesh / Mesh Part object */ - /**jsdoc - * @typedef {object} Graphics.IFSData - * @property {string} [name] - mesh name (useful for debugging / debug prints). - * @property {number[]} indices - vertex indices to use for the mesh faces. - * @property {Vec3[]} vertices - vertex positions (model space) - * @property {Vec3[]} [normals] - vertex normals (normalized) - * @property {Vec3[]} [colors] - vertex colors (normalized) - * @property {Vec2[]} [texCoords0] - vertex texture coordinates (normalized) - */ scriptable::ScriptableMeshPointer newMesh(const QVariantMap& ifsMeshData); #ifdef SCRIPTABLE_MESH_TODO @@ -77,6 +86,11 @@ public slots: bool updateMeshPart(scriptable::ScriptableMeshPointer mesh, scriptable::ScriptableMeshPartPointer part); #endif + /**jsdoc + * @function Graphics.exportModelToOBJ + * @param {Graphics.Model} model + * @returns {string} + */ QString exportModelToOBJ(const scriptable::ScriptableModel& in); private: diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h index 62a67aa5e6..dcb1c53759 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h +++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h @@ -36,6 +36,10 @@ namespace scriptable { * @property {number} numIndices - Total number of vertex indices in the mesh. * @property {number} numVertices - Total number of vertices in the Mesh. * @property {number} numAttributes - Number of currently defined vertex attributes. + * @property {boolean} valid + * @property {boolean} strong + * @property {object} extents + * @property {object} bufferFormats */ class ScriptableMesh : public ScriptableMeshBase, QScriptable { Q_OBJECT diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h index dd71d9b998..7352fcd0f6 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h +++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h @@ -12,7 +12,11 @@ namespace scriptable { /**jsdoc * @typedef {object} Graphics.MeshPart + * @property {boolean} valid * @property {number} partIndex - The part index (within the containing Mesh). + * @property {number} firstVertexIndex + * @property {number} baseVertexIndex + * @property {number} lastVertexIndex * @property {Graphics.Topology} topology - element interpretation (currently only 'triangles' is supported). * @property {string[]} attributeNames - Vertex attribute names (color, normal, etc.) * @property {number} numIndices - Number of vertex indices that this mesh part refers to. @@ -20,6 +24,8 @@ namespace scriptable { * @property {number} numFaces - Number of faces represented by the mesh part (numIndices / numVerticesPerFace). * @property {number} numVertices - Total number of vertices in the containing Mesh. * @property {number} numAttributes - Number of currently defined vertex attributes. + * @property {object} extents + * @property {object} bufferFormats */ class ScriptableMeshPart : public QObject, QScriptable { diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h b/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h index ac0b7b9623..7d1ca5f560 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h +++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h @@ -21,7 +21,7 @@ namespace scriptable { * @property {Uuid} objectID - UUID of corresponding inworld object (if model is associated) * @property {number} numMeshes - The number of submeshes contained in the model. * @property {Graphics.Mesh[]} meshes - Array of submesh references. - * @property {Object.} materialLayers - Map of materials layer lists. You can look up a material layer list by mesh part number or by material name. + * @property {Object.} materialLayers - Map of materials layer lists. You can look up a material layer list by mesh part number or by material name. * @property {string[]} materialNames - Array of all the material names used by the mesh parts of this model, in order (e.g. materialNames[0] is the name of the first mesh part's material). */ diff --git a/libraries/graphics/src/graphics/Geometry.h b/libraries/graphics/src/graphics/Geometry.h index 485542d26b..eddfdbd1b6 100755 --- a/libraries/graphics/src/graphics/Geometry.h +++ b/libraries/graphics/src/graphics/Geometry.h @@ -76,6 +76,23 @@ public: // Access vertex position value const Vec3& getPos(Index index) const { return _vertexBuffer.get(index); } + /**jsdoc + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ValueDescription
0Points.
1Lines.
2Line strip.
3Triangles.
4Triangle strip.
5Quads.
6Quad strip.
+ * @typedef {number} Graphics.Topology + */ enum Topology { POINTS = 0, LINES, diff --git a/libraries/midi/src/Midi.h b/libraries/midi/src/Midi.h index f7940bbe5d..e5c44c6b7e 100644 --- a/libraries/midi/src/Midi.h +++ b/libraries/midi/src/Midi.h @@ -20,6 +20,13 @@ #include #include +/**jsdoc + * @namespace Midi + * + * @hifi-interface + * @hifi-client-entity + */ + class Midi : public QObject, public Dependency { Q_OBJECT SINGLETON_DEPENDENCY @@ -46,57 +53,135 @@ signals: void midiReset(); public slots: - // Send Raw Midi Packet to all connected devices + + /**jsdoc + * Send Raw MIDI packet to a particular device. + * @function Midi.sendRawDword + * @param {number} device - Integer device number. + * @param {number} raw - Integer (DWORD) raw MIDI message. + */ Q_INVOKABLE void sendRawDword(int device, int raw); - /// Send Raw Midi message to selected device - /// @param {int} device: device number - /// @param {int} raw: raw midi message (DWORD) - // Send Midi Message to all connected devices + /**jsdoc + * Send MIDI message to a particular device. + * @function Midi.sendMidiMessage + * @param {number} device - Integer device number. + * @param {number} channel - Integer channel number. + * @param {number} type - 0x8 is note off, 0x9 is note on (if velocity=0, note off), etc. + * @param {number} note - MIDI note number. + * @param {number} velocity - Note velocity (0 means note off). + */ Q_INVOKABLE void sendMidiMessage(int device, int channel, int type, int note, int velocity); - /// Send midi message to selected device/devices - /// @param {int} device: device number - /// @param {int} channel: channel number - /// @param {int} type: 0x8 is noteoff, 0x9 is noteon (if velocity=0, noteoff), etc - /// @param {int} note: midi note number - /// @param {int} velocity: note velocity (0 means noteoff) - // Send Midi Message to all connected devices + /**jsdoc + * Play a note on all connected devices. + * @function Midi.playMidiNote + * @param {number} status - 0x80 is note off, 0x90 is note on (if velocity=0, note off), etc. + * @param {number} note - MIDI note number. + * @param {number} velocity - Note velocity (0 means note off). + */ Q_INVOKABLE void playMidiNote(int status, int note, int velocity); - /// play a note on all connected devices - /// @param {int} status: 0x80 is noteoff, 0x90 is noteon (if velocity=0, noteoff), etc - /// @param {int} note: midi note number - /// @param {int} velocity: note velocity (0 means noteoff) - /// turn off all notes on all connected devices + /**jsdoc + * Turn off all notes on all connected devices. + * @function Midi.allNotesOff + */ Q_INVOKABLE void allNotesOff(); - /// clean up and re-discover attached devices + /**jsdoc + * Clean up and re-discover attached devices. + * @function Midi.resetDevices + */ Q_INVOKABLE void resetDevices(); - /// ask for a list of inputs/outputs + /**jsdoc + * Get a list of inputs/outputs. + * @function Midi.listMidiDevices + * @param {boolean} output + * @returns {string[]} + */ Q_INVOKABLE QStringList listMidiDevices(bool output); - /// block an input/output by name + /**jsdoc + * Block an input/output by name. + * @function Midi.blockMidiDevice + * @param {string} name + * @param {boolean} output + */ Q_INVOKABLE void blockMidiDevice(QString name, bool output); - /// unblock an input/output by name + /**jsdoc + * Unblock an input/output by name. + * @function Midi.unblockMidiDevice + * @param {string} name + * @param {boolean} output + */ Q_INVOKABLE void unblockMidiDevice(QString name, bool output); - /// repeat all incoming notes to all outputs (default disabled) + /**jsdoc + * Repeat all incoming notes to all outputs (default disabled). + * @function Midi.thruModeEnable + * @param {boolean} enable + */ Q_INVOKABLE void thruModeEnable(bool enable); - /// broadcast on all unblocked devices + + /**jsdoc + * Broadcast on all unblocked devices. + * @function Midi.broadcastEnable + * @param {boolean} enable + */ Q_INVOKABLE void broadcastEnable(bool enable); + /// filter by event types + + /**jsdoc + * @function Midi.typeNoteOffEnable + * @param {boolean} enable + */ Q_INVOKABLE void typeNoteOffEnable(bool enable); + + /**jsdoc + * @function Midi.typeNoteOnEnable + * @param {boolean} enable + */ Q_INVOKABLE void typeNoteOnEnable(bool enable); + + /**jsdoc + * @function Midi.typePolyKeyPressureEnable + * @param {boolean} enable + */ Q_INVOKABLE void typePolyKeyPressureEnable(bool enable); + + /**jsdoc + * @function Midi.typeControlChangeEnable + * @param {boolean} enable + */ Q_INVOKABLE void typeControlChangeEnable(bool enable); + + /**jsdoc + * @function Midi.typeProgramChangeEnable + * @param {boolean} enable + */ Q_INVOKABLE void typeProgramChangeEnable(bool enable); + + /**jsdoc + * @function Midi.typeChanPressureEnable + * @param {boolean} enable + */ Q_INVOKABLE void typeChanPressureEnable(bool enable); + + /**jsdoc + * @function Midi.typePitchBendEnable + * @param {boolean} enable + */ Q_INVOKABLE void typePitchBendEnable(bool enable); + + /**jsdoc + * @function Midi.typeSystemMessageEnable + * @param {boolean} enable + */ Q_INVOKABLE void typeSystemMessageEnable(bool enable); diff --git a/libraries/networking/src/ResourceScriptingInterface.h b/libraries/networking/src/ResourceScriptingInterface.h index d9777e7514..cc3f12f990 100644 --- a/libraries/networking/src/ResourceScriptingInterface.h +++ b/libraries/networking/src/ResourceScriptingInterface.h @@ -17,11 +17,30 @@ #include +/**jsdoc + * @namespace Resources + * + * @hifi-interface + * @hifi-client-entity + * @hifi-server-entity + * @hifi-assignment-client + */ + class ResourceScriptingInterface : public QObject, public Dependency { Q_OBJECT public: + + /**jsdoc + * @function Resources.overrideUrlPrefix + * @param {string} prefix + * @param {string} replacement + */ Q_INVOKABLE void overrideUrlPrefix(const QString& prefix, const QString& replacement); + /**jsdoc + * @function Resources.restoreUrlPrefix + * @param {string} prefix + */ Q_INVOKABLE void restoreUrlPrefix(const QString& prefix) { overrideUrlPrefix(prefix, ""); } diff --git a/libraries/networking/src/ThreadedAssignment.h b/libraries/networking/src/ThreadedAssignment.h index 007e41a543..d19617357b 100644 --- a/libraries/networking/src/ThreadedAssignment.h +++ b/libraries/networking/src/ThreadedAssignment.h @@ -29,13 +29,30 @@ public: void addPacketStatsAndSendStatsPacket(QJsonObject statsObject); public slots: + // JSDoc: Overridden in Agent.h. /// threaded run of assignment virtual void run() = 0; + + /**jsdoc + * @function Agent.stop + */ Q_INVOKABLE virtual void stop() { setFinished(true); } + + /**jsdoc + * @function Agent.sendStatsPacket + */ virtual void sendStatsPacket(); + + /**jsdoc + * @function Agent.clearQueuedCheckIns + */ void clearQueuedCheckIns() { _numQueuedCheckIns = 0; } signals: + /**jsdoc + * @function Agent.finished + * @returns {Signal} + */ void finished(); protected: @@ -47,6 +64,9 @@ protected: int _numQueuedCheckIns { 0 }; protected slots: + /**jsdoc + * @function Agent.domainSettingsRequestFailed + */ void domainSettingsRequestFailed(); private slots: diff --git a/libraries/plugins/src/plugins/SteamClientPlugin.h b/libraries/plugins/src/plugins/SteamClientPlugin.h index 343ed40402..fc1b85c572 100644 --- a/libraries/plugins/src/plugins/SteamClientPlugin.h +++ b/libraries/plugins/src/plugins/SteamClientPlugin.h @@ -40,6 +40,15 @@ public: virtual int getSteamVRBuildID() = 0; }; +/**jsdoc + * @namespace Steam + * + * @hifi-interface + * @hifi-client-entity + * + * @property {boolean} running - Read-only. + */ + class SteamScriptingInterface : public QObject { Q_OBJECT @@ -49,7 +58,16 @@ public: SteamScriptingInterface(QObject* parent, SteamClientPlugin* plugin) : QObject(parent), _plugin(plugin) {} public slots: + + /**jsdoc + * @function Steam.isRunning + * @returns {boolean} + */ bool isRunning() const { return _plugin && _plugin->isRunning(); } + + /**jsdoc + * @function Steam.openInviteOverlay + */ void openInviteOverlay() const { if (_plugin) { _plugin->openInviteOverlay(); } } private: diff --git a/libraries/script-engine/src/FileScriptingInterface.h b/libraries/script-engine/src/FileScriptingInterface.h index 5cbe417130..7b833399e0 100644 --- a/libraries/script-engine/src/FileScriptingInterface.h +++ b/libraries/script-engine/src/FileScriptingInterface.h @@ -16,6 +16,15 @@ #include #include +/**jsdoc + * @namespace File + * + * @hifi-interface + * @hifi-client-entity + * @hifi-server-entity + * @hifi-assignment-client + */ + class FileScriptingInterface : public QObject { Q_OBJECT @@ -23,11 +32,41 @@ public: FileScriptingInterface(QObject* parent); public slots: + + /**jsdoc + * @function File.convertUrlToPath + * @param {string} url + * @returns {string} + */ QString convertUrlToPath(QUrl url); + + /**jsdoc + * @function File.runUnzip + * @param {string} path + * @param {string} url + * @param {boolean} autoAdd + * @param {boolean} isZip + * @param {boolean} isBlocks + */ void runUnzip(QString path, QUrl url, bool autoAdd, bool isZip, bool isBlocks); + + /**jsdoc + * @function File.getTempDir + * @returns {string} + */ QString getTempDir(); signals: + + /**jsdoc + * @function File.unzipResult + * @param {string} zipFile + * @param {string} unzipFile + * @param {boolean} autoAdd + * @param {boolean} isZip + * @param {boolean} isBlocks + * @returns {Signal} + */ void unzipResult(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip, bool isBlocks); private: diff --git a/libraries/script-engine/src/Mat4.h b/libraries/script-engine/src/Mat4.h index ceeea3ccec..288a101234 100644 --- a/libraries/script-engine/src/Mat4.h +++ b/libraries/script-engine/src/Mat4.h @@ -21,33 +21,147 @@ #include #include "RegisteredMetaTypes.h" +/**jsdoc + * @namespace Mat4 + * + * @hifi-interface + * @hifi-client-entity + * @hifi-server-entity + * @hifi-assignment-client + */ + /// Scriptable Mat4 object. Used exclusively in the JavaScript API class Mat4 : public QObject, protected QScriptable { Q_OBJECT public slots: + + /**jsdoc + * @function Mat4.multiply + * @param {Mat4} m1 + * @param {Mat4} m2 + * @returns {Mat4} + */ glm::mat4 multiply(const glm::mat4& m1, const glm::mat4& m2) const; + + /**jsdoc + * @function Mat4.createFromRotAndTrans + * @param {Quat} rot + * @param {Vec3} trans + * @returns {Mat4} + */ glm::mat4 createFromRotAndTrans(const glm::quat& rot, const glm::vec3& trans) const; + + /**jsdoc + * @function Mat4.createFromScaleRotAndTrans + * @param {Vec3} scale + * @param {Quat} rot + * @param {Vec3} trans + * @returns {Mat4} + */ glm::mat4 createFromScaleRotAndTrans(const glm::vec3& scale, const glm::quat& rot, const glm::vec3& trans) const; + + /**jsdoc + * @function Mat4.createFromColumns + * @param {Vec4} col0 + * @param {Vec4} col1 + * @param {Vec4} col2 + * @param {Vec4} col + * @returns {Mat4} + */ glm::mat4 createFromColumns(const glm::vec4& col0, const glm::vec4& col1, const glm::vec4& col2, const glm::vec4& col3) const; + + /**jsdoc + * @function Mat4.createFromArray + * @param {number[]} numbers + * @returns {Mat4} + */ glm::mat4 createFromArray(const QVector& floats) const; + + /**jsdoc + * @function Mat4.extractTranslation + * @param {Mat4} m + * @returns {Vec3} + */ glm::vec3 extractTranslation(const glm::mat4& m) const; + + /**jsdoc + * @function Mat4.extractRotation + * @param {Mat4} m + * @returns {Vec3} + */ glm::quat extractRotation(const glm::mat4& m) const; + + /**jsdoc + * @function Mat4.extractScale + * @param {Mat4} m + * @returns {Vec3} + */ glm::vec3 extractScale(const glm::mat4& m) const; + + /**jsdoc + * @function Mat4.transformPoint + * @param {Mat4} m + * @param {Vec3} point + * @returns {Vec3} + */ glm::vec3 transformPoint(const glm::mat4& m, const glm::vec3& point) const; + + /**jsdoc + * @function Mat4.transformVector + * @param {Mat4} m + * @param {Vec3} vector + * @returns {Vec3} + */ glm::vec3 transformVector(const glm::mat4& m, const glm::vec3& vector) const; + + /**jsdoc + * @function Mat4.inverse + * @param {Mat4} m + * @returns {Mat4} + */ glm::mat4 inverse(const glm::mat4& m) const; + + /**jsdoc + * @function Mat4.getFront + * @param {Mat4} m + * @returns {Vec3} + */ // redundant, calls getForward which better describes the returned vector as a direction glm::vec3 getFront(const glm::mat4& m) const { return getForward(m); } + + /**jsdoc + * @function Mat4.getForward + * @param {Mat4} m + * @returns {Vec3} + */ glm::vec3 getForward(const glm::mat4& m) const; + + /**jsdoc + * @function Mat4.getRight + * @param {Mat4} m + * @returns {Vec3} + */ glm::vec3 getRight(const glm::mat4& m) const; + + /**jsdoc + * @function Mat4.getUp + * @param {Mat4} m + * @returns {Vec3} + */ glm::vec3 getUp(const glm::mat4& m) const; + /**jsdoc + * @function Mat4.print + * @param {string} label + * @param {Mat4} m + * @param {boolean} [transpose=false] + */ void print(const QString& label, const glm::mat4& m, bool transpose = false) const; }; 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/libraries/ui/src/OffscreenUi.cpp b/libraries/ui/src/OffscreenUi.cpp index a1d09139e3..25f0652496 100644 --- a/libraries/ui/src/OffscreenUi.cpp +++ b/libraries/ui/src/OffscreenUi.cpp @@ -30,6 +30,15 @@ #include +/**jsdoc + * @namespace OffscreenFlags + * + * @hifi-interface + * @hifi-client-entity + * @property {boolean} navigationFocused + * @property {boolean} navigationFocusDisabled + */ + // Needs to match the constants in resources/qml/Global.js class OffscreenFlags : public QObject { Q_OBJECT @@ -58,7 +67,17 @@ public: } signals: + + /**jsdoc + * @function OffscreenFlags.navigationFocusedChanged + * @returns {Signal} + */ void navigationFocusedChanged(); + + /**jsdoc + * @function OffscreenFlags.navigationFocusDisabledChanged + * @returns {Signal} + */ void navigationFocusDisabledChanged(); private: diff --git a/libraries/ui/src/QmlWebWindowClass.h b/libraries/ui/src/QmlWebWindowClass.h index cdc07265cd..95ac2eac4a 100644 --- a/libraries/ui/src/QmlWebWindowClass.h +++ b/libraries/ui/src/QmlWebWindowClass.h @@ -11,6 +11,17 @@ #include "QmlWindowClass.h" +/**jsdoc + * @class OverlayWebWindow + * @augments OverlayWindow + * @param {object} [properties=null] + * + * @hifi-interface + * @hifi-client-en + * + * @property {string} url - Read-only. + */ + // FIXME refactor this class to be a QQuickItem derived type and eliminate the needless wrapping class QmlWebWindowClass : public QmlWindowClass { Q_OBJECT @@ -20,11 +31,29 @@ public: static QScriptValue constructor(QScriptContext* context, QScriptEngine* engine); public slots: + + /**jsdoc + * @function OverlayWebWindow.getURL + * @returns {string} + */ QString getURL(); + /**jsdoc + * @function OverlayWebWindow.setURL + * @param {string} url + */ void setURL(const QString& url); + + /**jsdoc + * @function OverlayWebWindow.getURL + * @param {string} script + */ void setScriptURL(const QString& script); signals: + /**jsdoc + * @function OverlayWebWindow.getURL + * @returns {Signal} + */ void urlChanged(); protected: diff --git a/libraries/ui/src/QmlWindowClass.h b/libraries/ui/src/QmlWindowClass.h index f274501d35..34b4d2f7c0 100644 --- a/libraries/ui/src/QmlWindowClass.h +++ b/libraries/ui/src/QmlWindowClass.h @@ -19,6 +19,18 @@ class QScriptEngine; class QScriptContext; +/**jsdoc + * @class OverlayWindow + * @param {object} [properties=null] + * + * @hifi-interface + * @hifi-client-en + * + * @property {Vec2} position + * @property {Vec2} size + * @property {boolean} visible + */ + // FIXME refactor this class to be a QQuickItem derived type and eliminate the needless wrapping class QmlWindowClass : public QObject { Q_OBJECT @@ -31,46 +43,180 @@ public: QmlWindowClass(); ~QmlWindowClass(); + /**jsdoc + * @function OverlayWindow.initQml + * @param {object} properties + */ Q_INVOKABLE virtual void initQml(QVariantMap properties); + QQuickItem* asQuickItem() const; public slots: + + /**jsdoc + * @function OverlayWindow.isVisible + * @returns {boolean} + */ bool isVisible(); + + /**jsdoc + * @function OverlayWindow.setVisible + * @param {boolean} visible + */ void setVisible(bool visible); + + /**jsdoc + * @function OverlayWindow.getPosition + * @returns {Vec2} + */ glm::vec2 getPosition(); + + /**jsdoc + * @function OverlayWindow.setPosition + * @param {Vec2} position + */ void setPosition(const glm::vec2& position); + + /**jsdoc + * @function OverlayWindow.setPosition + * @param {number} x + * @param {number} y + */ void setPosition(int x, int y); + + /**jsdoc + * @function OverlayWindow.getSize + * @returns {Vec2} + */ glm::vec2 getSize(); + + /**jsdoc + * @function OverlayWindow.setSize + * @param {Vec2} size + */ void setSize(const glm::vec2& size); + + /**jsdoc + * @function OverlayWindow.setSize + * @param {number} width + * @param {number} height + */ void setSize(int width, int height); + + /**jsdoc + * @function OverlayWindow.setTitle + * @param {string} title + */ void setTitle(const QString& title); + + /**jsdoc + * @function OverlayWindow.raise + */ Q_INVOKABLE void raise(); + + /**jsdoc + * @function OverlayWindow.close + */ Q_INVOKABLE void close(); + + /**jsdoc + * @function OverlayWindow.getEventBridge + * @returns {object} + */ Q_INVOKABLE QObject* getEventBridge() { return this; }; + + /**jsdoc + * @function OverlayWindow.sendToQml + * @param {object} message + */ // Scripts can use this to send a message to the QML object void sendToQml(const QVariant& message); + + /**jsdoc + * @function OverlayWindow.clearDebugWindow + */ void clearDebugWindow(); + + /**jsdoc + * @function OverlayWindow.emitScriptEvent + * @param {object} message + */ // QmlWindow content may include WebView requiring EventBridge. void emitScriptEvent(const QVariant& scriptMessage); + + /**jsdoc + * @function OverlayWindow.emitWebEvent + * @param {object} message + */ void emitWebEvent(const QVariant& webMessage); signals: + + /**jsdoc + * @function OverlayWindow.visibleChanged + * @returns {Signal} + */ void visibleChanged(); + + /**jsdoc + * @function OverlayWindow.positionChanged + * @returns {Signal} + */ void positionChanged(); + + /**jsdoc + * @function OverlayWindow.sizeChanged + * @returns {Signal} + */ void sizeChanged(); + + /**jsdoc + * @function OverlayWindow.moved + * @param {Vec2} position + * @returns {Signal} + */ void moved(glm::vec2 position); + + /**jsdoc + * @function OverlayWindow.resized + * @param {Size} size + * @returns {Signal} + */ void resized(QSizeF size); + + /**jsdoc + * @function OverlayWindow.closed + * @returns {Signal} + */ void closed(); + + /**jsdoc + * @function OverlayWindow.fromQml + * @param {object} message + * @returns {Signal} + */ // Scripts can connect to this signal to receive messages from the QML object void fromQml(const QVariant& message); + + /**jsdoc + * @function OverlayWindow.scriptEventReceived + * @param {object} message + * @returns {Signal} + */ // QmlWindow content may include WebView requiring EventBridge. void scriptEventReceived(const QVariant& message); + + /**jsdoc + * @function OverlayWindow.webEventReceived + * @param {object} message + * @returns {Signal} + */ void webEventReceived(const QVariant& message); protected slots: diff --git a/libraries/ui/src/ui/ToolbarScriptingInterface.h b/libraries/ui/src/ui/ToolbarScriptingInterface.h index 108cf6bdd5..4b9bd79fb3 100644 --- a/libraries/ui/src/ui/ToolbarScriptingInterface.h +++ b/libraries/ui/src/ui/ToolbarScriptingInterface.h @@ -19,14 +19,30 @@ class QQuickItem; +/**jsdoc + * @class ToolbarButtonProxy + * + * @hifi-interface + * @hifi-client-entity + */ class ToolbarButtonProxy : public QmlWrapper { Q_OBJECT public: ToolbarButtonProxy(QObject* qmlObject, QObject* parent = nullptr); + + /**jsdoc + * @function ToolbarButtonProxy#editProperties + * @param {object} properties + */ Q_INVOKABLE void editProperties(const QVariantMap& properties); signals: + + /**jsdoc + * @function ToolbarButtonProxy#clicked + * @returns {Signal} + */ void clicked(); protected: @@ -36,19 +52,48 @@ protected: Q_DECLARE_METATYPE(ToolbarButtonProxy*); +/**jsdoc + * @class ToolbarProxy + * + * @hifi-interface + * @hifi-client-entity + */ class ToolbarProxy : public QmlWrapper { Q_OBJECT public: ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr); + + /**jsdoc + * @function ToolbarProxy#addButton + * @property {object} properties + * @returns {ToolbarButtonProxy} + */ Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties); + + /**jsdoc + * @function ToolbarProxy#removeButton + * @property {string} name + */ Q_INVOKABLE void removeButton(const QVariant& name); }; Q_DECLARE_METATYPE(ToolbarProxy*); +/**jsdoc + * @namespace Toolbars + * + * @hifi-interface + * @hifi-client-entity + */ class ToolbarScriptingInterface : public QObject, public Dependency { Q_OBJECT public: + + /**jsdoc + * @function Toolbars.getToolbar + * @param {string} toolbarID + * @returns {ToolbarProxy} + */ Q_INVOKABLE ToolbarProxy* getToolbar(const QString& toolbarId); }; diff --git a/tools/jsdoc/plugins/hifi.js b/tools/jsdoc/plugins/hifi.js index 0a27475593..5d1913ea7a 100644 --- a/tools/jsdoc/plugins/hifi.js +++ b/tools/jsdoc/plugins/hifi.js @@ -20,6 +20,9 @@ exports.handlers = { // directories to scan for jsdoc comments var dirList = [ + '../../assignment-client/src', + '../../assignment-client/src/entities', + '../../assignment-client/src/octree', '../../interface/src', '../../interface/src/assets', '../../interface/src/audio', @@ -41,17 +44,22 @@ exports.handlers = { '../../libraries/controllers/src/controllers/impl/', '../../libraries/display-plugins/src/display-plugins/', '../../libraries/entities/src', + '../../libraries/graphics/src/graphics/', '../../libraries/graphics-scripting/src/graphics-scripting/', '../../libraries/input-plugins/src/input-plugins', + '../../libraries/midi/src', '../../libraries/model-networking/src/model-networking/', '../../libraries/networking/src', '../../libraries/octree/src', '../../libraries/physics/src', + '../../libraries/plugins/src/plugins', '../../libraries/pointers/src', '../../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', '../../plugins/oculus/src', '../../plugins/openvr/src'