History

Miscellaneous fixes

David Rowe committed 8 years ago

Commit b8063841 parent 08dc9b12 files · +35 −35Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.h (1 of 2 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.h+33−33
@@ -87,7 +87,7 @@ public slots: · 86 unmodified lines
8787 * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without
8888 * waiting for a user response.
8989 * @function Window.alert
90− * @param {string} message="" - The message to display.
90+ * @param {string} [message=""] - The message to display.
9191 * @example <caption>Display a friendly greeting.</caption>
9292 * Window.alert("Welcome!");
9393 * print("Script continues without waiting");
@@ -98,7 +98,7 @@ public slots: · 4 unmodified lines
9898 * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons.
9999 * responds.
100100 * @function Window.confirm
101− * @param {string} message="" - The question to display.
101+ * @param {string} [message=""] - The question to display.
102102 * @returns {boolean} <code>true</code> if the user selects "Yes", otherwise <code>false</code>.
103103 * @example <caption>Ask the user a question requiring a yes/no answer.</caption>
104104 * var answer = Window.confirm("Are you sure?");
@@ -128,8 +128,8 @@ public slots: · 23 unmodified lines
128128 * buttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal
129129 * is emitted if the user cancels the dialog.
130130 * @function Window.promptAsync
131− * @param {string} message - The question to display.
132− * @param {string} defaultText - The default answer text.
131+ * @param {string} [message=""] - The question to display.
132+ * @param {string} [defaultText=""] - The default answer text.
133133 * @example <caption>Ask the user a question requiring a text answer without waiting for the answer.</caption>
134134 * function onPromptTextChanged(text) {
135135 * print("User answer: " + text);
@@ -144,8 +144,8 @@ public slots: · 8 unmodified lines
144144 /**jsdoc
145145 * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree.
146146 * @function Window.browseDir
147− * @param {string} title="" - The title to display at the top of the dialog.
148− * @param {string} directory="" - The initial directory to start browsing at.
147+ * @param {string} [title=""] - The title to display at the top of the dialog.
148+ * @param {string} [directory=""] - The initial directory to start browsing at.
149149 * @returns {string} The path of the directory if one is chosen, otherwise <code>null</code>.
150150 * @example <caption>Ask the user to choose a directory.</caption>
151151 * var directory = Window.browseDir("Select Directory", Paths.resources);
@@ -158,8 +158,8 @@ public slots: · 6 unmodified lines
158158 * {@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if
159159 * the user cancels the dialog.
160160 * @function Window.browseDirAsync
161− * @param {string} title="" - The title to display at the top of the dialog.
162− * @param {string} directory="" - The initial directory to start browsing at.
161+ * @param {string} [title=""] - The title to display at the top of the dialog.
162+ * @param {string} [directory=""] - The initial directory to start browsing at.
163163 * @example <caption>Ask the user to choose a directory without waiting for the answer.</caption>
164164 * function onBrowseDirChanged(directory) {
165165 * print("Directory: " + directory);
@@ -174,9 +174,9 @@ public slots: · 8 unmodified lines
174174 /**jsdoc
175175 * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree.
176176 * @function Window.browse
177− * @param {string} title="" - The title to display at the top of the dialog.
178− * @param {string} directory="" - The initial directory to start browsing at.
179− * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and
177+ * @param {string} [title=""] - The title to display at the top of the dialog.
178+ * @param {string} [directory=""] - The initial directory to start browsing at.
179+ * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
180180 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
181181 * @returns {string} The path and name of the file if one is chosen, otherwise <code>null</code>.
182182 * @example <caption>Ask the user to choose an image file.</caption>
@@ -190,9 +190,9 @@ public slots: · 7 unmodified lines
190190 * {@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user
191191 * cancels the dialog.
192192 * @function Window.browseAsync
193− * @param {string} title="" - The title to display at the top of the dialog.
194− * @param {string} directory="" - The initial directory to start browsing at.
195− * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and
193+ * @param {string} [title=""] - The title to display at the top of the dialog.
194+ * @param {string} [directory=""] - The initial directory to start browsing at.
195+ * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
196196 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
197197 * @example <caption>Ask the user to choose an image file without waiting for the answer.</caption>
198198 * function onBrowseChanged(filename) {
@@ -209,9 +209,9 @@ public slots: · 10 unmodified lines
209209 * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory
210210 * tree and allows the user to type in a file name.
211211 * @function Window.save
212− * @param {string} title="" - The title to display at the top of the dialog.
213− * @param {string} directory="" - The initial directory to start browsing at.
214− * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and
212+ * @param {string} [title=""] - The title to display at the top of the dialog.
213+ * @param {string} [directory=""] - The initial directory to start browsing at.
214+ * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
215215 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
216216 * @returns {string} The path and name of the file if one is specified, otherwise <code>null</code>. If a single file type
217217 * is specified in the nameFilter, that file type extension is automatically appended to the result when appropriate.
@@ -226,9 +226,9 @@ public slots: · 8 unmodified lines
226226 * directory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is
227227 * emitted when a file is specified; no signal is emitted if the user cancels the dialog.
228228 * @function Window.saveAsync
229− * @param {string} title="" - The title to display at the top of the dialog.
230− * @param {string} directory="" - The initial directory to start browsing at.
231− * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and
229+ * @param {string} [title=""] - The title to display at the top of the dialog.
230+ * @param {string} [directory=""] - The initial directory to start browsing at.
231+ * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
232232 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
233233 * @example <caption>Ask the user to specify a file to save to without waiting for an answer.</caption>
234234 * function onSaveFileChanged(filename) {
@@ -245,9 +245,9 @@ public slots: · 10 unmodified lines
245245 * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset
246246 * Server.
247247 * @function Window.browseAssets
248− * @param {string} title="" - The title to display at the top of the dialog.
249− * @param {string} directory="" - The initial directory to start browsing at.
250− * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and
248+ * @param {string} [title=""] - The title to display at the top of the dialog.
249+ * @param {string} [directory=""] - The initial directory to start browsing at.
250+ * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
251251 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
252252 * @returns {string} The path and name of the asset if one is chosen, otherwise <code>null</code>.
253253 * @example <caption>Ask the user to select an FBX asset.</caption>
@@ -261,9 +261,9 @@ public slots: · 7 unmodified lines
261261 * Asset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is
262262 * emitted if the user cancels the dialog.
263263 * @function Window.browseAssetsAsync
264− * @param {string} title="" - The title to display at the top of the dialog.
265− * @param {string} directory="" - The initial directory to start browsing at.
266− * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and
264+ * @param {string} [title=""] - The title to display at the top of the dialog.
265+ * @param {string} [directory=""] - The initial directory to start browsing at.
266+ * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
267267 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
268268 * @example
269269 * function onAssetsDirChanged(asset) {
@@ -280,7 +280,7 @@ public slots: · 10 unmodified lines
280280 * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to
281281 * map the file to on the asset server.
282282 * @function Window.showAssetServer
283− * @param {string} uploadFile="" - The path and name of a file to upload to the asset server.
283+ * @param {string} [uploadFile=""] - The path and name of a file to upload to the asset server.
284284 * @example <caption>Upload a file to the asset server.</caption>
285285 * var filename = Window.browse("Select File to Add to Asset Server", Paths.resources);
286286 * print("File: " + filename);
@@ -317,14 +317,14 @@ public slots: · 30 unmodified lines
317317 * NOTE: to provide a non-default value - all previous parameters must be provided.
318318 * General > Snapshots.
319319 * @function Window.takeSnapshot
320− * @param {boolean} notify=true - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}
320+ * @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}
321321 * signal.
322− * @param {boolean} includeAnimated=false - If <code>true</code>, a moving image is captured as an animated GIF in addition
322+ * @param {boolean} [includeAnimated=false] - If <code>true</code>, a moving image is captured as an animated GIF in addition
323323 * to a still image.
324− * @param {number} aspectRatio=0 - The width/height ratio of the snapshot required. If the value is <code>0</code> the
324+ * @param {number} [aspectRatio=0] - The width/height ratio of the snapshot required. If the value is <code>0</code> the
325325 * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the
326326 * dimensions is adjusted in order to match the aspect ratio.
327− * @param {string} filename="" - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'.
327+ * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'.
328328 * If this parameter is <code>""</code> then the image will be saved as ".jpg".
329329 * Otherwise, the image will be saved to this filename, with an appended ".jpg".
330330 *
@@ -358,7 +358,7 @@ public slots: · 27 unmodified lines
358358 * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API.
359359 * NOTE: to provide a non-default value - all previous parameters must be provided.
360360 * @function Window.takeSecondaryCameraSnapshot
361− * @param {string} filename="" - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'.
361+ * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'.
362362 * If this parameter is <code>""</code> then the image will be saved as ".jpg".
363363 * Otherwise, the image will be saved to this filename, with an appended ".jpg".
364364 *
@@ -397,7 +397,7 @@ public slots: · 32 unmodified lines
397397 * has been prepared.
398398 * @function Window.shareSnapshot
399399 * @param {string} path - The path and name of the image file to share.
400− * @param {string} href="" - The metaverse location where the snapshot was taken.
400+ * @param {string} [href=""] - The metaverse location where the snapshot was taken.
401401 */
402402 void shareSnapshot(const QString& path, const QUrl& href = QUrl(""));
403403

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t