Showing the changes to interface/src/scripting/MenuScriptingInterface.h (1 of 3 files). Show all
Unified · Split
| @@ -55,23 +55,23 @@ public slots: · 54 unmodified lines | |||
| 55 | /**jsdoc | 55 | /**jsdoc |
| 56 | * Add a new top-level menu. | 56 | * Add a new top-level menu. |
| 57 | * @function Menu.addMenu | 57 | * @function Menu.addMenu |
| 58 | * @param {string} menuName Name that will be displayed for the menu. | 58 | * @param {String} menuName Name that will be displayed for the menu. |
| 59 | * @param {string} [grouping] Name of the grouping, if any, to add this menu to. | 59 | * @param {String} [grouping] Name of the grouping, if any, to add this menu to. |
| 60 | */ | 60 | */ |
| 61 | void addMenu(const QString& menuName, const QString& grouping = QString()); | 61 | void addMenu(const QString& menuName, const QString& grouping = QString()); |
| 62 | 62 | ||
| 63 | /**jsdoc | 63 | /**jsdoc |
| 64 | * Remove a top-level menu. | 64 | * Remove a top-level menu. |
| 65 | * @function Menu.removeMenu | 65 | * @function Menu.removeMenu |
| 66 | * @param {string} menuName Name of the menu to remove. | 66 | * @param {String} menuName Name of the menu to remove. |
| 67 | */ | 67 | */ |
| 68 | void removeMenu(const QString& menuName); | 68 | void removeMenu(const QString& menuName); |
| 69 | 69 | ||
| 70 | /**jsdoc | 70 | /**jsdoc |
| 71 | * Check whether a top-level menu exists. | 71 | * Check whether a top-level menu exists. |
| 72 | * @function Menu.menuExists | 72 | * @function Menu.menuExists |
| 73 | * @param {string} menuName Name of the menu to check for existence. | 73 | * @param {String} menuName Name of the menu to check for existence. |
| 74 | * @returns {bool} `true` if the menu exists, otherwise `false`. | 74 | * @returns {Boolean} `true` if the menu exists, otherwise `false`. |
| 75 | */ | 75 | */ |
| 76 | bool menuExists(const QString& menuName); | 76 | bool menuExists(const QString& menuName); |
| 77 | 77 | ||
| @@ -79,16 +79,16 @@ public slots: · 1 unmodified line | |||
| 79 | * Add a separator with an unclickable label below it. | 79 | * Add a separator with an unclickable label below it. |
| 80 | * The line will be placed at the bottom of the menu. | 80 | * The line will be placed at the bottom of the menu. |
| 81 | * @function Menu.addSeparator | 81 | * @function Menu.addSeparator |
| 82 | * @param {string} menuName Name of the menu to add a separator to. | 82 | * @param {String} menuName Name of the menu to add a separator to. |
| 83 | * @param {string} separatorName Name of the separator that will be displayed as the label below the separator line. | 83 | * @param {String} separatorName Name of the separator that will be displayed as the label below the separator line. |
| 84 | */ | 84 | */ |
| 85 | void addSeparator(const QString& menuName, const QString& separatorName); | 85 | void addSeparator(const QString& menuName, const QString& separatorName); |
| 86 | 86 | ||
| 87 | /**jsdoc | 87 | /**jsdoc |
| 88 | * Remove a separator from a menu. | 88 | * Remove a separator from a menu. |
| 89 | * @function Menu.removeSeparator | 89 | * @function Menu.removeSeparator |
| 90 | * @param {string} menuName Name of the menu to remove the separator from. | 90 | * @param {String} menuName Name of the menu to remove the separator from. |
| 91 | * @param {string} separatorName Name of the separator to remove. | 91 | * @param {String} separatorName Name of the separator to remove. |
| 92 | */ | 92 | */ |
| 93 | void removeSeparator(const QString& menuName, const QString& separatorName); | 93 | void removeSeparator(const QString& menuName, const QString& separatorName); |
| 94 | 94 | ||
| @@ -102,9 +102,9 @@ public slots: · 7 unmodified lines | |||
| 102 | /**jsdoc | 102 | /**jsdoc |
| 103 | * Add a new menu item to a menu. | 103 | * Add a new menu item to a menu. |
| 104 | * @function Menu.addMenuItem | 104 | * @function Menu.addMenuItem |
| 105 | * @param {string} menuName Name of the menu to add a menu item to. | 105 | * @param {String} menuName Name of the menu to add a menu item to. |
| 106 | * @param {string} menuItem Name of the menu item. This is what will be displayed in the menu. | 106 | * @param {String} menuItem Name of the menu item. This is what will be displayed in the menu. |
| 107 | * @param {string} [shortcutKey] A shortcut key that can be used to trigger the menu item. | 107 | * @param {String} [shortcutKey] A shortcut key that can be used to trigger the menu item. |
| 108 | */ | 108 | */ |
| 109 | void addMenuItem(const QString& menuName, const QString& menuitem, const QString& shortcutKey); | 109 | void addMenuItem(const QString& menuName, const QString& menuitem, const QString& shortcutKey); |
| 110 | void addMenuItem(const QString& menuName, const QString& menuitem); | 110 | void addMenuItem(const QString& menuName, const QString& menuitem); |
| @@ -112,17 +112,17 @@ public slots: · 1 unmodified line | |||
| 112 | /**jsdoc | 112 | /**jsdoc |
| 113 | * Remove a menu item from a menu. | 113 | * Remove a menu item from a menu. |
| 114 | * @function Menu.removeMenuItem | 114 | * @function Menu.removeMenuItem |
| 115 | * @param {string} menuName Name of the menu to remove a menu item from. | 115 | * @param {String} menuName Name of the menu to remove a menu item from. |
| 116 | * @param {string} menuItem Name of the menu item to remove. | 116 | * @param {String} menuItem Name of the menu item to remove. |
| 117 | */ | 117 | */ |
| 118 | void removeMenuItem(const QString& menuName, const QString& menuitem); | 118 | void removeMenuItem(const QString& menuName, const QString& menuitem); |
| 119 | 119 | ||
| 120 | /**jsdoc | 120 | /**jsdoc |
| 121 | * Check if a menu item exists. | 121 | * Check if a menu item exists. |
| 122 | * @function Menu.menuItemExists | 122 | * @function Menu.menuItemExists |
| 123 | * @param {string} menuName Name of the menu that the menu item is in. | 123 | * @param {String} menuName Name of the menu that the menu item is in. |
| 124 | * @param {string} menuItem Name of the menu item to check for existence of. | 124 | * @param {String} menuItem Name of the menu item to check for existence of. |
| 125 | * @returns {bool} `true` if the menu item exists, otherwise `false`. | 125 | * @returns {Boolean} `true` if the menu item exists, otherwise `false`. |
| 126 | */ | 126 | */ |
| 127 | bool menuItemExists(const QString& menuName, const QString& menuitem); | 127 | bool menuItemExists(const QString& menuName, const QString& menuitem); |
| 128 | 128 | ||
| @@ -136,23 +136,23 @@ public slots: · 7 unmodified lines | |||
| 136 | /**jsdoc | 136 | /**jsdoc |
| 137 | * Check whether a checkable menu item is checked. | 137 | * Check whether a checkable menu item is checked. |
| 138 | * @function Menu.isOptionChecked | 138 | * @function Menu.isOptionChecked |
| 139 | * @param {string} menuOption The name of the menu item. | 139 | * @param {String} menuOption The name of the menu item. |
| 140 | * @returns {bool} `true` if the option is checked, otherwise false. | 140 | * @returns {Boolean} `true` if the option is checked, otherwise false. |
| 141 | */ | 141 | */ |
| 142 | bool isOptionChecked(const QString& menuOption); | 142 | bool isOptionChecked(const QString& menuOption); |
| 143 | 143 | ||
| 144 | /**jsdoc | 144 | /**jsdoc |
| 145 | * Set a checkable menu item as checked or unchecked. | 145 | * Set a checkable menu item as checked or unchecked. |
| 146 | * @function Menu.setIsOptionChecked | 146 | * @function Menu.setIsOptionChecked |
| 147 | * @param {string} menuOption The name of the menu item to modify. | 147 | * @param {String} menuOption The name of the menu item to modify. |
| 148 | * @param {bool} isChecked If `true`, the menu item will be checked, otherwise it will not be checked. | 148 | * @param {Boolean} isChecked If `true`, the menu item will be checked, otherwise it will not be checked. |
| 149 | */ | 149 | */ |
| 150 | void setIsOptionChecked(const QString& menuOption, bool isChecked); | 150 | void setIsOptionChecked(const QString& menuOption, bool isChecked); |
| 151 | 151 | ||
| 152 | /**jsdoc | 152 | /**jsdoc |
| 153 | * Trigger the menu item as if the user clicked on it. | 153 | * Trigger the menu item as if the user clicked on it. |
| 154 | * @function Menu.triggerOption | 154 | * @function Menu.triggerOption |
| 155 | * @param {string} menuOption The name of the menu item to trigger. | 155 | * @param {String} menuOption The name of the menu item to trigger. |
| 156 | */ | 156 | */ |
| 157 | void triggerOption(const QString& menuOption); | 157 | void triggerOption(const QString& menuOption); |
| 158 | 158 | ||
| @@ -160,16 +160,16 @@ public slots: · 1 unmodified line | |||
| 160 | * Check whether a menu is enabled. If a menu is disabled it is grayed out and unusable. | 160 | * Check whether a menu is enabled. If a menu is disabled it is grayed out and unusable. |
| 161 | * Menus are enabled by default. | 161 | * Menus are enabled by default. |
| 162 | * @function Menu.isMenuEnabled | 162 | * @function Menu.isMenuEnabled |
| 163 | * @param {string} menuName The name of the menu to check. | 163 | * @param {String} menuName The name of the menu to check. |
| 164 | * @returns {bool} `true` if the menu is enabled, otherwise false. | 164 | * @returns {Boolean} `true` if the menu is enabled, otherwise false. |
| 165 | */ | 165 | */ |
| 166 | bool isMenuEnabled(const QString& menuName); | 166 | bool isMenuEnabled(const QString& menuName); |
| 167 | 167 | ||
| 168 | /**jsdoc | 168 | /**jsdoc |
| 169 | * Set a menu to be enabled or disabled. If a menu is disabled it is grayed out and unusable. | 169 | * Set a menu to be enabled or disabled. If a menu is disabled it is grayed out and unusable. |
| 170 | * @function Menu.setMenuEnabled | 170 | * @function Menu.setMenuEnabled |
| 171 | * @param {string} menuName The name of the menu to modify. | 171 | * @param {String} menuName The name of the menu to modify. |
| 172 | * @param {bool} isEnabled Whether the menu will be enabled or not. | 172 | * @param {Boolean} isEnabled Whether the menu will be enabled or not. |
| 173 | */ | 173 | */ |
| 174 | void setMenuEnabled(const QString& menuName, bool isEnabled); | 174 | void setMenuEnabled(const QString& menuName, bool isEnabled); |
| 175 | 175 | ||
| @@ -183,7 +183,7 @@ signals: · 7 unmodified lines | |||
| 183 | /**jsdoc | 183 | /**jsdoc |
| 184 | * Notifies scripts when a menu item is clicked (or triggered by {@link Menu.triggerOption}). | 184 | * Notifies scripts when a menu item is clicked (or triggered by {@link Menu.triggerOption}). |
| 185 | * @function Menu.menuItemEvent | 185 | * @function Menu.menuItemEvent |
| 186 | * @param {string} menuItem Name of the menu item that was clicked. | 186 | * @param {String} menuItem Name of the menu item that was clicked. |
| 187 | * @returns {Signal} | 187 | * @returns {Signal} |
| 188 | */ | 188 | */ |
| 189 | void menuItemEvent(const QString& menuItem); | 189 | void menuItemEvent(const QString& menuItem); |