mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-13 07:55:15 +02:00
Tidying
This commit is contained in:
parent
39ccd7d656
commit
9d9f684af5
4 changed files with 60 additions and 59 deletions
|
@ -38,7 +38,7 @@ public:
|
|||
/**jsdoc
|
||||
* Compute the largest dimension of the extents of the contents held in the clipboard.
|
||||
* @function Clipboard.getClipboardContentsLargestDimension
|
||||
* @returns {Number} The largest dimension computed.
|
||||
* @returns {number} The largest dimension computed.
|
||||
*/
|
||||
Q_INVOKABLE float getClipboardContentsLargestDimension();
|
||||
|
||||
|
@ -46,29 +46,29 @@ public:
|
|||
* Import entities from a JSON file containing entity data into the clipboard.
|
||||
* You can generate a JSON file using {@link Clipboard.exportEntities}.
|
||||
* @function Clipboard.importEntities
|
||||
* @param {String} filename Path and name of file to import.
|
||||
* @returns {Boolean} <code>true</code> if the import was successful, otherwise <code>false</code>.
|
||||
* @param {string} filename Path and name of file to import.
|
||||
* @returns {boolean} <code>true</code> if the import was successful, otherwise <code>false</code>.
|
||||
*/
|
||||
Q_INVOKABLE bool importEntities(const QString& filename);
|
||||
|
||||
/**jsdoc
|
||||
* Export the entities specified to a JSON file.
|
||||
* @function Clipboard.exportEntities
|
||||
* @param {String} filename Path and name of the file to export the entities to. Should have the extension ".json".
|
||||
* @param {EntityID[]} entityIDs Array of IDs of the entities to export.
|
||||
* @returns {Boolean} <code>true</code> if the export was successful, otherwise <code>false</code>.
|
||||
* @param {string} filename Path and name of the file to export the entities to. Should have the extension ".json".
|
||||
* @param {Uuid[]} entityIDs Array of IDs of the entities to export.
|
||||
* @returns {boolean} <code>true</code> if the export was successful, otherwise <code>false</code>.
|
||||
*/
|
||||
Q_INVOKABLE bool exportEntities(const QString& filename, const QVector<EntityItemID>& entityIDs);
|
||||
|
||||
/**jsdoc
|
||||
* Export the entities with centers within a cube to a JSON file.
|
||||
* @function Clipboard.exportEntities
|
||||
* @param {String} filename Path and name of the file to export the entities to. Should have the extension ".json".
|
||||
* @param {Number} x X-coordinate of the cube center.
|
||||
* @param {Number} y Y-coordinate of the cube center.
|
||||
* @param {Number} z Z-coordinate of the cube center.
|
||||
* @param {Number} scale Half dimension of the cube.
|
||||
* @returns {Boolean} <code>true</code> if the export was successful, otherwise <code>false</code>.
|
||||
* @param {string} filename Path and name of the file to export the entities to. Should have the extension ".json".
|
||||
* @param {number} x X-coordinate of the cube center.
|
||||
* @param {number} y Y-coordinate of the cube center.
|
||||
* @param {number} z Z-coordinate of the cube center.
|
||||
* @param {number} scale Half dimension of the cube.
|
||||
* @returns {boolean} <code>true</code> if the export was successful, otherwise <code>false</code>.
|
||||
*/
|
||||
Q_INVOKABLE bool exportEntities(const QString& filename, float x, float y, float z, float scale);
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
* Paste the contents of the clipboard into the world.
|
||||
* @function Clipboard.pasteEntities
|
||||
* @param {Vec3} position Position to paste the clipboard contents at.
|
||||
* @returns {EntityID[]} Array of entity IDs for the new entities that were created as a result of the paste operation.
|
||||
* @returns {Uuid[]} Array of entity IDs for the new entities that were created as a result of the paste operation.
|
||||
*/
|
||||
Q_INVOKABLE QVector<EntityItemID> pasteEntities(glm::vec3 position);
|
||||
};
|
||||
|
|
|
@ -21,6 +21,8 @@ class MenuItemProperties;
|
|||
* The Menu API provides access to the menu that is displayed at the top of the window
|
||||
* on a user's desktop and in the tablet when the "MENU" button is pressed.
|
||||
*
|
||||
* <p />
|
||||
*
|
||||
* <h3>Groupings</h3>
|
||||
*
|
||||
* A "grouping" provides a way to group a set of menus or menu items together so
|
||||
|
@ -39,9 +41,8 @@ class MenuItemProperties;
|
|||
* menuItemName: "Demo Item"
|
||||
* });
|
||||
*
|
||||
* function onMenuItemEvent(menuItem)
|
||||
* {
|
||||
* if(menuItem == "Demo Item") {
|
||||
* function onMenuItemEvent(menuItem) {
|
||||
* if(menuItem === "Demo Item") {
|
||||
* print("Nice! You clicked the demo menu item.");
|
||||
* }
|
||||
* }
|
||||
|
@ -73,8 +74,8 @@ public slots:
|
|||
/**jsdoc
|
||||
* Add a new top-level menu.
|
||||
* @function Menu.addMenu
|
||||
* @param {String} menuName Name that will be displayed for the menu. Nested menus can be described using the ">" symbol.
|
||||
* @param {String} [grouping] Name of the grouping, if any, to add this menu to.
|
||||
* @param {string} menuName Name that will be displayed for the menu. Nested menus can be described using the ">" symbol.
|
||||
* @param {string} [grouping] Name of the grouping, if any, to add this menu to.
|
||||
* @example
|
||||
* Menu.addMenu("Test Menu");
|
||||
* Menu.addMenu("Test Menu > Test Sub Menu");
|
||||
|
@ -84,7 +85,7 @@ public slots:
|
|||
/**jsdoc
|
||||
* Remove a top-level menu.
|
||||
* @function Menu.removeMenu
|
||||
* @param {String} menuName Name of the menu to remove.
|
||||
* @param {string} menuName Name of the menu to remove.
|
||||
* @example
|
||||
* Menu.removeMenu("Test Menu > Test Sub Menu");
|
||||
* Menu.removeMenu("Test Menu");
|
||||
|
@ -94,8 +95,8 @@ public slots:
|
|||
/**jsdoc
|
||||
* Check whether a top-level menu exists.
|
||||
* @function Menu.menuExists
|
||||
* @param {String} menuName Name of the menu to check for existence.
|
||||
* @returns {Boolean} <code>true</code> if the menu exists, otherwise <code>false</code>.
|
||||
* @param {string} menuName - Name of the menu to check for existence.
|
||||
* @returns {boolean} <code>true</code> if the menu exists, otherwise <code>false</code>.
|
||||
* @example
|
||||
* if (Menu.menuExists("Developer")) {
|
||||
* // Perform a task if there is a Developer menu.
|
||||
|
@ -107,8 +108,8 @@ public slots:
|
|||
* Add a separator with an unclickable label below it.
|
||||
* The line will be placed at the bottom of the menu.
|
||||
* @function Menu.addSeparator
|
||||
* @param {String} menuName Name of the menu to add a separator to.
|
||||
* @param {String} separatorName Name of the separator that will be displayed as the label below the separator line.
|
||||
* @param {string} menuName Name of the menu to add a separator to.
|
||||
* @param {string} separatorName Name of the separator that will be displayed as the label below the separator line.
|
||||
* @example
|
||||
* Menu.addSeparator("Developer","Test Separator");
|
||||
*/
|
||||
|
@ -117,8 +118,8 @@ public slots:
|
|||
/**jsdoc
|
||||
* Remove a separator from a menu.
|
||||
* @function Menu.removeSeparator
|
||||
* @param {String} menuName Name of the menu to remove the separator from.
|
||||
* @param {String} separatorName Name of the separator to remove.
|
||||
* @param {string} menuName Name of the menu to remove the separator from.
|
||||
* @param {string} separatorName Name of the separator to remove.
|
||||
* @example
|
||||
* Menu.removeSeparator("Developer","Test Separator");
|
||||
*/
|
||||
|
@ -142,9 +143,9 @@ public slots:
|
|||
/**jsdoc
|
||||
* Add a new menu item to a menu.
|
||||
* @function Menu.addMenuItem
|
||||
* @param {String} menuName Name of the menu to add a menu item to.
|
||||
* @param {String} menuItem Name of the menu item. This is what will be displayed in the menu.
|
||||
* @param {String} [shortcutKey] A shortcut key that can be used to trigger the menu item.
|
||||
* @param {string} menuName Name of the menu to add a menu item to.
|
||||
* @param {string} menuItem Name of the menu item. This is what will be displayed in the menu.
|
||||
* @param {string} [shortcutKey] A shortcut key that can be used to trigger the menu item.
|
||||
* @example
|
||||
* Menu.addMenuItem("Developer", "Test", "Ctrl+Shift+T");
|
||||
*/
|
||||
|
@ -154,8 +155,8 @@ public slots:
|
|||
/**jsdoc
|
||||
* Remove a menu item from a menu.
|
||||
* @function Menu.removeMenuItem
|
||||
* @param {String} menuName Name of the menu to remove a menu item from.
|
||||
* @param {String} menuItem Name of the menu item to remove.
|
||||
* @param {string} menuName Name of the menu to remove a menu item from.
|
||||
* @param {string} menuItem Name of the menu item to remove.
|
||||
* Menu.removeMenuItem("Developer", "Test");
|
||||
*/
|
||||
void removeMenuItem(const QString& menuName, const QString& menuitem);
|
||||
|
@ -163,9 +164,9 @@ public slots:
|
|||
/**jsdoc
|
||||
* Check if a menu item exists.
|
||||
* @function Menu.menuItemExists
|
||||
* @param {String} menuName Name of the menu that the menu item is in.
|
||||
* @param {String} menuItem Name of the menu item to check for existence of.
|
||||
* @returns {Boolean} <code>true</code> if the menu item exists, otherwise <code>false</code>.
|
||||
* @param {string} menuName Name of the menu that the menu item is in.
|
||||
* @param {string} menuItem Name of the menu item to check for existence of.
|
||||
* @returns {boolean} <code>true</code> if the menu item exists, otherwise <code>false</code>.
|
||||
* @example
|
||||
* if (Menu.menuItemExists("Developer", "Stats")) {
|
||||
* // Perform a task if there is a Stats item in the Developer menu.
|
||||
|
@ -183,23 +184,23 @@ public slots:
|
|||
/**jsdoc
|
||||
* Check whether a checkable menu item is checked.
|
||||
* @function Menu.isOptionChecked
|
||||
* @param {String} menuOption The name of the menu item.
|
||||
* @returns {Boolean} <code>true</code> if the option is checked, otherwise false.
|
||||
* @param {string} menuOption The name of the menu item.
|
||||
* @returns {boolean} <code>true</code> if the option is checked, otherwise false.
|
||||
*/
|
||||
bool isOptionChecked(const QString& menuOption);
|
||||
|
||||
/**jsdoc
|
||||
* Set a checkable menu item as checked or unchecked.
|
||||
* @function Menu.setIsOptionChecked
|
||||
* @param {String} menuOption The name of the menu item to modify.
|
||||
* @param {Boolean} isChecked If <code>true</code>, the menu item will be checked, otherwise it will not be checked.
|
||||
* @param {string} menuOption The name of the menu item to modify.
|
||||
* @param {boolean} isChecked If <code>true</code>, the menu item will be checked, otherwise it will not be checked.
|
||||
*/
|
||||
void setIsOptionChecked(const QString& menuOption, bool isChecked);
|
||||
|
||||
/**jsdoc
|
||||
* Trigger the menu item as if the user clicked on it.
|
||||
* @function Menu.triggerOption
|
||||
* @param {String} menuOption The name of the menu item to trigger.
|
||||
* @param {string} menuOption The name of the menu item to trigger.
|
||||
*/
|
||||
void triggerOption(const QString& menuOption);
|
||||
|
||||
|
@ -207,16 +208,16 @@ public slots:
|
|||
* Check whether a menu is enabled. If a menu is disabled it is grayed out and unusable.
|
||||
* Menus are enabled by default.
|
||||
* @function Menu.isMenuEnabled
|
||||
* @param {String} menuName The name of the menu to check.
|
||||
* @returns {Boolean} <code>true</code> if the menu is enabled, otherwise false.
|
||||
* @param {string} menuName The name of the menu to check.
|
||||
* @returns {boolean} <code>true</code> if the menu is enabled, otherwise false.
|
||||
*/
|
||||
bool isMenuEnabled(const QString& menuName);
|
||||
|
||||
/**jsdoc
|
||||
* Set a menu to be enabled or disabled. If a menu is disabled it is grayed out and unusable.
|
||||
* @function Menu.setMenuEnabled
|
||||
* @param {String} menuName The name of the menu to modify.
|
||||
* @param {Boolean} isEnabled If <code>true</code>, the menu will be enabled, otherwise it will be disabled.
|
||||
* @param {string} menuName The name of the menu to modify.
|
||||
* @param {boolean} isEnabled If <code>true</code>, the menu will be enabled, otherwise it will be disabled.
|
||||
*/
|
||||
void setMenuEnabled(const QString& menuName, bool isEnabled);
|
||||
|
||||
|
@ -228,9 +229,9 @@ public slots:
|
|||
|
||||
signals:
|
||||
/**jsdoc
|
||||
* Notifies scripts when a menu item is clicked (or triggered by {@link Menu.triggerOption}).
|
||||
* Triggered when a menu item is clicked (or triggered by {@link Menu.triggerOption}).
|
||||
* @function Menu.menuItemEvent
|
||||
* @param {String} menuItem Name of the menu item that was clicked.
|
||||
* @param {string} menuItem Name of the menu item that was clicked.
|
||||
* @returns {Signal}
|
||||
* @example
|
||||
* function onMenuItemEvent(menuItem) {
|
||||
|
|
|
@ -57,18 +57,18 @@ QScriptValue menuItemPropertiesToScriptValue(QScriptEngine* engine, const MenuIt
|
|||
* the menu item will be placed at the end of the menu.
|
||||
*
|
||||
* @typedef {Object} Menu.MenuItemProperties
|
||||
* @property {String} menuName Name of the menu. Nested menus can be described using the ">" symbol.
|
||||
* @property {String} menuItemName Name of the menu item.
|
||||
* @property {Boolean} [isCheckable=false] Whether or not the menu item is checkable.
|
||||
* @property {Boolean} [isChecked=false] Whether or not the menu item is checked.
|
||||
* @property {Boolean} [isSeparator=false] Whether or not the menu item is a separator.
|
||||
* @property {String} [shortcutKey] A shortcut key that triggers the menu item.
|
||||
* @property {string} menuName Name of the menu. Nested menus can be described using the ">" symbol.
|
||||
* @property {string} menuItemName Name of the menu item.
|
||||
* @property {boolean} [isCheckable=false] Whether or not the menu item is checkable.
|
||||
* @property {boolean} [isChecked=false] Whether or not the menu item is checked.
|
||||
* @property {boolean} [isSeparator=false] Whether or not the menu item is a separator.
|
||||
* @property {string} [shortcutKey] A shortcut key that triggers the menu item.
|
||||
* @property {KeyEvent} [shortcutKeyEvent] A {@link KeyEvent} that specifies a key that triggers the menu item.
|
||||
* @property {Number} [position] The position to place the new menu item. An integer number with <code>0</code> being the first
|
||||
* @property {number} [position] The position to place the new menu item. An integer number with <code>0</code> being the first
|
||||
* menu item.
|
||||
* @property {String} [beforeItem] The name of the menu item to place this menu item before.
|
||||
* @property {String} [afterItem] The name of the menu item to place this menu item after.
|
||||
* @property {String} [grouping] The name of grouping to add this menu item to.
|
||||
* @property {string} [beforeItem] The name of the menu item to place this menu item before.
|
||||
* @property {string} [afterItem] The name of the menu item to place this menu item after.
|
||||
* @property {string} [grouping] The name of grouping to add this menu item to.
|
||||
*/
|
||||
void menuItemPropertiesFromScriptValue(const QScriptValue& object, MenuItemProperties& properties) {
|
||||
properties.menuName = object.property("menuName").toVariant().toString();
|
||||
|
|
|
@ -95,7 +95,7 @@ class Camera : public QObject {
|
|||
* @property position {Vec3} The position of the camera. You can set this value only when the camera is in entity mode.
|
||||
* @property orientation {Quat} The orientation of the camera. You can set this value only when the camera is in entity
|
||||
* mode.
|
||||
* @property mode {String} The camera mode.
|
||||
* @property mode {string} The camera mode.
|
||||
* @property frustum {Frustum} The camera frustum.
|
||||
* @property cameraEntity {Uuid} The ID of the entity that is used for the camera position and orientation when the camera
|
||||
* is in entity mode.
|
||||
|
@ -130,14 +130,14 @@ public slots:
|
|||
/**jsdoc
|
||||
* Get the current camera mode. You can also get the mode using the <code>Camera.mode</code> property.
|
||||
* @function Camera.getModeString
|
||||
* @return {String} The current camera mode.
|
||||
* @return {string} The current camera mode.
|
||||
*/
|
||||
QString getModeString() const;
|
||||
|
||||
/**jsdoc
|
||||
* Set the camera mode. You can also set the mode using the <code>Camera.mode</code> property.
|
||||
* @function Camera.setModeString
|
||||
* @param {String} mode - The mode to set the camera to.
|
||||
* @param {string} mode - The mode to set the camera to.
|
||||
*/
|
||||
void setModeString(const QString& mode);
|
||||
|
||||
|
@ -175,8 +175,8 @@ public slots:
|
|||
* Compute a {PickRay} based on the current camera configuration and the specified <code>x, y</code> position on the screen.
|
||||
* The {PickRay} can be used in functions such as {Entities.findRayIntersection} and {Overlays.findRayIntersection}.
|
||||
* @function Camera.computePickRay
|
||||
* @param {Number} x - X-coordinate on screen.
|
||||
* @param {Number} y - Y-coordinate on screen.
|
||||
* @param {number} x - X-coordinate on screen.
|
||||
* @param {number} y - Y-coordinate on screen.
|
||||
* @return {PickRay} The computed {PickRay}.
|
||||
* @example
|
||||
* function onMousePressEvent(event) {
|
||||
|
|
Loading…
Reference in a new issue