Doc review

This commit is contained in:
David Rowe 2019-04-27 10:20:35 +12:00
parent 311826c04d
commit fbe49bbfd4
2 changed files with 9 additions and 8 deletions

View file

@ -26,7 +26,7 @@ class MenuItemProperties;
* <p>A "grouping" provides a way to group a set of menus or menu items together so that they can all be set visible or invisible * <p>A "grouping" provides a way to group a set of menus or menu items together so that they can all be set visible or invisible
* as a group.</p> There is currently only one available group: <code>"Developer"</code>. This grouping can be toggled in the * as a group.</p> There is currently only one available group: <code>"Developer"</code>. This grouping can be toggled in the
* "Settings" menu.</p> * "Settings" menu.</p>
* <p>If a menu item doesn't belong to a group it is always displayed.</p> * <p>If a menu item doesn't belong to a group, it is always displayed.</p>
* *
* @namespace Menu * @namespace Menu
* *
@ -85,7 +85,7 @@ public slots:
/**jsdoc /**jsdoc
* Checks whether a top-level menu exists. * Checks whether a top-level menu exists.
* @function Menu.menuExists * @function Menu.menuExists
* @param {string} menuName - Name of the menu to check for existence. * @param {string} menuName - Name of the menu to check exists.
* @returns {boolean} <code>true</code> if the menu exists, otherwise <code>false</code>. * @returns {boolean} <code>true</code> if the menu exists, otherwise <code>false</code>.
* @example <caption>Check if the "Developer" menu exists.</caption> * @example <caption>Check if the "Developer" menu exists.</caption>
* if (Menu.menuExists("Developer")) { * if (Menu.menuExists("Developer")) {
@ -98,7 +98,7 @@ public slots:
* Adds a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. To add a * Adds a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. To add a
* separator at a specific point in the menu, use {@link Menu.addMenuItem} with {@link Menu.MenuItemProperties} instead. * separator at a specific point in the menu, use {@link Menu.addMenuItem} with {@link Menu.MenuItemProperties} instead.
* @function Menu.addSeparator * @function Menu.addSeparator
* @param {string} menuName - Name of the menu to add a separator to. * @param {string} menuName - Name of the menu to add the separator to.
* @param {string} separatorName - Name of the separator that will be displayed as the label below the separator line. * @param {string} separatorName - Name of the separator that will be displayed as the label below the separator line.
* @example <caption>Add a separator.</caption> * @example <caption>Add a separator.</caption>
* Menu.addSeparator("Developer", "Test Separator"); * Menu.addSeparator("Developer", "Test Separator");
@ -119,7 +119,7 @@ public slots:
* Adds a new menu item to a menu. The menu item is specified using {@link Menu.MenuItemProperties}. * Adds a new menu item to a menu. The menu item is specified using {@link Menu.MenuItemProperties}.
* @function Menu.addMenuItem * @function Menu.addMenuItem
* @param {Menu.MenuItemProperties} properties - Properties of the menu item to create. * @param {Menu.MenuItemProperties} properties - Properties of the menu item to create.
* @example <caption>Add a menu item at a particular position in the "Develope"r menu.</caption> * @example <caption>Add a menu item at a particular position in the "Developer" menu.</caption>
* Menu.addMenuItem({ * Menu.addMenuItem({
* menuName: "Developer", * menuName: "Developer",
* menuItemName: "Test", * menuItemName: "Test",
@ -133,7 +133,7 @@ public slots:
* Adds a new menu item to a menu. The new item is added at the end of the menu. * Adds a new menu item to a menu. The new item is added at the end of the menu.
* @function Menu.addMenuItem * @function Menu.addMenuItem
* @variation 0 * @variation 0
* @param {string} menuName - Name of the menu to add a menu item to. * @param {string} menuName - Name of the menu to add the menu item to.
* @param {string} menuItem - Name of the menu item. This is what will be displayed in the menu. * @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} [shortcutKey] A shortcut key that can be used to trigger the menu item.
* @example <caption>Add a menu item to the end of the "Developer" menu.</caption> * @example <caption>Add a menu item to the end of the "Developer" menu.</caption>
@ -147,6 +147,7 @@ public slots:
* @function Menu.removeMenuItem * @function Menu.removeMenuItem
* @param {string} menuName - Name of the menu to remove a menu item from. * @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} menuItem - Name of the menu item to remove.
* @example <caption>Remove a menu item from the "Developer" menu.</caption>
* Menu.removeMenuItem("Developer", "Test"); * Menu.removeMenuItem("Developer", "Test");
*/ */
void removeMenuItem(const QString& menuName, const QString& menuitem); void removeMenuItem(const QString& menuName, const QString& menuitem);

View file

@ -53,11 +53,11 @@ QScriptValue menuItemPropertiesToScriptValue(QScriptEngine* engine, const MenuIt
/**jsdoc /**jsdoc
* A set of properties that can be passed to {@link Menu.addMenuItem} to create a new menu item. * A set of properties that can be passed to {@link Menu.addMenuItem} to create a new menu item.
* *
* If none of <code>position</code>, <code>beforeItem</code>, <code>afterItem</code>, or <code>grouping</code> are specified, * If none of the properties, <code>position</code>, <code>beforeItem</code>, <code>afterItem</code>, or <code>grouping</code>
* the menu item will be placed at the end of the menu. * are specified, the menu item will be placed at the end of the menu.
* *
* @typedef {object} Menu.MenuItemProperties * @typedef {object} Menu.MenuItemProperties
* @property {string} menuName - Name of the menu. Nested menus can be described using the ">" symbol. * @property {string} menuName - Name of the menu. Nested menus can be described using the ">" character.
* @property {string} menuItemName - Name of the menu item. * @property {string} menuItemName - Name of the menu item.
* @property {boolean} [isCheckable=false] - Whether or not the menu item is checkable. * @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} [isChecked=false] - Whether or not the menu item is checked.