Commit 22090ad2 authored by Szabolcs David's avatar Szabolcs David Committed by Andras Becsi
Browse files

Quick: Document fullscreen API


Change-Id: Iade66eaea7016e6f7d73f25f8fc7af1879d099d9
Reviewed-by: default avatarAndras Becsi <andras.becsi@theqtcompany.com>
Showing with 92 additions and 0 deletions
...@@ -175,6 +175,16 @@ ...@@ -175,6 +175,16 @@
read-only value that reflects the contents of the \c{<title>} tag. read-only value that reflects the contents of the \c{<title>} tag.
*/ */
/*!
\qmlproperty bool WebEngineView::isFullScreen
\since QtWebEngine 1.1
\readonly
Returns \c{true} if the web view is in fullscreen mode, \c{false} otherwise.
\sa WebEngineView::fullScreenRequested(), WebEngineView::fullScreenCancelled()
*/
/*! /*!
\qmlmethod void WebEngineView::loadHtml(string html, url baseUrl) \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl)
\brief Loads the specified \a html as the content of the web view. \brief Loads the specified \a html as the content of the web view.
...@@ -252,6 +262,30 @@ ...@@ -252,6 +262,30 @@
\sa featurePermissionRequested() \sa featurePermissionRequested()
*/ */
/*!
\qmlmethod void WebEngineView::fullScreenCancelled()
\since QtWebEngine 1.1
Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the
browser engine when the windowing system forces the application to leave fullscreen mode.
\code
ApplicationWindow {
onVisibilityChanged: {
if (webEngineView.isFullScreen && visibility != Window.FullScreen)
webEngineView.fullScreenCancelled()
}
WebEngineView {
id: webEngineView
...
}
}
\endcode
\sa WebEngineView::isFullScreen, WebEngineView::fullScreenRequested()
*/
/*! /*!
\qmlsignal void WebEngineView::featurePermissionRequested(url securityOrigin, WebEngineView::Feature feature) \qmlsignal void WebEngineView::featurePermissionRequested(url securityOrigin, WebEngineView::Feature feature)
...@@ -364,6 +398,18 @@ ...@@ -364,6 +398,18 @@
\sa WebEngineNewViewRequest, WebEngineView::NewViewDestination, {WebEngine Quick Nano Browser} \sa WebEngineNewViewRequest, WebEngineView::NewViewDestination, {WebEngine Quick Nano Browser}
*/ */
/*!
\qmlsignal WebEngineView::fullScreenRequested(request)
\since QtWebEngine 1.1
This signal is emitted when the web page requests fullscreen mode through the
JavaScript API.
The corresponding handler is onFullScreenRequested.
\sa WebEngineFullScreenRequest, WebEngineView::isFullScreen
*/
/*! /*!
\qmlproperty enumeration WebEngineView::ErrorDomain \qmlproperty enumeration WebEngineView::ErrorDomain
...@@ -479,3 +525,49 @@ ...@@ -479,3 +525,49 @@
\sa featurePermissionRequested(), grantFeaturePermission() \sa featurePermissionRequested(), grantFeaturePermission()
*/ */
/*!
\qmltype WebEngineFullScreenRequest
\instantiates QQuickWebEngineFullScreenRequest
\inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.1
\brief A utility class for the WebEngineView::fullScreenRequested signal.
\sa WebEngineView::fullScreenRequested
*/
/*!
\qmlproperty bool WebEngineFullScreenRequest::toggleOn
\since QtWebEngine 1.1
\readonly
Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise.
\sa WebEngineFullScreenRequest::accept()
*/
/*!
\qmlmethod void WebEngineFullScreenRequest::accept()
\since QtWebEngine 1.1
Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen
property to be equal to WebEngineFullScreenRequest::toggleOn.
\code
ApplicationWindow {
id: window
WebEngineView {
onFullScreenRequested: {
if (request.toggleOn)
window.showFullScreen()
else
window.showNormal()
request.accept()
}
}
}
\endcode
\sa WebEngineFullScreenRequest::toggleOn()
*/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment