Fix up some corresponding InteractiveWindow JSDoc

This commit is contained in:
David Rowe 2019-12-13 10:13:22 +13:00
parent 3232f89a33
commit 57016ded11

View file

@ -186,24 +186,24 @@ public slots:
* @example <caption>Send and receive messages with a QML window.</caption> * @example <caption>Send and receive messages with a QML window.</caption>
* // JavaScript file. * // JavaScript file.
* *
* var qmlWindow = Desktop.createWindow(Script.resolvePath("QMLWindow.qml"), { * var interactiveWindow = Desktop.createWindow(Script.resolvePath("InteractiveWindow.qml"), {
* title: "QML Window", * title: "Interactive Window",
* size: { x: 400, y: 300 } * size: { x: 400, y: 300 }
* }); * });
* *
* qmlWindow.fromQml.connect(function (message) { * interactiveWindow.fromQml.connect(function (message) {
* print("Message received: " + message); * print("Message received: " + message);
* }); * });
* *
* Script.setTimeout(function () { * Script.setTimeout(function () {
* qmlWindow.sendToQml("Hello world!"); * interactiveWindow.sendToQml("Hello world!");
* }, 2000); * }, 2000);
* *
* Script.scriptEnding.connect(function () { * Script.scriptEnding.connect(function () {
* qmlWindow.close(); * interactiveWindow.close();
* }); * });
* @example * @example
* // QML file, "QMLWindow.qml". * // QML file, "InteractiveWindow.qml".
* *
* import QtQuick 2.5 * import QtQuick 2.5
* import QtQuick.Controls 1.4 * import QtQuick.Controls 1.4
@ -227,7 +227,7 @@ public slots:
/**jsdoc /**jsdoc
* Sends a message to an embedded HTML web page. To receive the message, the HTML page's script must connect to the * Sends a message to an embedded HTML web page. To receive the message, the HTML page's script must connect to the
* <code>EventBridge</code> that is automatically provided to the script: * <code>EventBridge</code> that is automatically provided for the script:
* <pre class="prettyprint"><code>EventBridge.scriptEventReceived.connect(function(message) { * <pre class="prettyprint"><code>EventBridge.scriptEventReceived.connect(function(message) {
* ... * ...
* });</code></pre> * });</code></pre>
@ -239,8 +239,8 @@ public slots:
/**jsdoc /**jsdoc
* @function InteractiveWindow.emitWebEvent * @function InteractiveWindow.emitWebEvent
* @param {object|string} message - The message. * @param {object|string} message - Message.
* @deprecated This function is deprecated and will be removed from the API. * @deprecated This function is deprecated and will be removed.
*/ */
void emitWebEvent(const QVariant& webMessage); void emitWebEvent(const QVariant& webMessage);
@ -318,9 +318,9 @@ signals:
/**jsdoc /**jsdoc
* @function InteractiveWindow.scriptEventReceived * @function InteractiveWindow.scriptEventReceived
* @param {object} message - The message. * @param {object} message - Message.
* @returns {Signal} * @returns {Signal}
* @deprecated This signal is deprecated and will be removed from the API. * @deprecated This signal is deprecated and will be removed.
*/ */
// InteractiveWindow content may include WebView requiring EventBridge. // InteractiveWindow content may include WebView requiring EventBridge.
void scriptEventReceived(const QVariant& message); void scriptEventReceived(const QVariant& message);
@ -337,9 +337,8 @@ signals:
protected slots: protected slots:
/**jsdoc /**jsdoc
* @function InteractiveWindow.qmlToScript * @function InteractiveWindow.qmlToScript
* @param {object} message * @param {object} message - Message.
* @returns {Signal} * @deprecated This method is deprecated and will be removed.
* @deprecated This signal is deprecated and will be removed from the API.
*/ */
void qmlToScript(const QVariant& message); void qmlToScript(const QVariant& message);