Merge pull request #15951 from ctrlaltdavid/DOC-122

DOC-122: LocationBookmarks JSDoc
This commit is contained in:
jennaingersoll 2019-07-23 12:00:03 -07:00 committed by GitHub
commit 1e84b3f4a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View file

@ -52,6 +52,7 @@ protected:
protected slots: protected slots:
/**jsdoc /**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 * @function LocationBookmarks.deleteBookmark
*/ */
virtual void deleteBookmark(); virtual void deleteBookmark();

View file

@ -17,6 +17,9 @@
#include "Bookmarks.h" #include "Bookmarks.h"
/**jsdoc /**jsdoc
* The <code>LocationBookmarks</code> API provides facilities for working with location bookmarks. A location bookmark
* associates a name with a metaverse address.
*
* @namespace LocationBookmarks * @namespace LocationBookmarks
* *
* @hifi-client-entity * @hifi-client-entity
@ -35,28 +38,35 @@ public:
static const QString HOME_BOOKMARK; static const QString HOME_BOOKMARK;
/**jsdoc /**jsdoc
* Gets the metaverse address associated with a bookmark.
* @function LocationBookmarks.getAddress * @function LocationBookmarks.getAddress
* @param {string} bookmarkName Name of the bookmark to get the address for. * @param {string} bookmarkName - Name of the bookmark to get the metaverse address for (case sensitive).
* @returns {string} The url for the specified bookmark. If the bookmark does not exist, the empty string will be returned. * @returns {string} The metaverse address for the bookmark. If the bookmark does not exist, <code>""</code> is returned.
* @example <caption>Report the "Home" bookmark's metaverse address.</caption>
* print("Home bookmark's address: " + LocationBookmarks.getAddress("Home"));
*/ */
Q_INVOKABLE QString getAddress(const QString& bookmarkName); Q_INVOKABLE QString getAddress(const QString& bookmarkName);
public slots: public slots:
/**jsdoc /**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 * @function LocationBookmarks.addBookmark
*/ */
void addBookmark(); void addBookmark();
/**jsdoc /**jsdoc
* Sets the metaverse address associated with the "Home" bookmark.
* @function LocationBookmarks.setHomeLocationToAddress * @function LocationBookmarks.setHomeLocationToAddress
* @param {string} address * @param {string} address - The metaverse address to set the "Home" bookmark to.
*/ */
void setHomeLocationToAddress(const QVariant& address); void setHomeLocationToAddress(const QVariant& address);
/**jsdoc /**jsdoc
* Gets the metaverse address associated with the "Home" bookmark.
* @function LocationBookmarks.getHomeLocationAddress * @function LocationBookmarks.getHomeLocationAddress
* @returns {string} The url for the home location bookmark * @returns {string} The metaverse address for the "Home" bookmark.
*/ */
QString getHomeLocationAddress(); QString getHomeLocationAddress();