diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-09-28 16:41:03 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-09-29 09:01:40 +0000 |
commit | 3cb42b14f69ca07a95733cfcc8f6e1a22a544c07 (patch) | |
tree | 7d079d29cce9807db6ee5016ce80017a3b3dd6e2 | |
parent | 0169592b56efe17709db93f8fa02274b3774277a (diff) |
Doc: edit WebEngineView docs
- Edit for grammar and style.
- Use QDoc commands consistently.
Change-Id: Iecfeaa17307befee73057f1f7760d6e10ae79e77
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r-- | src/webengine/doc/src/webengineview.qdoc | 152 |
1 files changed, 63 insertions, 89 deletions
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc index f763227e4..67239edc9 100644 --- a/src/webengine/doc/src/webengineview.qdoc +++ b/src/webengine/doc/src/webengineview.qdoc @@ -84,7 +84,7 @@ /*! \qmlproperty url WebEngineView::url - The location of the currently displaying HTML page. This writable + The location of the currently displayed HTML page. This writable property offers the main interface to load a page into a web view. It functions the same as the \c{window.location} DOM property. @@ -95,7 +95,7 @@ \qmlproperty url WebEngineView::icon \readonly - This property holds the location of the currently displaying web site icon, + The location of the currently displayed web site icon, also known as favicon or shortcut icon. This read-only URL corresponds to the image used within a mobile browser application to represent a bookmarked page on the device's home screen. @@ -116,7 +116,7 @@ \qmlproperty int WebEngineView::loadProgress \readonly - This property holds the amount of the page that has been loaded, expressed + The amount of data from the page that has been loaded, expressed as an integer percentage in the range from \c{0} to \c{100}. */ @@ -147,7 +147,7 @@ \qmlproperty string WebEngineView::title \readonly - This property holds the title of the currently displaying HTML page, a + The title of the currently displayed HTML page. This is a read-only value that reflects the contents of the \c{<title>} tag. */ @@ -221,15 +221,15 @@ /*! \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl) - \brief Loads the specified \a html as the content of the web view. + Loads the specified \a html as the content of the web view. This method offers a lower-level alternative to the \c{url} property, which references HTML pages via URL. - External objects such as stylesheets or images referenced in the HTML - document should be located relative to \a baseUrl. For example, if \a html + External objects, such as stylesheets or images referenced in the HTML + document, should be located relative to \a baseUrl. For example, if \a html is retrieved from \c http://www.example.com/documents/overview.html, which - is the base url, then an image referenced with the relative url, \c diagram.png, + is the base URL, then an image referenced with the relative URL, \c diagram.png, should be at \c{http://www.example.com/documents/diagram.png}. \sa url @@ -237,10 +237,10 @@ /*! \qmlmethod void WebEngineView::runJavaScript(string script, variant callback) - \brief Runs the specified \a script in the content of the web view. + Runs the specified \a script in the content of the web view. - In case a callback function is provided it will be invoked after the script - finished running. + In case a callback function is provided, it will be invoked after the script + finishes running. \code runJavaScript("document.title", function(result) { console.log(result); }); @@ -335,9 +335,9 @@ \qmlsignal WebEngineView::loadingChanged(loadRequest) This signal is emitted when a page load begins, ends, or fails. - The corresponding handler is onLoadingChanged. + The corresponding handler is \c onLoadingChanged. - When handling the signal with onLoadingChanged, various read-only + When handling the signal with \c onLoadingChanged, various read-only parameters are available on the \a loadRequest: \table @@ -349,10 +349,7 @@ \li The location of the resource that is loading. \row \li status - \li Reflects one of four load states: - \c{WebEngineView::LoadStartedStatus}, \c{WebEngineView::LoadStoppedStatus}, - \c{WebEngineView::LoadSucceededStatus}, or \c{WebEngineView::LoadFailedStatus}. - See WebEngineLoadRequest::status and WebEngineView::LoadStatus. + \li The \l{LoadStatus}{load status} of the page. \row \li errorString \li The description of load error. @@ -361,13 +358,10 @@ \li The HTTP error code. \row \li errorDomain - \li The high-level error types, one of - \c{WebEngineView::ConnectionErrorDomain}, \c{WebEngineView::HttpErrorDomain}, \c{WebEngineView::InternalErrorDomain}, - \c{WebEngineView::DownloadErrorDomain}, or \c{WebEngineView::NoErrorDomain}. See - \l{WebEngineView::ErrorDomain} for the full list. + \li The high-level \l{ErrorDomain}{error type}. \endtable - \sa loading + \sa loading, LoadStatus, ErrorDomain */ /*! @@ -379,14 +373,14 @@ The certificate error can be rejected by calling WebEngineCertificateError::rejectCertificate, which will stop loading the request. - The certificate error can be ignored by calling WebEngineCertificateError::ignoreCertificateError - which will resume loading the request. + The certificate error can be ignored by calling + WebEngineCertificateError::ignoreCertificateError, which will resume loading the request. It is possible to defer the decision of rejecting the given certificate by calling WebEngineCertificateError::defer, which is useful when waiting for user input. - By default the invalid certificate will be automatically rejected. + By default, the invalid certificate will be automatically rejected. - The corresponding handler is onCertificateError. + The corresponding handler is \c onCertificateError. \sa WebEngineCertificateError */ @@ -400,19 +394,20 @@ events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl} provides the link's location. - The corresponding handler is onLinkHovered. + The corresponding handler is \c onLinkHovered. */ /*! \qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, message, lineNumber, sourceID) This signal is emitted when a JavaScript program tries to print a \a message to the web browser's console. - For example in case of evaluation errors the source URL may be provided in \a sourceID as well as the \a lineNumber. + For example, in case of evaluation errors the source URL may be provided in \a sourceID as well + as the \a lineNumber. - \a level indicates the severity of the event that triggered the message, i.e. if it + \a level indicates the severity of the event that triggered the message, that is, whether it was triggered by an error or a less severe event. - The corresponding handler is onJavaScriptConsoleMessage. + The corresponding handler is \c onJavaScriptConsoleMessage. */ /*! @@ -420,18 +415,18 @@ \since QtWebEngine 1.1 This signal is emitted when a page load is requested to happen in a separate - WebEngineView. This can either be because the current page requested it explicitly - through a JavaScript call to window.open, or because the user clicked on a link - while holding Shift, Ctrl or a built-in combination that triggers the page to open + web engine view. This can either be because the current page requested it explicitly + through a JavaScript call to \c window.open, or because the user clicked on a link + while holding Shift, Ctrl, or a built-in combination that triggers the page to open in a new window. - If this signal isn't handled the requested load will fail. + If this signal is not handled, the requested load will fail. An example implementation: \snippet snippets/qtwebengine_webengineview_newviewrequested.qml 0 - The corresponding handler is onNewViewRequested. + The corresponding handler is \c onNewViewRequested. \sa WebEngineNewViewRequest, NewViewDestination, {WebEngine Quick Nano Browser} */ @@ -443,7 +438,7 @@ This signal is emitted when the web page requests fullscreen mode through the JavaScript API. - The corresponding handler is onFullScreenRequested. + The corresponding handler is \c onFullScreenRequested. \sa WebEngineFullScreenRequest, isFullScreen */ @@ -451,7 +446,7 @@ /*! \qmlproperty enumeration WebEngineView::ErrorDomain - This enumeration details various high-level error types. + Describes various high-level error types: \value WebEngineView::NoErrorDomain \value WebEngineView::InternalErrorDomain @@ -471,68 +466,42 @@ /*! \qmlproperty enumeration WebEngineView::JavaScriptConsoleMessageLevel - Indicates the severity of a JavaScript console message. + Indicates the severity of a JavaScript console message: - \table - - \header - \li Constant - \li Description - - \row - \li InfoMessageLevel - \li Message is purely informative and should be safe to ignore. - - \row - \li WarningMessageLevel - \li Message indicates there might be a problem that may need attention. - - \row - \li ErrorMessageLevel - \li Message indicates there has been an error. - - \endtable + \value InfoMessageLevel + Message is purely informative and can safely be ignored. + \value WarningMessageLevel + Message indicates there might be a problem that may need attention. + \value ErrorMessageLevel + Message indicates there has been an error. */ /*! \qmlproperty enumeration WebEngineView::LoadStatus - Reflects a page's load status. + Reflects a page's load status: - \table - - \header - \li Constant - \li Description - - \row - \li LoadStartedStatus - \li Page is currently loading. - - \row - \li LoadSucceededStatus - \li Page has successfully loaded, and is not currently loading. - - \row - \li LoadFailedStatus - \li Page has failed to load, and is not currently loading. - - \endtable + \value LoadStartedStatus + Page is currently loading. + \value LoadSucceededStatus + Page has successfully loaded, and is not currently loading. + \value LoadFailedStatus + Page has failed to load, and is not currently loading. */ /*! \qmlproperty enumeration WebEngineView::NewViewDestination - This enumeration details the format in which a new view request should be opened. + Describes how to open a new view: \value WebEngineView::NewViewInWindow - The page expects to be opened in a separate Window. + In a separate Window. \value WebEngineView::NewViewInTab - The page expects to be opened in a tab of the same window. + In a tab of the same window. \value WebEngineView::NewViewInDialog - The page expects to be opened in a Window without any tab, tool or URL bar. + In a Window without a tab bar, toolbar, or URL bar. \value WebEngineView::NewViewInBackgroundTab - The page expects to be opened in a tab of the same window, without hiding the currently visible WebEngineView. + In a tab of the same window, without hiding the currently visible web engine view. \sa WebEngineNewViewRequest::destination */ @@ -540,7 +509,7 @@ /*! \qmlproperty enumeration WebEngineView::FindFlags - This enum describes the options available to the findText() function. The options + Describes the options available to the findText() function. The options can be OR-ed together from the following list: \value FindBackward Searches backwards instead of forwards. @@ -553,12 +522,17 @@ /*! \qmlproperty enumeration WebEngineView::Feature - This enum describes the platform feature access categories that the user may be asked to grant or deny access to. + Describes the platform feature access categories that the user may be asked to grant or deny + access to: - \value Geolocation Access to location hardware or service - \value MediaAudioCapture Audio capture devices such a microphones - \value MediaVideoCapture Video devices, e.g. cameras - \value MediaAudioVideoCapture Both Audio and Video capture devices. + \value Geolocation + Location hardware or service. + \value MediaAudioCapture + Audio capture devices, such as microphones. + \value MediaVideoCapture + Video devices, such as cameras. + \value MediaAudioVideoCapture + Both audio and video capture devices. \sa featurePermissionRequested(), grantFeaturePermission() */ @@ -569,7 +543,7 @@ \inqmlmodule QtWebEngine 1.1 \since QtWebEngine 1.1 - \brief A utility class for the WebEngineView::fullScreenRequested() signal. + \brief A utility type for the WebEngineView::fullScreenRequested() signal. \sa WebEngineView::fullScreenRequested() */ |