From c2b67f28d0251675129481edc2d8c8dbc5ac5cef Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 19 Jul 2019 11:35:06 +1200 Subject: [PATCH] LocationBookmarks JSDoc --- interface/src/Bookmarks.h | 1 + interface/src/LocationBookmarks.h | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/interface/src/Bookmarks.h b/interface/src/Bookmarks.h index c31aee6e33..a5b8254e53 100644 --- a/interface/src/Bookmarks.h +++ b/interface/src/Bookmarks.h @@ -52,6 +52,7 @@ protected: protected slots: /**jsdoc + * Prompts the user to delete a bookmark: the user can select the bookmark to delete in the dialog that is opened. * @function LocationBookmarks.deleteBookmark */ virtual void deleteBookmark(); diff --git a/interface/src/LocationBookmarks.h b/interface/src/LocationBookmarks.h index eebaf2f383..bf6d09889b 100644 --- a/interface/src/LocationBookmarks.h +++ b/interface/src/LocationBookmarks.h @@ -17,6 +17,9 @@ #include "Bookmarks.h" /**jsdoc + * The LocationBookmarks API provides facilities for working with location bookmarks. A location bookmark + * associates a name with a metaverse address. + * * @namespace LocationBookmarks * * @hifi-client-entity @@ -35,28 +38,35 @@ public: static const QString HOME_BOOKMARK; /**jsdoc + * Gets the metaverse address associated with a bookmark. * @function LocationBookmarks.getAddress - * @param {string} bookmarkName Name of the bookmark to get the address for. - * @returns {string} The url for the specified bookmark. If the bookmark does not exist, the empty string will be returned. + * @param {string} bookmarkName - Name of the bookmark to get the metaverse address for. {Case sensitive.) + * @returns {string} The metaverse address for the bookmark. If the bookmark does not exist, "" is returned. + * @example Report the "Home" bookmark's metaverse address. + * print("Home bookmark's address: " + LocationBookmarks.getAddress("Home")); */ Q_INVOKABLE QString getAddress(const QString& bookmarkName); public slots: /**jsdoc + * Prompts the user to bookmark their current location: the user can specify the name of the bookmark in the dialog that is + * opened. * @function LocationBookmarks.addBookmark */ void addBookmark(); /**jsdoc + * Sets the metaverse address associated with the "Home" bookmark. * @function LocationBookmarks.setHomeLocationToAddress - * @param {string} address + * @param {string} address - The metaverse address to set the "Home" bookmark to. */ void setHomeLocationToAddress(const QVariant& address); /**jsdoc + * Gets the metaverse address associated with the "Home" bookmark. * @function LocationBookmarks.getHomeLocationAddress - * @returns {string} The url for the home location bookmark + * @returns {string} The metaverse address for the "Home" bookmark. */ QString getHomeLocationAddress();