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
87 * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without87 * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without
88 * waiting for a user response.88 * waiting for a user response.
89 * @function Window.alert89 * @function Window.alert
90 * @param {string} message="" - The message to display.90 * @param {string} [message=""] - The message to display.
91 * @example <caption>Display a friendly greeting.</caption>91 * @example <caption>Display a friendly greeting.</caption>
92 * Window.alert("Welcome!");92 * Window.alert("Welcome!");
93 * print("Script continues without waiting");93 * print("Script continues without waiting");
@@ -98,7 +98,7 @@ public slots: · 4 unmodified lines
98 * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons.98 * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons.
99 * responds.99 * responds.
100 * @function Window.confirm100 * @function Window.confirm
101 * @param {string} message="" - The question to display.101 * @param {string} [message=""] - The question to display.
102 * @returns {boolean} <code>true</code> if the user selects "Yes", otherwise <code>false</code>.102 * @returns {boolean} <code>true</code> if the user selects "Yes", otherwise <code>false</code>.
103 * @example <caption>Ask the user a question requiring a yes/no answer.</caption>103 * @example <caption>Ask the user a question requiring a yes/no answer.</caption>
104 * var answer = Window.confirm("Are you sure?");104 * var answer = Window.confirm("Are you sure?");
@@ -128,8 +128,8 @@ public slots: · 23 unmodified lines
128 * buttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal 128 * buttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal
129 * is emitted if the user cancels the dialog.129 * is emitted if the user cancels the dialog.
130 * @function Window.promptAsync130 * @function Window.promptAsync
131 * @param {string} message - The question to display.131 * @param {string} [message=""] - The question to display.
132 * @param {string} defaultText - The default answer text.132 * @param {string} [defaultText=""] - The default answer text.
133 * @example <caption>Ask the user a question requiring a text answer without waiting for the answer.</caption>133 * @example <caption>Ask the user a question requiring a text answer without waiting for the answer.</caption>
134 * function onPromptTextChanged(text) {134 * function onPromptTextChanged(text) {
135 * print("User answer: " + text);135 * print("User answer: " + text);
@@ -144,8 +144,8 @@ public slots: · 8 unmodified lines
144 /**jsdoc144 /**jsdoc
145 * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree.145 * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree.
146 * @function Window.browseDir146 * @function Window.browseDir
147 * @param {string} title="" - The title to display at the top of the dialog.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.148 * @param {string} [directory=""] - The initial directory to start browsing at.
149 * @returns {string} The path of the directory if one is chosen, otherwise <code>null</code>.149 * @returns {string} The path of the directory if one is chosen, otherwise <code>null</code>.
150 * @example <caption>Ask the user to choose a directory.</caption>150 * @example <caption>Ask the user to choose a directory.</caption>
151 * var directory = Window.browseDir("Select Directory", Paths.resources);151 * var directory = Window.browseDir("Select Directory", Paths.resources);
@@ -158,8 +158,8 @@ public slots: · 6 unmodified lines
158 * {@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if158 * {@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if
159 * the user cancels the dialog.159 * the user cancels the dialog.
160 * @function Window.browseDirAsync160 * @function Window.browseDirAsync
161 * @param {string} title="" - The title to display at the top of the dialog.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.162 * @param {string} [directory=""] - The initial directory to start browsing at.
163 * @example <caption>Ask the user to choose a directory without waiting for the answer.</caption>163 * @example <caption>Ask the user to choose a directory without waiting for the answer.</caption>
164 * function onBrowseDirChanged(directory) {164 * function onBrowseDirChanged(directory) {
165 * print("Directory: " + directory);165 * print("Directory: " + directory);
@@ -174,9 +174,9 @@ public slots: · 8 unmodified lines
174 /**jsdoc174 /**jsdoc
175 * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree.175 * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree.
176 * @function Window.browse176 * @function Window.browse
177 * @param {string} title="" - The title to display at the top of the dialog.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.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 179 * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
180 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.180 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
181 * @returns {string} The path and name of the file if one is chosen, otherwise <code>null</code>.181 * @returns {string} The path and name of the file if one is chosen, otherwise <code>null</code>.
182 * @example <caption>Ask the user to choose an image file.</caption>182 * @example <caption>Ask the user to choose an image file.</caption>
@@ -190,9 +190,9 @@ public slots: · 7 unmodified lines
190 * {@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user190 * {@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user
191 * cancels the dialog.191 * cancels the dialog.
192 * @function Window.browseAsync192 * @function Window.browseAsync
193 * @param {string} title="" - The title to display at the top of the dialog.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.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> and195 * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
196 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.196 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
197 * @example <caption>Ask the user to choose an image file without waiting for the answer.</caption>197 * @example <caption>Ask the user to choose an image file without waiting for the answer.</caption>
198 * function onBrowseChanged(filename) {198 * function onBrowseChanged(filename) {
@@ -209,9 +209,9 @@ public slots: · 10 unmodified lines
209 * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory209 * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory
210 * tree and allows the user to type in a file name.210 * tree and allows the user to type in a file name.
211 * @function Window.save211 * @function Window.save
212 * @param {string} title="" - The title to display at the top of the dialog.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.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> and214 * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
215 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.215 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
216 * @returns {string} The path and name of the file if one is specified, otherwise <code>null</code>. If a single file type216 * @returns {string} The path and name of the file if one is specified, otherwise <code>null</code>. If a single file type
217 * is specified in the nameFilter, that file type extension is automatically appended to the result when appropriate.217 * 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
226 * directory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is226 * directory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is
227 * emitted when a file is specified; no signal is emitted if the user cancels the dialog.227 * emitted when a file is specified; no signal is emitted if the user cancels the dialog.
228 * @function Window.saveAsync228 * @function Window.saveAsync
229 * @param {string} title="" - The title to display at the top of the dialog.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.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> and231 * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
232 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.232 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
233 * @example <caption>Ask the user to specify a file to save to without waiting for an answer.</caption>233 * @example <caption>Ask the user to specify a file to save to without waiting for an answer.</caption>
234 * function onSaveFileChanged(filename) {234 * function onSaveFileChanged(filename) {
@@ -245,9 +245,9 @@ public slots: · 10 unmodified lines
245 * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset245 * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset
246 * Server.246 * Server.
247 * @function Window.browseAssets247 * @function Window.browseAssets
248 * @param {string} title="" - The title to display at the top of the dialog.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.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 250 * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
251 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.251 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
252 * @returns {string} The path and name of the asset if one is chosen, otherwise <code>null</code>.252 * @returns {string} The path and name of the asset if one is chosen, otherwise <code>null</code>.
253 * @example <caption>Ask the user to select an FBX asset.</caption>253 * @example <caption>Ask the user to select an FBX asset.</caption>
@@ -261,9 +261,9 @@ public slots: · 7 unmodified lines
261 * Asset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is261 * Asset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is
262 * emitted if the user cancels the dialog.262 * emitted if the user cancels the dialog.
263 * @function Window.browseAssetsAsync263 * @function Window.browseAssetsAsync
264 * @param {string} title="" - The title to display at the top of the dialog.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.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> and266 * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and
267 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.267 * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified.
268 * @example268 * @example
269 * function onAssetsDirChanged(asset) {269 * function onAssetsDirChanged(asset) {
@@ -280,7 +280,7 @@ public slots: · 10 unmodified lines
280 * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to280 * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to
281 * map the file to on the asset server.281 * map the file to on the asset server.
282 * @function Window.showAssetServer282 * @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.
284 * @example <caption>Upload a file to the asset server.</caption>284 * @example <caption>Upload a file to the asset server.</caption>
285 * var filename = Window.browse("Select File to Add to Asset Server", Paths.resources);285 * var filename = Window.browse("Select File to Add to Asset Server", Paths.resources);
286 * print("File: " + filename);286 * print("File: " + filename);
@@ -317,14 +317,14 @@ public slots: · 30 unmodified lines
317 * NOTE: to provide a non-default value - all previous parameters must be provided.317 * NOTE: to provide a non-default value - all previous parameters must be provided.
318 * General > Snapshots.318 * General > Snapshots.
319 * @function Window.takeSnapshot319 * @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}
321 * signal.321 * 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
323 * to a still image.323 * to a still image.
324 * @param {number} aspectRatio=0 - The width/height ratio of the snapshot required. If the value is <code>0</code> the324 * @param {number} [aspectRatio=0] - The width/height ratio of the snapshot required. If the value is <code>0</code> the
325 * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the325 * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the
326 * dimensions is adjusted in order to match the aspect ratio.326 * 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'.
328 * If this parameter is <code>""</code> then the image will be saved as ".jpg".328 * If this parameter is <code>""</code> then the image will be saved as ".jpg".
329 * Otherwise, the image will be saved to this filename, with an appended ".jpg".329 * Otherwise, the image will be saved to this filename, with an appended ".jpg".
330 *330 *
@@ -358,7 +358,7 @@ public slots: · 27 unmodified lines
358 * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API.358 * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API.
359 * NOTE: to provide a non-default value - all previous parameters must be provided.359 * NOTE: to provide a non-default value - all previous parameters must be provided.
360 * @function Window.takeSecondaryCameraSnapshot360 * @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'.
362 * If this parameter is <code>""</code> then the image will be saved as ".jpg".362 * If this parameter is <code>""</code> then the image will be saved as ".jpg".
363 * Otherwise, the image will be saved to this filename, with an appended ".jpg".363 * Otherwise, the image will be saved to this filename, with an appended ".jpg".
364 *364 *
@@ -397,7 +397,7 @@ public slots: · 32 unmodified lines
397 * has been prepared.397 * has been prepared.
398 * @function Window.shareSnapshot398 * @function Window.shareSnapshot
399 * @param {string} path - The path and name of the image file to share.399 * @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.
401 */401 */
402 void shareSnapshot(const QString& path, const QUrl& href = QUrl(""));402 void shareSnapshot(const QString& path, const QUrl& href = QUrl(""));
403 403