summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-03-13 12:37:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-31 16:43:41 +0200
commit484f2d8c92e57cbe2c581a65a2ccf461eb68c883 (patch)
treeb19c2a65ab85a22a3e924d629ee8b6936efbff5d
parent0862f71c8d3ee22ba9cf5173c262e78994999d5f (diff)
Rough port of the documentation to QtWebEngine
This is a gross mechanical modification of the documentation, along with build system bindings to allow it to generate. This should allow doing iterative improvements to the documentation from now on. This fixes project-related qdoc warnings but we still need to do some serious work to get the documentation better fitting QtWebEngine. All the documentation is ported to match the current state of our headers (without trying to adapt to modified APIs yet) and we should clear the part of the documentation that we don't need at the same time that we clean up our public headers. Change-Id: I6fb4e10e8b4c1c53be7bc7c581286248ac04d4da Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r--examples/webenginewidgets/browser/doc/src/browser.qdoc9
-rw-r--r--examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc25
-rw-r--r--examples/webenginewidgets/fancybrowser/mainwindow.cpp5
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf39
-rw-r--r--src/webengine/doc/src/qquickwebengineview_lgpl.qdoc92
-rw-r--r--src/webengine/doc/src/qtwebengine.qdoc17
-rw-r--r--src/webengine/webengine.pro2
-rw-r--r--src/webenginewidgets/doc/qtwebenginewidgets.qdocconf39
-rw-r--r--src/webenginewidgets/doc/snippets/simple/main.cpp10
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc97
-rw-r--r--src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc95
-rw-r--r--src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc29
-rw-r--r--src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc53
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc719
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesecurityorigin_lgpl.qdoc47
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc147
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc173
-rw-r--r--src/webenginewidgets/webenginewidgets.pro2
18 files changed, 789 insertions, 811 deletions
diff --git a/examples/webenginewidgets/browser/doc/src/browser.qdoc b/examples/webenginewidgets/browser/doc/src/browser.qdoc
index 4e53de38f..85cf44b80 100644
--- a/examples/webenginewidgets/browser/doc/src/browser.qdoc
+++ b/examples/webenginewidgets/browser/doc/src/browser.qdoc
@@ -26,12 +26,11 @@
****************************************************************************/
/*!
- \example webkitwidgets/browser
- \title Tab Browser
- \brief Demonstrates a complete web browsing experience
- \ingroup webkit-widgetexamples
+ \example browser
+ \title WebEngine Tab Browser Example
+ \brief The QtWebKit browser example ported to use QtWebEngine
- The Tab Browser example shows \l{Qt WebKit} module in action,
+ The Tab Browser example shows the \l{Qt WebEngine Widgets} module in action,
providing a little Web browser application with support for tabs.
\image browser-demo.png
diff --git a/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc b/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
index c1de06332..60652c69a 100644
--- a/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
+++ b/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
@@ -26,10 +26,9 @@
****************************************************************************/
/*!
- \example webengine/fancybrowser
- \title Fancy Browser Example
+ \example fancybrowser
+ \title WebEngine Fancy Browser Example
\brief Demonstrates how to use browse web and manipulate content
- \ingroup webengine-widgetexamples
\brief The Fancy Browser example shows how to use JQuery with QtWebEngine to
create a web browser with special effects and content
@@ -46,7 +45,7 @@
The \c MainWindow class inherits QMainWindow. It implements a number of
slots to perform actions on both the application and on the web content.
- \snippet webenginewidgets/fancybrowser/mainwindow.h 1
+ \snippet fancybrowser/mainwindow.h 1
We also declare a QString that contains the jQuery, a QWebView
that displays the web content, and a QLineEdit that acts as the
@@ -56,7 +55,7 @@
We start by implementing the constructor.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 1
+ \snippet fancybrowser/mainwindow.cpp 1
The first part of the constructor sets the value of \c progress to
0. This value will be used later in the code to visualize the
@@ -66,7 +65,7 @@
content. The jQuery library is a JavaScript library that provides different
functions for manipulating HTML.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 2
+ \snippet fancybrowser/mainwindow.cpp 2
The second part of the constructor creates a QWebView and connects
slots to the views signals. Furthermore, we create a QLineEdit as
@@ -75,13 +74,13 @@
QLineEdit to a QToolbar together with a set of navigation actions
from QWebView::pageAction.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 3
+ \snippet fancybrowser/mainwindow.cpp 3
The third and last part of the constructor implements two QMenus and assigns
a set of actions to them. The last line sets the QWebView as the central
widget in the QMainWindow.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 4
+ \snippet fancybrowser/mainwindow.cpp 4
When the page is loaded, \c adjustLocation() updates the address
bar; \c adjustLocation() is triggered by the \c loadFinished()
@@ -90,13 +89,13 @@
the new web page has finished loading, \c adjustLocation() will be
run once more to update the address bar.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 5
+ \snippet fancybrowser/mainwindow.cpp 5
\c adjustTitle() sets the window title and displays the loading
progress. This slot is triggered by the \c titleChanged() signal
in QWebView.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 6
+ \snippet fancybrowser/mainwindow.cpp 6
When a web page has loaded, \c finishLoading() is triggered by the
\c loadFinished() signal in QWebView. \c finishLoading() then updates the
@@ -111,7 +110,7 @@
that the images of the newly loaded page respect the state of the toggle
action.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 7
+ \snippet fancybrowser/mainwindow.cpp 7
The first jQuery-based function, \c highlightAllLinks(), is designed to
highlight all links in the current webpage. The JavaScript code looks
@@ -119,14 +118,14 @@
For each such element, the background color is set to be yellow by
using CSS.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 8
+ \snippet fancybrowser/mainwindow.cpp 8
The \c rotateImages() function rotates the images on the current
web page. This JavaScript code relies on CSS transforms and
looks up all \e {img} elements and rotates the images 180 degrees
and then back again.
- \snippet webenginewidgets/fancybrowser/mainwindow.cpp 9
+ \snippet fancybrowser/mainwindow.cpp 9
The remaining four methods remove different elements from the current web
page. \c removeGifImages() removes all GIF images on the page by looking up
diff --git a/examples/webenginewidgets/fancybrowser/mainwindow.cpp b/examples/webenginewidgets/fancybrowser/mainwindow.cpp
index 3366d2006..a5a359350 100644
--- a/examples/webenginewidgets/fancybrowser/mainwindow.cpp
+++ b/examples/webenginewidgets/fancybrowser/mainwindow.cpp
@@ -70,8 +70,9 @@ MainWindow::MainWindow(const QUrl& url)
jQuery = file.readAll();
jQuery.append("\nvar qt = { 'jQuery': jQuery.noConflict(true) };");
file.close();
-
//! [1]
+
+//! [2]
view = new QWebEngineView(this);
view->load(url);
connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation()));
@@ -89,7 +90,7 @@ MainWindow::MainWindow(const QUrl& url)
toolBar->addAction(view->pageAction(QWebEnginePage::Reload));
toolBar->addAction(view->pageAction(QWebEnginePage::Stop));
toolBar->addWidget(locationEdit);
-//! [1]
+//! [2]
QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
QAction* viewSourceAction = new QAction("Page Source", this);
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
new file mode 100644
index 000000000..831339bff
--- /dev/null
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -0,0 +1,39 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+project = QtWebEngine
+description = Qt WebEngine Reference Documentation
+url = http://qt-project.org/doc/qt-$QT_VER
+version = $QT_VERSION
+
+examplesinstallpath = webengine
+
+qhp.projects = QtWebEngine
+
+qhp.QtWebEngine.file = qtwebengine.qhp
+qhp.QtWebEngine.namespace = org.qt-project.qtwebengine.$QT_VERSION_TAG
+qhp.QtWebEngine.virtualFolder = qtwebengine
+qhp.QtWebEngine.indexTitle = Qt WebEngine
+qhp.QtWebEngine.indexRoot =
+
+qhp.QtWebEngine.filterAttributes = qtwebengine $QT_VERSION qtrefdoc
+qhp.QtWebEngine.customFilters.Qt.name = QtWebEngine $QT_VERSION
+qhp.QtWebEngine.customFilters.Qt.filterAttributes = qtwebengine $QT_VERSION
+qhp.QtWebEngine.subprojects = qmltypes examples
+qhp.QtWebEngine.subprojects.qmltypes.title = QML Types
+qhp.QtWebEngine.subprojects.qmltypes.indexTitle = Qt WebEngine QML Types
+qhp.QtWebEngine.subprojects.qmltypes.selectors = fake:qmlclass
+qhp.QtWebEngine.subprojects.qmltypes.sortPages = true
+qhp.QtWebEngine.subprojects.examples.title = Examples
+qhp.QtWebEngine.subprojects.examples.indexTitle = Qt WebEngine Code Samples
+qhp.QtWebEngine.subprojects.examples.selectors = fake:example
+
+tagfile = ../../../doc/qtwebengine/qtwebengine.tags
+
+depends += qtcore qtgui qtquick qtquickcontrols qtdoc
+
+headerdirs += . ../api
+sourcedirs += . ../api
+exampledirs += ../../../examples/webengine
+
+navigation.landingpage = "Qt WebEngine"
+navigation.qmltypespage = "Qt WebEngine QML Types"
diff --git a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
index 2a72eb1e8..a36f318f8 100644
--- a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
+++ b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (c) 2012 Hewlett-Packard Development Company, L.P.
* Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
@@ -25,19 +26,18 @@
// placed inline in the code as usual.
/*!
- \page qtwebkit-index.html
- \title Qt WebKit
+ \page qtwebengine-index.html
+ \title Qt WebEngine
- The Qt WebKit module provides the WebView API which allows QML applications
- to render regions of dynamic web content. A \e{WebView} component may share
+ The Qt WebEngine module provides the WebEngineView API which allows QML applications
+ to render regions of dynamic web content. A \e{WebEngineView} component may share
the screen with other QML components or encompass the full screen as
specified within the QML application.
- QML WebView version 3.0 is incompatible with previous QML \l
- {QtWebKit1::WebView} {WebView} API versions. It allows an
- application to load pages into the WebView, either by URL or with
+ It allows an
+ application to load pages into the WebEngineView, either by URL or with
an HTML string, and navigate within session history. By default,
- links to different pages load within the same WebView, but applications
+ links to different pages load within the same WebEngineView, but applications
may intercept requests to delegate links to other functions.
The following sample QML application loads a web page, responds to session
@@ -48,12 +48,12 @@
\code
import QtQuick 2.0
import QtQuick.Controls 1.0
- import QtWebKit 3.0
+ import QtWebEngine 1.0
ScrollView {
width: 1280
height: 720
- WebView {
+ WebEngineView {
id: webview
url: "http://qt-project.org"
anchors.fill: parent
@@ -61,9 +61,9 @@
// detect URL scheme prefix, most likely an external link
var schemaRE = /^\w+:/;
if (schemaRE.test(request.url)) {
- request.action = WebView.AcceptRequest;
+ request.action = WebEngineView.AcceptRequest;
} else {
- request.action = WebView.IgnoreRequest;
+ request.action = WebEngineView.IgnoreRequest;
// delegate request.url here
}
}
@@ -73,60 +73,60 @@
\section1 Examples
- There are several Qt WebKit examples located in the
- \l{Qt WebKit Examples} page.
+ There are several Qt WebEngine examples located in the
+ \l{Qt WebEngine Examples} page.
*/
/*!
- \qmltype WebView
- \instantiates QQuickWebView
- \inqmlmodule QtWebKit 3.0
- \brief A WebView renders web content within a QML application
+ \qmltype WebEngineView
+ \instantiates QQuickWebEngineView
+ \inqmlmodule QtWebEngine 1.0
+ \brief A WebEngineView renders web content within a QML application
*/
/*!
- \qmlmethod void WebView::goBack()
+ \qmlmethod void WebEngineView::goBack()
Go backward within the browser's session history, if possible.
(Equivalent to the \c{window.history.back()} DOM method.)
- \sa WebView::canGoBack
+ \sa WebEngineView::canGoBack
*/
/*!
- \qmlmethod void WebView::goForward()
+ \qmlmethod void WebEngineView::goForward()
Go forward within the browser's session history, if possible.
(Equivalent to the \c{window.history.forward()} DOM method.)
*/
/*!
- \qmlmethod void WebView::stop()
+ \qmlmethod void WebEngineView::stop()
Stop loading the current page.
*/
/*!
- \qmlmethod void WebView::reload()
+ \qmlmethod void WebEngineView::reload()
Reload the current page. (Equivalent to the
\c{window.location.reload()} DOM method.)
*/
/*!
- \qmlproperty url WebView::url
+ \qmlproperty url WebEngineView::url
The location of the currently displaying 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.
- \sa WebView::loadHtml()
+ \sa WebEngineView::loadHtml()
*/
/*!
- \qmlproperty url WebView::icon
+ \qmlproperty url WebEngineView::icon
The location of the currently displaying Web site icon, also known as favicon
or shortcut icon. This read-only URL corresponds to the image used within a
@@ -145,41 +145,41 @@
*/
/*!
- \qmlproperty int WebView::loadProgress
+ \qmlproperty int WebEngineView::loadProgress
The amount of the page that has been loaded, expressed as an integer
percentage in the range from \c{0} to \c{100}.
*/
/*!
- \qmlproperty bool WebView::canGoBack
+ \qmlproperty bool WebEngineView::canGoBack
Returns \c{true} if there are prior session history entries, \c{false}
otherwise.
*/
/*!
- \qmlproperty bool WebView::canGoForward
+ \qmlproperty bool WebEngineView::canGoForward
Returns \c{true} if there are subsequent session history entries,
\c{false} otherwise.
*/
/*!
- \qmlproperty bool WebView::loading
+ \qmlproperty bool WebEngineView::loading
Returns \c{true} if the HTML page is currently loading, \c{false} otherwise.
*/
/*!
- \qmlproperty string WebView::title
+ \qmlproperty string WebEngineView::title
The title of the currently displaying HTML page, a read-only value
that reflects the contents of the \c{<title>} tag.
*/
/*!
- \qmlmethod void WebView::loadHtml(string html, url baseUrl, url unreachableUrl)
+ \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl, url unreachableUrl)
\brief Loads the specified \a html as the content of the web view.
(This method offers a lower-level alternative to the \c{url} property,
@@ -195,11 +195,11 @@
content. This is typically used to display error pages for a failed
load.
- \sa WebView::url
+ \sa WebEngineView::url
*/
/*!
- \qmlsignal WebView::onLoadingChanged(loadRequest)
+ \qmlsignal WebEngineView::onLoadingChanged(loadRequest)
Occurs when any page load begins, ends, or fails. Various read-only
parameters are available on the \a loadRequest:
@@ -210,7 +210,7 @@
\li \c{status}: Reflects one of three load states:
\c{LoadStartedStatus}, \c{LoadSucceededStatus}, or
- \c{LoadFailedStatus}. See \c{WebView::LoadStatus}.
+ \c{LoadFailedStatus}. See \c{WebEngineView::LoadStatus}.
\li \c{errorString}: description of load error.
@@ -219,15 +219,15 @@
\li \c{errorDomain}: high-level error types, one of
\c{NetworkErrorDomain}, \c{HttpErrorDomain}, \c{InternalErrorDomain},
\c{DownloadErrorDomain}, or \c{NoErrorDomain}. See
- \l{WebView::ErrorDomain}.
+ \l{WebEngineView::ErrorDomain}.
\endlist
- \sa WebView::loading
+ \sa WebEngineView::loading
*/
/*!
- \qmlsignal WebView::onLinkHovered(hoveredUrl, hoveredTitle)
+ \qmlsignal WebEngineView::onLinkHovered(hoveredUrl, hoveredTitle)
Within a mouse-driven interface, this signal is emitted when a mouse
pointer passes over a link, corresponding to the \c{mouseover} DOM
@@ -238,11 +238,11 @@
*/
/*!
- \qmlsignal WebView::onNavigationRequested(request)
+ \qmlsignal WebEngineView::onNavigationRequested(request)
Occurs for various kinds of navigation. If the application listens
for this signal, it must set the \c{request.action} to either of the
- following \l{WebView::NavigationRequestAction} enum values:
+ following \l{WebEngineView::NavigationRequestAction} enum values:
\list
@@ -266,7 +266,7 @@
\c{LinkClickedNavigation}, \c{BackForwardNavigation},
\c{ReloadNavigation}, \c{FormSubmittedNavigation},
\c{FormResubmittedNavigation}, or \c{OtherNavigation} enum values.
- See \l{WebView::NavigationType}.
+ See \l{WebEngineView::NavigationType}.
\li \c{keyboardModifiers}: potential states for \l{Qt::KeyboardModifier}.
@@ -276,7 +276,7 @@
*/
/*!
- \qmlproperty enumeration WebView::ErrorDomain
+ \qmlproperty enumeration WebEngineView::ErrorDomain
Details various high-level error types.
@@ -288,7 +288,7 @@
\row
\li InternalErrorDomain
- \li Content fails to be interpreted by Qt WebKit.
+ \li Content fails to be interpreted by Qt WebEngine.
\row
\li NetworkErrorDomain
@@ -310,7 +310,7 @@
*/
/*!
- \qmlproperty enumeration WebView::NavigationType
+ \qmlproperty enumeration WebEngineView::NavigationType
Distinguishes context for various navigation actions.
@@ -348,7 +348,7 @@
*/
/*!
- \qmlproperty enumeration WebView::LoadStatus
+ \qmlproperty enumeration WebEngineView::LoadStatus
Reflects a page's load status.
@@ -374,7 +374,7 @@
*/
/*!
- \qmlproperty enumeration WebView::NavigationRequestAction
+ \qmlproperty enumeration WebEngineView::NavigationRequestAction
Specifies a policy when navigating a link to an external page.
diff --git a/src/webengine/doc/src/qtwebengine.qdoc b/src/webengine/doc/src/qtwebengine.qdoc
index 7f7b7890f..18192d902 100644
--- a/src/webengine/doc/src/qtwebengine.qdoc
+++ b/src/webengine/doc/src/qtwebengine.qdoc
@@ -23,8 +23,8 @@
*/
/*!
- \qmlmodule QtWebKit 3.0
- \title Qt WebKit QML Types
+ \qmlmodule QtWebEngine 1.0
+ \title Qt WebEngine QML Types
\brief Provides QML types for rendering web content within a QML application
The QML types can be imported into your applciation using the following
@@ -32,6 +32,17 @@
\code
import QtQuick 2.0
- import QtWebKit 3.0
+ import QtWebEngine 1.0
\endcode
*/
+
+/*!
+ \group webengine-examples
+ \title Qt WebEngine Examples
+ \brief Examples demonstrating the Qt WebEngine usage
+ \ingroup all-examples
+
+ These examples and demonstrations show a range of different uses for Qt WebEngine,
+ from displaying Web pages within a QML user interface to an implementation of
+ a basic function Web browser.
+*/
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index c0e90892a..42602bbc6 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -6,6 +6,8 @@ DEFINES += QT_BUILD_WEBENGINE_LIB
QT += qml quick
QT_PRIVATE += webenginecore qml-private quick-private gui-private core-private
+QMAKE_DOCS = $$PWD/doc/qtwebengine.qdocconf
+
INCLUDEPATH += $$PWD api ../core
SOURCES = \
diff --git a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf b/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf
new file mode 100644
index 000000000..200132099
--- /dev/null
+++ b/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf
@@ -0,0 +1,39 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+project = QtWebEngineWidgets
+description = Qt WebEngineWidgets Reference Documentation
+url = http://qt-project.org/doc/qt-$QT_VER
+version = $QT_VERSION
+
+examplesinstallpath = webenginewidgets
+
+qhp.projects = QtWebEngineWidgets
+
+qhp.QtWebEngineWidgets.file = qtwebenginewidgets.qhp
+qhp.QtWebEngineWidgets.namespace = org.qt-project.qtwebenginewidgets.$QT_VERSION_TAG
+qhp.QtWebEngineWidgets.virtualFolder = qtwebenginewidgets
+qhp.QtWebEngineWidgets.indexTitle = Qt WebEngine Widgets
+qhp.QtWebEngineWidgets.indexRoot =
+
+qhp.QtWebEngineWidgets.filterAttributes = qtwebenginewidgets $QT_VERSION qtrefdoc
+qhp.QtWebEngineWidgets.customFilters.Qt.name = QtWebEngineWidgets $QT_VERSION
+qhp.QtWebEngineWidgets.customFilters.Qt.filterAttributes = qtwebenginewidgets $QT_VERSION
+qhp.QtWebEngineWidgets.subprojects = classes examples
+qhp.QtWebEngineWidgets.subprojects.classes.title = C++ Classes
+qhp.QtWebEngineWidgets.subprojects.classes.indexTitle = Qt WebEngine Widgets C++ Classes
+qhp.QtWebEngineWidgets.subprojects.classes.selectors = class fake:headerfile
+qhp.QtWebEngineWidgets.subprojects.classes.sortPages = true
+qhp.QtWebEngineWidgets.subprojects.examples.title = Examples
+qhp.QtWebEngineWidgets.subprojects.examples.indexTitle = Qt WebEngine Widgets Code Samples
+qhp.QtWebEngineWidgets.subprojects.examples.selectors = fake:example
+
+tagfile = ../../../doc/qtwebenginewidgets/qtwebenginewidgets.tags
+
+depends += qtcore qtnetwork qtgui qtwidgets qtdoc
+
+headerdirs += ../api
+sourcedirs += ../api
+exampledirs += ../../../examples/webenginewidgets .
+
+navigation.landingpage = "Qt WebEngine Widgets"
+navigation.cppclassespage = "Qt WebEngine Widgets C++ Classes"
diff --git a/src/webenginewidgets/doc/snippets/simple/main.cpp b/src/webenginewidgets/doc/snippets/simple/main.cpp
index 408630eb1..ef05fec6f 100644
--- a/src/webenginewidgets/doc/snippets/simple/main.cpp
+++ b/src/webenginewidgets/doc/snippets/simple/main.cpp
@@ -19,16 +19,16 @@
#include <QApplication>
#include <QUrl>
-#include <QWebView>
+#include <QWebEngineView>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *parent = 0;
-//! [Using QWebView]
- QWebView *view = new QWebView(parent);
- view->load(QUrl("http://qt.nokia.com/"));
+//! [Using QWebEngineView]
+ QWebEngineView *view = new QWebEngineView(parent);
+ view->load(QUrl("http://qt-project.org/"));
view->show();
-//! [Using QWebView]
+//! [Using QWebEngineView]
return app.exec();
}
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc
index 5847d1403..247bd6321 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc
@@ -26,121 +26,90 @@
****************************************************************************/
/*!
- \module QtWebKit
- \title Qt WebKit Widgets C++ Classes
+ \module QtWebEngine
+ \title Qt WebEngine Widgets C++ Classes
\brief Provides a web browser engine as well as C++ classes to render and
interact with web content
To include the definitions of the module's classes, use the
following directive:
- \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 1
+ \snippet snippets/qtwebengine_build_snippet.qdoc 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0
+ \snippet snippets/qtwebengine_build_snippet.qdoc 0
*/
/*!
\page qtwebkitwidgets-index.html
- \title Qt WebKit Widgets
+ \title Qt WebEngine Widgets
\ingroup modules
- \brief The Qt WebKit Widgets module provides a web browser engine as well as
+ \brief The Qt WebEngine Widgets module provides a web browser engine as well as
C++ classes to render and interact with web content.
- Qt WebKit Widgets provides a Web browser engine that makes it easy to embed
+ Qt WebEngine Widgets provides a Web browser engine that makes it easy to embed
content from the World Wide Web into your Qt application. At the same time
Web content can be enhanced with native controls.
- Qt WebKit Widgets provides facilities for rendering of HyperText Markup
+ Qt WebEngine Widgets provides facilities for rendering of HyperText Markup
Language (HTML), Extensible HyperText Markup Language (XHTML) and Scalable
Vector Graphics (SVG) documents, styled using Cascading Style Sheets (CSS)
and scripted with JavaScript.
- A bridge between the JavaScript execution environment and the Qt object
- model makes it possible for custom QObjects to be scripted. For detailed
- documentation see \l{The Qt WebKit Bridge}.
- Integration with the Qt networking module enables Web pages to be transparently loaded
- from Web servers, the local file system or even the Qt resource system.
-
In addition to providing pure rendering features, HTML documents can be
made fully editable to the user through the use of the \c{contenteditable}
attribute on HTML elements.
- QtWebKit has been enhanced to become more attractive on the mobile front as well.
- For more information see \l{QtWebKit Goes Mobile}.
-
- Qt WebKit is based on the Open Source WebKit engine. More information about
- WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
+ Qt WebEngine is based on the Chromium project. More information about
+ Chromium itself can be found on the \l{http://www.chromium.org}
+ {Chromium Project} Web site.
\section1 Including In Your Project
To include the definitions of the module's classes, use the
following directive:
- \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 1
+ \snippet snippets/qtwebengine_build_snippet.qdoc 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0
+ \snippet snippets/qtwebengine_build_snippet.qdoc 0
\section1 Notes
- \note Building the Qt WebKit module with debugging symbols is problematic
- on many platforms due to the size of the WebKit engine. We recommend
- building the module only in release mode for embedded platforms.
- Currently Qt WebKit will always be compiled without debugging symbols
- when using gcc. Take a look at
- \c{Tools/mkspecs/features/production_build.prf} if you need to change this.
-
\note Web site icons, also known as "FavIcons", are currently not supported
on Windows. We plan to address this in a future release.
- \note WebKit has certain minimum requirements that must be met on
- Embedded Linux systems. See the \l{Qt for Embedded Linux Requirements}
- document for more information.
-
\section1 Architecture
- The easiest way to render content is through the QWebView class. As a
+ The easiest way to render content is through the QWebEngineView class. As a
widget it can be embedded into your forms or a graphics view, and it
provides convenience functions for downloading and rendering web sites.
- \snippet webkitsnippets/simple/main.cpp Using QWebView
+ \snippet snippets/simple/main.cpp Using QWebEngineView
- QWebView is used to view Web pages. An instance of QWebView has one
- QWebPage. QWebPage provides access to the document structure in a page,
+ QWebEngineView is used to view Web pages. An instance of QWebEngineView has one
+ QWebEnginePage. QWebEnginePage provides access to the document structure in a page,
describing features such as frames, the navigation history, and the
undo/redo stack for editable content.
- HTML documents can be nested using frames in a frameset. An individual
- frame in HTML is represented using the QWebFrame class. This class includes the
- bridge to the JavaScript window object and can be painted using QPainter.
- Each QWebPage has one QWebFrame object as its main frame, and the main frame
- may contain many child frames.
-
- Individual elements of an HTML document can be accessed via DOM JavaScript
- interfaces from within a web page. The equivalent of this API in Qt WebKit
- is represented by QWebElement. QWebElement objects are obtained using QWebFrame's
- \l{QWebFrame::}{findAllElements()} and \l{QWebFrame::}{findFirstElement()}
- functions with CSS selector queries.
-
Common web browser features, defaults and other settings can be configured
- through the QWebSettings class. It is possible to provide defaults for all
- QWebPage instances through the default settings. Individual attributes
+ through the QWebEngineSettings class. It is possible to provide defaults for all
+ QWebEnginePage instances through the default settings. Individual attributes
can be overridden by the page specific settings object.
\section1 Netscape Plugin Support
\note Netscape plugin support is only available on desktop platforms.
- Since WebKit supports the Netscape Plugin API, Qt applications can display
+ Since WebEngine supports the Netscape Plugin API, Qt applications can display
Web pages that embed common plugins on platforms for which those plugins
are available. To enable plugin support, the user must have the appropriate
- binary files for those plugins installed and the \l{QWebSettings::PluginsEnabled}
+ binary files for those plugins installed and the \l{QWebEngineSettings::PluginsEnabled}
attribute must be enabled for the application.
The following locations are searched for plugins:
@@ -199,23 +168,23 @@
\section1 Examples
- There are several Qt WebKit Widgets examples located in the
- \l{Qt WebKit Examples} page.
+ There are several Qt WebEngine Widgets examples located in the
+ \l{Qt WebEngine Widgets Examples} page.
\section1 License Information
- This is a snapshot of the Qt port of WebKit. The exact version information
+ This is a snapshot of the Qt port of WebEngine. The exact version information
can be found in the \c{VERSION} file supplied with Qt.
Qt Commercial Edition licensees that wish to distribute applications that
- use the Qt WebKit module need to be aware of their obligations under the
+ use the Qt WebEngine module need to be aware of their obligations under the
GNU Library General Public License (LGPL).
Developers using the Open Source Edition can choose to redistribute
the module under the appropriate version of the GNU LGPL.
\legalese
- WebKit is licensed under the GNU Library General Public License.
+ WebEngine is licensed under the GNU Library General Public License.
Individual contributor names and copyright dates can be found
inline in the code.
@@ -235,3 +204,17 @@
Boston, MA 02110-1301, USA.
\endlegalese
*/
+
+/*!
+ \group webengine-widgetexamples
+ \title Qt WebEngine Widgets Examples
+ \brief Examples demonstrating the Qt WebEngine Widgets usage
+ \ingroup all-examples
+
+ Qt provides an integrated Web browser component based on WebEngine, the popular
+ open source browser engine.
+
+ These examples and demonstrations show a range of different uses for Qt WebEngine,
+ from displaying Web pages within a Qt user interface to an implementation of
+ a basic function Web browser.
+*/
diff --git a/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
index fc6d5e50e..83bc8ecdf 100644
--- a/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
This library is free software; you can redistribute it and/or
@@ -22,13 +23,13 @@
// placed inline in the code as usual.
/*!
- \class QWebHistoryItem
+ \class QWebEngineHistoryItem
\since 4.4
- \brief The QWebHistoryItem class represents one item in the history of a QWebPage
+ \brief The QWebEngineHistoryItem class represents one item in the history of a QWebEnginePage
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- Each QWebHistoryItem instance represents an entry in the history stack of a Web page,
+ Each QWebEngineHistoryItem instance represents an entry in the history stack of a Web page,
containing information about the page, its location, and when it was last visited.
The following table shows the properties of the page held by the history item, and
@@ -44,69 +45,69 @@
\row \li userData() \li The user specific data that was stored with the history item.
\endtable
- \note QWebHistoryItem objects are value based, but \e{explicitly shared}. Changing
- a QWebHistoryItem instance by calling setUserData() will change all copies of that
+ \note QWebEngineHistoryItem objects are value based, but \e{explicitly shared}. Changing
+ a QWebEngineHistoryItem instance by calling setUserData() will change all copies of that
instance.
- \sa QWebHistory, QWebPage::history(), QWebHistoryInterface
+ \sa QWebEngineHistory, QWebEnginePage::history(), QWebEngineHistoryInterface
*/
/*!
- \fn QWebHistoryItem::QWebHistoryItem(const QWebHistoryItem &other)
+ \fn QWebEngineHistoryItem::QWebEngineHistoryItem(const QWebEngineHistoryItem &other)
Constructs a history item from \a other. The new item and \a other
will share their data, and modifying either this item or \a other will
modify both instances.
*/
/*!
- \fn QWebHistoryItem &QWebHistoryItem::operator=(const QWebHistoryItem &other)
+ \fn QWebEngineHistoryItem &QWebEngineHistoryItem::operator=(const QWebEngineHistoryItem &other)
Assigns the \a other history item to this. This item and \a other
will share their data, and modifying either this item or \a other will
modify both instances.
*/
/*!
- \fn QWebHistoryItem::~QWebHistoryItem()
+ \fn QWebEngineHistoryItem::~QWebEngineHistoryItem()
Destroys the history item.
*/
/*!
- \fn QUrl QWebHistoryItem::originalUrl() const
+ \fn QUrl QWebEngineHistoryItem::originalUrl() const
Returns the original URL associated with the history item.
\sa url()
*/
/*!
- \fn QUrl QWebHistoryItem::url() const
+ \fn QUrl QWebEngineHistoryItem::url() const
Returns the URL associated with the history item.
\sa originalUrl(), title(), lastVisited()
*/
/*!
- \fn QString QWebHistoryItem::title() const
+ \fn QString QWebEngineHistoryItem::title() const
Returns the title of the page associated with the history item.
\sa icon(), url(), lastVisited()
*/
/*!
- \fn QDateTime QWebHistoryItem::lastVisited() const
+ \fn QDateTime QWebEngineHistoryItem::lastVisited() const
Returns the date and time that the page associated with the item was last visited.
\sa title(), icon(), url()
*/
/*!
- \fn QIcon QWebHistoryItem::icon() const
+ \fn QIcon QWebEngineHistoryItem::icon() const
Returns the icon associated with the history item.
\sa title(), url(), lastVisited()
*/
/*!
- \fn QVariant QWebHistoryItem::userData() const
+ \fn QVariant QWebEngineHistoryItem::userData() const
\since 4.5
Returns the user specific data that was stored with the history item.
@@ -114,7 +115,7 @@
*/
/*!
- \fn void QWebHistoryItem::setUserData(const QVariant& userData)
+ \fn void QWebEngineHistoryItem::setUserData(const QVariant& userData)
\since 4.5
Stores user specific data \a userData with the history item.
@@ -125,20 +126,20 @@
*/
/*!
- \fn bool QWebHistoryItem::isValid() const
+ \fn bool QWebEngineHistoryItem::isValid() const
\since 4.5
Returns whether this is a valid history item.
*/
/*!
- \class QWebHistory
+ \class QWebEngineHistory
\since 4.4
- \brief The QWebHistory class represents the history of a QWebPage
+ \brief The QWebEngineHistory class represents the history of a QWebEnginePage
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- Each QWebPage instance contains a history of visited pages that can be accessed
- by QWebPage::history(). QWebHistory represents this history and makes it possible
+ Each QWebEnginePage instance contains a history of visited pages that can be accessed
+ by QWebEnginePage::history(). QWebEngineHistory represents this history and makes it possible
to navigate it.
The history uses the concept of a \e{current item}, dividing the pages visited
@@ -157,28 +158,28 @@
number of items is given by count(), and the history can be cleared with the
clear() function.
- QWebHistory's state can be saved to a QDataStream using the >> operator and loaded
+ QWebEngineHistory's state can be saved to a QDataStream using the >> operator and loaded
by using the << operator.
- \sa QWebHistoryItem, QWebHistoryInterface, QWebPage
+ \sa QWebEngineHistoryItem, QWebEngineHistoryInterface, QWebEnginePage
*/
/*!
- \fn void QWebHistory::clear()
+ \fn void QWebEngineHistory::clear()
Clears the history.
\sa count(), items()
*/
/*!
- \fn QList<QWebHistoryItem> QWebHistory::items() const
+ \fn QList<QWebEngineHistoryItem> QWebEngineHistory::items() const
Returns a list of all items currently in the history.
\sa count(), clear()
*/
/*!
- \fn QList<QWebHistoryItem> QWebHistory::backItems(int maxItems) const
+ \fn QList<QWebEngineHistoryItem> QWebEngineHistory::backItems(int maxItems) const
Returns the list of items in the backwards history list.
At most \a maxItems entries are returned.
@@ -186,7 +187,7 @@
*/
/*!
- \fn QList<QWebHistoryItem> QWebHistory::forwardItems(int maxItems) const
+ \fn QList<QWebEngineHistoryItem> QWebEngineHistory::forwardItems(int maxItems) const
Returns the list of items in the forward history list.
At most \a maxItems entries are returned.
@@ -194,7 +195,7 @@
*/
/*!
- \fn bool QWebHistory::canGoBack() const
+ \fn bool QWebEngineHistory::canGoBack() const
Returns true if there is an item preceding the current item in the history;
otherwise returns false.
@@ -202,14 +203,14 @@
*/
/*!
- \fn bool QWebHistory::canGoForward() const
+ \fn bool QWebEngineHistory::canGoForward() const
Returns true if we have an item to go forward to; otherwise returns false.
\sa canGoBack()
*/
/*!
- \fn void QWebHistory::back()
+ \fn void QWebEngineHistory::back()
Set the current item to be the previous item in the history and goes to the
corresponding page; i.e., goes back one history item.
@@ -217,7 +218,7 @@
*/
/*!
- \fn void QWebHistory::forward()
+ \fn void QWebEngineHistory::forward()
Sets the current item to be the next item in the history and goes to the
corresponding page; i.e., goes forward one history item.
@@ -225,45 +226,45 @@
*/
/*!
- \fn void QWebHistory::goToItem(const QWebHistoryItem &item)
+ \fn void QWebEngineHistory::goToItem(const QWebEngineHistoryItem &item)
Sets the current item to be the specified \a item in the history and goes to the page.
\sa back(), forward()
*/
/*!
- \fn QWebHistoryItem QWebHistory::backItem() const
+ \fn QWebEngineHistoryItem QWebEngineHistory::backItem() const
Returns the item before the current item in the history.
*/
/*!
- \fn QWebHistoryItem QWebHistory::currentItem() const
+ \fn QWebEngineHistoryItem QWebEngineHistory::currentItem() const
Returns the current item in the history.
*/
/*!
- \fn QWebHistoryItem QWebHistory::forwardItem() const
+ \fn QWebEngineHistoryItem QWebEngineHistory::forwardItem() const
Returns the item after the current item in the history.
*/
/*!
- \fn int QWebHistory::currentItemIndex() const
+ \fn int QWebEngineHistory::currentItemIndex() const
\since 4.5
Returns the index of the current item in history.
*/
/*!
- \fn QWebHistoryItem QWebHistory::itemAt(int i) const
+ \fn QWebEngineHistoryItem QWebEngineHistory::itemAt(int i) const
Returns the item at index \a i in the history.
*/
/*!
- \fn int QWebHistory::count() const
+ \fn int QWebEngineHistory::count() const
Returns the total number of items in the history.
*/
/*!
- \fn int QWebHistory::maximumItemCount() const
+ \fn int QWebEngineHistory::maximumItemCount() const
\since 4.5
Returns the maximum number of items in the history.
@@ -271,7 +272,7 @@
*/
/*!
- \fn void QWebHistory::setMaximumItemCount(int count)
+ \fn void QWebEngineHistory::setMaximumItemCount(int count)
\since 4.5
Sets the maximum number of items in the history to \a count.
@@ -279,9 +280,9 @@
*/
/*!
- \fn QDataStream& operator<<(QDataStream& target, const QWebHistory& history)
+ \fn QDataStream& operator<<(QDataStream& target, const QWebEngineHistory& history)
\since 4.6
- \relates QWebHistory
+ \relates QWebEngineHistory
\brief The operator<< function streams a history into a data stream.
@@ -290,12 +291,12 @@
/*!
- \fn QDataStream& operator>>(QDataStream& source, QWebHistory& history)
- \relates QWebHistory
+ \fn QDataStream& operator>>(QDataStream& source, QWebEngineHistory& history)
+ \relates QWebEngineHistory
\since 4.6
\brief The operator>> function loads a history from a data stream.
- Loads a QWebHistory from the specified \a stream into the given \a history.
+ Loads a QWebEngineHistory from the specified \a stream into the given \a history.
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc
index 1d17e7ce0..00e4f1a7d 100644
--- a/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2007 Staikos Computing Services Inc. <info@staikos.net>
This library is free software; you can redistribute it and/or
@@ -24,60 +25,60 @@
// placed inline in the code as usual.
/*!
- \class QWebHistoryInterface
+ \class QWebEngineHistoryInterface
\since 4.4
- \brief The QWebHistoryInterface class provides an interface to implement link history.
+ \brief The QWebEngineHistoryInterface class provides an interface to implement link history.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- The QWebHistoryInterface is an interface that can be used to
+ The QWebEngineHistoryInterface is an interface that can be used to
keep track of visited links. It contains two pure virtual methods that
are called by the WebKit engine: addHistoryEntry() is used to add
urls that have been visited to the interface, while
historyContains() is used to query whether the given url has been
- visited by the user. By default the QWebHistoryInterface is not set, so WebKit does not keep
+ visited by the user. By default the QWebEngineHistoryInterface is not set, so WebKit does not keep
track of visited links.
- \note The history tracked by QWebHistoryInterface is not specific to an instance of QWebPage
+ \note The history tracked by QWebEngineHistoryInterface is not specific to an instance of QWebEnginePage
but applies to all pages.
*/
/*!
- \fn void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface* defaultInterface)
+ \fn void QWebEngineHistoryInterface::setDefaultInterface(QWebEngineHistoryInterface* defaultInterface)
Sets a new default interface, \a defaultInterface, that will be used by all of WebKit
to keep track of visited links.
If an interface without a parent has already been set, the old interface will be deleted.
- When the application exists QWebHistoryInterface will automatically delete the
+ When the application exists QWebEngineHistoryInterface will automatically delete the
\a defaultInterface if it does not have a parent.
*/
/*!
- \fn QWebHistoryInterface* QWebHistoryInterface::defaultInterface()
+ \fn QWebEngineHistoryInterface* QWebEngineHistoryInterface::defaultInterface()
Returns the default interface that will be used by WebKit. If no default interface has been set,
WebKit will not keep track of visited links and a null pointer will be returned.
\sa setDefaultInterface()
*/
/*!
- \fn QWebHistoryInterface::QWebHistoryInterface(QObject* parent)
- Constructs a new QWebHistoryInterface with parent \a parent.
+ \fn QWebEngineHistoryInterface::QWebEngineHistoryInterface(QObject* parent)
+ Constructs a new QWebEngineHistoryInterface with parent \a parent.
*/
/*!
- \fn QWebHistoryInterface::~QWebHistoryInterface()
+ \fn QWebEngineHistoryInterface::~QWebEngineHistoryInterface()
Destroys the interface. If this is currently the default interface it will be unset.
*/
/*!
- \fn bool QWebHistoryInterface::historyContains(const QString &url) const = 0
+ \fn bool QWebEngineHistoryInterface::historyContains(const QString &url) const = 0
Called by the WebKit engine to query whether a certain \a url has been visited by the user already.
Returns true if the \a url is part of the history of visited links; otherwise returns false.
*/
/*!
- \fn void QWebHistoryInterface::addHistoryEntry(const QString &url) = 0
+ \fn void QWebEngineHistoryInterface::addHistoryEntry(const QString &url) = 0
Called by WebKit to add another \a url to the list of visited pages.
*/
diff --git a/src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc
index 864618309..2e0c6ec82 100644
--- a/src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
This library is free software; you can redistribute it and/or
@@ -22,39 +23,39 @@
// placed inline in the code as usual.
/*!
- \class QWebInspector
+ \class QWebEngineInspector
\since 4.6
- \inmodule QtWebKit
- \brief The QWebInspector class allows the placement and control of a
- QWebPage's inspector.
+ \inmodule QtWebEngine
+ \brief The QWebEngineInspector class allows the placement and control of a
+ QWebEnginePage's inspector.
The inspector can display a page's hierarchy, its loading statistics and
the current state of its individual elements. It is mostly used by web
developers.
- The QWebPage to be inspected must be specified using the setPage() method.
+ The QWebEnginePage to be inspected must be specified using the setPage() method.
- A typical use of QWebInspector follows:
+ A typical use of QWebEngineInspector follows:
- \snippet webkitsnippets/qtwebkit_qwebinspector_snippet.cpp 0
+ \snippet snippets/qtwebengine_qwebengineinspector_snippet.cpp 0
- A QWebInspector can be made visible either programmatically using
- setVisible(), or by the user through the attached QWebPage's context
+ A QWebEngineInspector can be made visible either programmatically using
+ setVisible(), or by the user through the attached QWebEnginePage's context
menu.
- \note A QWebInspector will display a blank widget if either:
+ \note A QWebEngineInspector will display a blank widget if either:
\list
\li page() is null
- \li QWebSettings::DeveloperExtrasEnabled is false
+ \li QWebEngineSettings::DeveloperExtrasEnabled is false
\endlist
\section1 Resources
This class acts mostly as a container and a controller for the inspector.
Most of the resources needed by the inspector are owned by the associated
- QWebPage and are allocated the first time that:
+ QWebEnginePage and are allocated the first time that:
\list
\li an element is inspected
- \li the QWebInspector is shown.
+ \li the QWebEngineInspector is shown.
\endlist
\section1 Inspector configuration persistence
@@ -63,41 +64,41 @@
user interface (e.g. the resource tracking "Always enable" option).
The inspector UI is itself a web page and is using HTML local storage
to persist those settings.
- Since the internal QWebPage used by the inspector isn't exposed in the API,
+ Since the internal QWebEnginePage used by the inspector isn't exposed in the API,
the only way to enable those settings to be persisted is currently to enable
- local storage globally through QWebSettings::globalSettings().
+ local storage globally through QWebEngineSettings::globalSettings().
- \sa QWebSettings::localStoragePath(), QWebSettings::LocalStorageEnabled
+ \sa QWebEngineSettings::localStoragePath(), QWebEngineSettings::LocalStorageEnabled
*/
/*!
- \fn QWebInspector::QWebInspector(QWidget* parent)
- Constructs an unbound QWebInspector with \a parent as its parent.
+ \fn QWebEngineInspector::QWebEngineInspector(QWidget* parent)
+ Constructs an unbound QWebEngineInspector with \a parent as its parent.
*/
/*!
- \fn QWebInspector::~QWebInspector()
+ \fn QWebEngineInspector::~QWebEngineInspector()
Destroys the inspector.
*/
/*!
- \fn void QWebInspector::setPage(QWebPage* page)
- Bind this inspector to the QWebPage to be inspected.
+ \fn void QWebEngineInspector::setPage(QWebEnginePage* page)
+ Bind this inspector to the QWebEnginePage to be inspected.
\b {Notes:}
\list
- \li There can only be one QWebInspector associated with a QWebPage
+ \li There can only be one QWebEngineInspector associated with a QWebEnginePage
and vice versa.
\li Calling this method with a null \a page will break the current association, if any.
- \li If \a page is already associated to another QWebInspector, the association
- will be replaced and the previous QWebInspector will become unbound
+ \li If \a page is already associated to another QWebEngineInspector, the association
+ will be replaced and the previous QWebEngineInspector will become unbound
\endlist
\sa page()
*/
/*!
- \fn QWebPage* QWebInspector::page() const
- Returns the inspected QWebPage.
+ \fn QWebEnginePage* QWebEngineInspector::page() const
+ Returns the inspected QWebEnginePage.
If no web page is currently associated, a null pointer is returned.
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index a63ac9c6f..54569bdc5 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2007 Staikos Computing Services Inc.
Copyright (C) 2007 Apple Inc.
@@ -24,24 +25,48 @@
// placed inline in the code as usual.
/*!
- \class QWebPage
+ \class QWebEnginePage
\since 4.4
- \brief The QWebPage class provides an object to view and edit web documents.
+ \brief The QWebEnginePage class provides an object to view and edit web documents.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- QWebPage holds a main frame responsible for web content, settings, the history
- of navigated links and actions. This class can be used, together with QWebFrame,
- to provide functionality like QWebView in a widget-less environment.
+ QWebEnginePage holds a main frame responsible for web content, settings, the history
+ of navigated links and actions. This class can be used to provide functionality like
+ QWebEngineView in a widget-less environment.
- QWebPage's API is very similar to QWebView, as you are still provided with
+ QWebEnginePage's API is very similar to QWebEngineView, as you are still provided with
common functions like action() (known as
- \l{QWebView::pageAction()}{pageAction}() in QWebView), triggerAction(),
- findText() and settings(). More QWebView-like functions can be found in the
- main frame of QWebPage, obtained via the mainFrame() function. For example,
- the \l{QWebFrame::load()}{load}(), \l{QWebFrame::setUrl()}{setUrl}() and
- \l{QWebFrame::setHtml()}{setHtml}() functions for QWebPage can be accessed
- using QWebFrame.
+ \l{QWebEngineView::pageAction()}{pageAction}() in QWebEngineView), triggerAction(),
+ findText() and settings().
+
+
+ A page can be loaded using load() or setUrl(). Alternatively, if you have
+ the HTML content readily available, you can use setHtml() instead.
+
+ The QWebEnginePage class also offers methods to retrieve both the URL currently
+ loaded by its main frame (see url()) as well as the URL originally requested
+ to be loaded (see requestedUrl()). These methods make possible the retrieval
+ of the URL before and after a DNS resolution or a redirection occurs during
+ the load process. The requestedUrl() also matches to the URL added to the
+ page history (\l{QWebEngineHistory}) if load is successful.
+
+ The title of an HTML page can be accessed with the title() property.
+ Additionally, a page may also specify an icon, which can be accessed
+ using the icon() property. If the title or the icon changes, the
+ corresponding titleChanged() and iconChanged() signals will be emitted.
+ The zoomFactor() property can be used to change the overall size
+ of the content displayed in the page.
+
+ There are multiple ways to programmatically examine the contents of a page.
+ The hitTestContent() function can be used to find elements by coordinate.
+ For access to the underlying DOM tree, there is documentElement(),
+ findAllElements() and findFirstElement().
+
+ A QWebEnginePage can be printed onto a QPrinter using the print() function.
+ This function is marked as a slot and can be conveniently connected to
+ \l{QPrintPreviewDialog}'s \l{QPrintPreviewDialog::}{paintRequested()}
+ signal.
The loadStarted() signal is emitted when the page begins to load.The
loadProgress() signal, on the other hand, is emitted whenever an element
@@ -51,39 +76,37 @@
Its argument, either true or false, indicates whether or not the load
operation succeeded.
- \section1 Using QWebPage in a Widget-less Environment
+ \section1 Using QWebEnginePage in a Widget-less Environment
- Before you begin painting a QWebPage object, you need to set the size of
+ Before you begin painting a QWebEnginePage object, you need to set the size of
the viewport by calling setViewportSize(). Then, you invoke the main
- frame's render function (QWebFrame::render()). An example of this
+ frame's render function (QWebEnginePage::render()). An example of this
is shown in the code snippet below.
Suppose we have a \c Thumbnail class as follows:
- \snippet webkitsnippets/webpage/main.cpp 0
+ \snippet snippets/webpage/main.cpp 0
- The \c Thumbnail's constructor takes in a \a url. We connect our QWebPage
- object's \l{QWebPage::}{loadFinished()} signal to our private slot,
+ The \c Thumbnail's constructor takes in a \a url. We connect our QWebEnginePage
+ object's \l{QWebEnginePage::}{loadFinished()} signal to our private slot,
\c render().
- \snippet webkitsnippets/webpage/main.cpp 1
+ \snippet snippets/webpage/main.cpp 1
The \c render() function shows how we can paint a thumbnail using a
- QWebPage object.
+ QWebEnginePage object.
- \snippet webkitsnippets/webpage/main.cpp 2
+ \snippet snippets/webpage/main.cpp 2
- We begin by setting the \l{QWebPage::viewportSize()}{viewportSize} and
+ We begin by setting the \l{QWebEnginePage::viewportSize()}{viewportSize} and
then we instantiate a QImage object, \c image, with the same size as our
- \l{QWebPage::viewportSize()}{viewportSize}. This image is then sent
+ \l{QWebEnginePage::viewportSize()}{viewportSize}. This image is then sent
as a parameter to \c painter. Next, we render the contents of the main
frame and its subframes into \c painter. Finally, we save the scaled image.
-
- \sa QWebFrame
*/
/*!
- \fn QMenu *QWebPage::createStandardContextMenu()
+ \fn QMenu *QWebEnginePage::createStandardContextMenu()
\since 4.5
This function creates the standard context menu which is shown when
the user clicks on the web page with the right mouse button. It is
@@ -92,7 +115,7 @@
*/
/*!
- \property QWebPage::palette
+ \property QWebEnginePage::palette
\brief the page's palette
The base brush of the palette is used to draw the background of the main frame.
@@ -101,7 +124,7 @@
*/
/*!
- \fn QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
+ \fn QVariant QWebEnginePage::inputMethodQuery(Qt::InputMethodQuery property) const
This method is used by the input method to query a set of properties of the page
to be able to support complex input method operations as support for surrounding
text and reconversions.
@@ -112,7 +135,7 @@
*/
/*!
- \enum QWebPage::FindFlag
+ \enum QWebEnginePage::FindFlag
This enum describes the options available to the findText() function. The options
can be OR-ed together from the following list:
@@ -134,21 +157,21 @@
*/
/*!
- \enum QWebPage::LinkDelegationPolicy
+ \enum QWebEnginePage::LinkDelegationPolicy
This enum defines the delegation policies a webpage can have when activating links and emitting
the linkClicked() signal.
- \value DontDelegateLinks No links are delegated. Instead, QWebPage tries to handle them all.
+ \value DontDelegateLinks No links are delegated. Instead, QWebEnginePage tries to handle them all.
\value DelegateExternalLinks When activating links that point to documents not stored on the
local filesystem or an equivalent - such as the Qt resource system - then linkClicked() is emitted.
\value DelegateAllLinks Whenever a link is activated the linkClicked() signal is emitted.
- \sa QWebPage::linkDelegationPolicy
+ \sa QWebEnginePage::linkDelegationPolicy
*/
/*!
- \enum QWebPage::NavigationType
+ \enum QWebEnginePage::NavigationType
This enum describes the types of navigation available when browsing through hyperlinked
documents.
@@ -164,7 +187,7 @@
*/
/*!
- \enum QWebPage::WebAction
+ \enum QWebEnginePage::WebAction
This enum describes the types of action which can be performed on the web page.
@@ -252,7 +275,7 @@
*/
/*!
- \enum QWebPage::WebWindowType
+ \enum QWebEnginePage::WebWindowType
This enum describes the types of window that can be created by the createWindow() function.
@@ -261,11 +284,11 @@
*/
/*!
- \class QWebPage::ViewportAttributes
+ \class QWebEnginePage::ViewportAttributes
\since 4.7
- \brief The QWebPage::ViewportAttributes class describes hints that can be applied to a viewport.
+ \brief The QWebEnginePage::ViewportAttributes class describes hints that can be applied to a viewport.
- QWebPage::ViewportAttributes provides a description of a viewport, such as viewport geometry,
+ QWebEnginePage::ViewportAttributes provides a description of a viewport, such as viewport geometry,
initial scale factor with limits, plus information about whether a user should be able
to scale the contents in the viewport or not, ie. by zooming.
@@ -275,69 +298,69 @@
All values might not be set, as such when dealing with the hints, the developer needs to
check whether the values are valid. Negative values denote an invalid qreal value.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
*/
/*!
- \fn QWebPage::ViewportAttributes::ViewportAttributes()
- Constructs an empty QWebPage::ViewportAttributes.
+ \fn QWebEnginePage::ViewportAttributes::ViewportAttributes()
+ Constructs an empty QWebEnginePage::ViewportAttributes.
*/
/*!
- \fn QWebPage::ViewportAttributes::ViewportAttributes(const QWebPage::ViewportAttributes& other)
- Constructs a QWebPage::ViewportAttributes which is a copy from \a other .
+ \fn QWebEnginePage::ViewportAttributes::ViewportAttributes(const QWebEnginePage::ViewportAttributes& other)
+ Constructs a QWebEnginePage::ViewportAttributes which is a copy from \a other .
*/
/*!
- \fn QWebPage::ViewportAttributes::~ViewportAttributes()
- Destroys the QWebPage::ViewportAttributes.
+ \fn QWebEnginePage::ViewportAttributes::~ViewportAttributes()
+ Destroys the QWebEnginePage::ViewportAttributes.
*/
/*!
- \fn QWebPage::ViewportAttributes& QWebPage::ViewportAttributes::operator=(const QWebPage::ViewportAttributes& other)
- Assigns the given QWebPage::ViewportAttributes to this viewport hints and returns a
+ \fn QWebEnginePage::ViewportAttributes& QWebEnginePage::ViewportAttributes::operator=(const QWebEnginePage::ViewportAttributes& other)
+ Assigns the given QWebEnginePage::ViewportAttributes to this viewport hints and returns a
reference to this.
*/
-/*! \fn inline bool QWebPage::ViewportAttributes::isValid() const
+/*! \fn inline bool QWebEnginePage::ViewportAttributes::isValid() const
Returns whether this is a valid ViewportAttributes or not.
An invalid ViewportAttributes will have an empty QSize, negative values for scale factors and
true for the boolean isUserScalable.
*/
-/*! \fn inline QSize QWebPage::ViewportAttributes::size() const
+/*! \fn inline QSize QWebEnginePage::ViewportAttributes::size() const
Returns the size of the viewport.
*/
-/*! \fn inline qreal QWebPage::ViewportAttributes::initialScaleFactor() const
+/*! \fn inline qreal QWebEnginePage::ViewportAttributes::initialScaleFactor() const
Returns the initial scale of the viewport as a multiplier.
*/
-/*! \fn inline qreal QWebPage::ViewportAttributes::minimumScaleFactor() const
+/*! \fn inline qreal QWebEnginePage::ViewportAttributes::minimumScaleFactor() const
Returns the minimum scale value of the viewport as a multiplier.
*/
-/*! \fn inline qreal QWebPage::ViewportAttributes::maximumScaleFactor() const
+/*! \fn inline qreal QWebEnginePage::ViewportAttributes::maximumScaleFactor() const
Returns the maximum scale value of the viewport as a multiplier.
*/
-/*! \fn inline bool QWebPage::ViewportAttributes::isUserScalable() const
+/*! \fn inline bool QWebEnginePage::ViewportAttributes::isUserScalable() const
Determines whether or not the scale can be modified by the user.
*/
/*!
- \fn QWebPage::QWebPage(QObject *parent)
- Constructs an empty QWebPage with parent \a parent.
+ \fn QWebEnginePage::QWebEnginePage(QObject *parent)
+ Constructs an empty QWebEnginePage with parent \a parent.
*/
/*!
- \fn QWebPage::~QWebPage()
+ \fn QWebEnginePage::~QWebEnginePage()
Destroys the web page.
*/
/*!
- \fn QWebFrame *QWebPage::mainFrame() const
+ \fn QWebEngineFrame *QWebEnginePage::mainFrame() const
Returns the main frame of the page.
The main frame provides access to the hierarchy of sub-frames and is also needed if you
@@ -347,14 +370,14 @@
*/
/*!
- \fn QWebFrame *QWebPage::currentFrame() const
+ \fn QWebEngineFrame *QWebEnginePage::currentFrame() const
Returns the frame currently active.
\sa mainFrame(), frameCreated()
*/
/*!
- \fn QWebFrame* QWebPage::frameAt(const QPoint& pos) const
+ \fn QWebEngineFrame* QWebEnginePage::frameAt(const QPoint& pos) const
\since 4.6
Returns the frame at the given point \a pos, or 0 if there is no frame at
@@ -364,26 +387,26 @@
*/
/*!
- \fn QWebHistory *QWebPage::history() const
+ \fn QWebEngineHistory *QWebEnginePage::history() const
Returns a pointer to the view's history of navigated web pages.
*/
/*!
- \fn void QWebPage::setView(QWidget* view)
+ \fn void QWebEnginePage::setView(QWidget* view)
Sets the \a view that is associated with the web page.
\sa view()
*/
/*!
- \fn QWidget *QWebPage::view() const
+ \fn QWidget *QWebEnginePage::view() const
Returns the view widget that is associated with the web page.
\sa setView()
*/
/*!
- \fn void QWebPage::javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID)
+ \fn void QWebEnginePage::javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID)
This function is called whenever 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.
@@ -392,7 +415,7 @@
*/
/*!
- \fn void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
+ \fn void QWebEnginePage::javaScriptAlert(QWebEngineFrame *frame, const QString& msg)
This function is called whenever a JavaScript program running inside \a frame calls the alert() function with
the message \a msg.
@@ -400,7 +423,7 @@
*/
/*!
- \fn bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
+ \fn bool QWebEnginePage::javaScriptConfirm(QWebEngineFrame *frame, const QString& msg)
This function is called whenever a JavaScript program running inside \a frame calls the confirm() function
with the message, \a msg. Returns true if the user confirms the message; otherwise returns false.
@@ -408,7 +431,7 @@
*/
/*!
- \fn bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
+ \fn bool QWebEnginePage::javaScriptPrompt(QWebEngineFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
This function is called whenever a JavaScript program running inside \a frame tries to prompt the user for input.
The program may provide an optional message, \a msg, as well as a default value for the input in \a defaultValue.
@@ -420,7 +443,7 @@
*/
/*!
- \fn bool QWebPage::shouldInterruptJavaScript()
+ \fn bool QWebEnginePage::shouldInterruptJavaScript()
\since 4.6
This function is called when a JavaScript program is running for a long period of time.
@@ -430,43 +453,43 @@
*/
/*!
- \fn QWebPage *QWebPage::createWindow(WebWindowType type)
+ \fn QWebEnginePage *QWebEnginePage::createWindow(WebWindowType type)
This function is called whenever WebKit wants to create a new window of the given \a type, for
example when a JavaScript program requests to open a document in a new window.
- If the new window can be created, the new window's QWebPage is returned; otherwise a null pointer is returned.
+ If the new window can be created, the new window's QWebEnginePage is returned; otherwise a null pointer is returned.
- If the view associated with the web page is a QWebView object, then the default implementation forwards
- the request to QWebView's createWindow() function; otherwise it returns a null pointer.
+ If the view associated with the web page is a QWebEngineView object, then the default implementation forwards
+ the request to QWebEngineView's createWindow() function; otherwise it returns a null pointer.
If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
\note In the cases when the window creation is being triggered by JavaScript, apart from
reimplementing this method application must also set the JavaScriptCanOpenWindows attribute
- of QWebSettings to true in order for it to get called.
+ of QWebEngineSettings to true in order for it to get called.
- \sa acceptNavigationRequest(), QWebView::createWindow()
+ \sa acceptNavigationRequest(), QWebEngineView::createWindow()
*/
/*!
- \fn QObject *QWebPage::createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
+ \fn QObject *QWebEnginePage::createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin". It is
- called regardless of the value of QWebSettings::PluginsEnabled. The \a classid, \a url, \a paramNames and \a paramValues
+ called regardless of the value of QWebEngineSettings::PluginsEnabled. The \a classid, \a url, \a paramNames and \a paramValues
correspond to the HTML object element attributes and child elements to configure the embeddable object.
*/
/*!
- \fn QStringList QWebPage::supportedContentTypes() const
- Returns the list of all content types supported by QWebPage.
+ \fn QStringList QWebEnginePage::supportedContentTypes() const
+ Returns the list of all content types supported by QWebEnginePage.
*/
/*!
- \fn bool QWebPage::supportsContentType(const QString& mimeType) const
- Returns true if QWebPage can handle the given \a mimeType; otherwise, returns false.
+ \fn bool QWebEnginePage::supportsContentType(const QString& mimeType) const
+ Returns true if QWebEnginePage can handle the given \a mimeType; otherwise, returns false.
*/
/*!
- \fn void QWebPage::triggerAction(WebAction action, bool)
+ \fn void QWebEnginePage::triggerAction(WebAction action, bool)
This function can be called to trigger the specified \a action.
It is also called by Qt WebKit if the user triggers the action, for example
through a context menu item.
@@ -478,8 +501,7 @@
*/
/*!
- \fn void QWebPage::setViewportSize(const QSize &size) const
- \property QWebPage::viewportSize
+ \property QWebEnginePage::viewportSize
\brief the size of the viewport
The size affects for example the visibility of scrollbars
@@ -488,11 +510,11 @@
By default, for a newly-created Web page, this property contains a size with
zero width and height.
- \sa QWebFrame::render(), preferredContentsSize
+ \sa render(), preferredContentsSize
*/
/*!
- \fn QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& availableSize) const
+ \fn QWebEnginePage::ViewportAttributes QWebEnginePage::viewportAttributesForSize(const QSize& availableSize) const
Computes the optimal viewport configuration given the \a availableSize, when
user interface components are disregarded.
@@ -523,8 +545,7 @@
*/
/*!
- \fn void QWebPage::setPreferredContentsSize(const QSize& size) const
- \property QWebPage::preferredContentsSize
+ \property QWebEnginePage::preferredContentsSize
\since 4.6
\brief a custom size used for laying out the page contents.
@@ -544,7 +565,7 @@
*/
/*
- \fn void QWebPage::setActualVisibleContentRect(const QRect& rect) const
+ \fn void QWebEnginePage::setActualVisibleContentRect(const QRect& rect) const
This function is to be called after any (animated) scroll/pan has ended, in the case the application handles the
scrolling/panning of the web contents. This is commonly used in combination with tiling where is it common for
the application to pan the actual view, which then resizes itself to the size of the contents.
@@ -552,11 +573,11 @@
\note Calling this function makes WebKit stop trying to calculate the visibleContentRect. To turn that on
again, call this method with an empty rect.
- \sa QGraphicsWebView::resizesToContents, QWebSettings::TiledBackingStoreEnabled
+ \sa QWebEngineSettings::TiledBackingStoreEnabled
*/
/*!
- \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
+ \fn bool QWebEnginePage::acceptNavigationRequest(QWebEngineFrame *frame, const QNetworkRequest &request, QWebEnginePage::NavigationType type)
This function is called whenever WebKit requests to navigate \a frame to the resource specified by \a request by means of
the specified navigation type \a type.
@@ -565,22 +586,20 @@
accepted createWindow() will be called.
The default implementation interprets the page's linkDelegationPolicy and emits linkClicked accordingly or returns true
- to let QWebPage handle the navigation itself.
+ to let QWebEnginePage handle the navigation itself.
\sa createWindow()
*/
/*!
- \fn bool QWebPage::hasSelection() const
- \property QWebPage::hasSelection
+ \property QWebEnginePage::hasSelection
\brief whether this page contains selected content or not.
\sa selectionChanged()
*/
/*!
- \fn QString QWebPage::selectedText() const
- \property QWebPage::selectedText
+ \property QWebEnginePage::selectedText
\brief the text currently selected
By default, this property contains an empty string.
@@ -589,9 +608,8 @@
*/
/*!
- \fn QString QWebPage::selectedHtml() const
\since 4.8
- \property QWebPage::selectedHtml
+ \property QWebEnginePage::selectedHtml
\brief the HTML currently selected
By default, this property contains an empty string.
@@ -600,21 +618,20 @@
*/
/*!
- \fn QAction *QWebPage::action(WebAction action) const
+ \fn QAction *QWebEnginePage::action(WebAction action) const
Returns a QAction for the specified WebAction \a action.
- The action is owned by the QWebPage but you can customize the look by
+ The action is owned by the QWebEnginePage but you can customize the look by
changing its properties.
- QWebPage also takes care of implementing the action, so that upon
+ QWebEnginePage also takes care of implementing the action, so that upon
triggering the corresponding action is performed on the page.
\sa triggerAction()
*/
/*!
- \fn bool QWebPage::isModified() const
- \property QWebPage::modified
+ \property QWebEnginePage::modified
\brief whether the page contains unsubmitted form data, or the contents have been changed.
By default, this property is false.
@@ -623,14 +640,14 @@
*/
/*!
- \fn QUndoStack *QWebPage::undoStack() const
+ \fn QUndoStack *QWebEnginePage::undoStack() const
Returns a pointer to the undo stack used for editable content.
\sa modified
*/
/*!
- \fn bool QWebPage::focusNextPrevChild(bool next)
+ \fn bool QWebEnginePage::focusNextPrevChild(bool next)
Similar to QWidget::focusNextPrevChild() it focuses the next focusable web element
if \a next is true; otherwise the previous element is focused.
@@ -638,9 +655,8 @@
*/
/*!
- \fn void QWebPage::setContentEditable(bool editable)
- \property QWebPage::contentEditable
- \brief whether the content in this QWebPage is editable or not
+ \property QWebEnginePage::contentEditable
+ \brief whether the content in this QWebEnginePage is editable or not
\since 4.5
If this property is enabled the contents of the page can be edited by the user through a visible
@@ -651,9 +667,8 @@
*/
/*!
- \fn void QWebPage::setForwardUnsupportedContent(bool forward)
- \property QWebPage::forwardUnsupportedContent
- \brief whether QWebPage should forward unsupported content
+ \property QWebEnginePage::forwardUnsupportedContent
+ \brief whether QWebEnginePage should forward unsupported content
If enabled, the unsupportedContent() signal is emitted with a network reply that
can be used to read the content.
@@ -664,16 +679,15 @@
*/
/*!
- \fn void QWebPage::setLinkDelegationPolicy(LinkDelegationPolicy policy)
- \property QWebPage::linkDelegationPolicy
- \brief how QWebPage should delegate the handling of links through the
+ \property QWebEnginePage::linkDelegationPolicy
+ \brief how QWebEnginePage should delegate the handling of links through the
linkClicked() signal
The default is to delegate no links.
*/
/*!
- \fn bool QWebPage::swallowContextMenuEvent(QContextMenuEvent *event)
+ \fn bool QWebEnginePage::swallowContextMenuEvent(QContextMenuEvent *event)
Filters the context menu event, \a event, through handlers for scrollbars and
custom event handlers in the web page. Returns true if the event was handled;
otherwise false.
@@ -684,13 +698,13 @@
*/
/*!
- \fn void QWebPage::updatePositionDependentActions(const QPoint &pos)
+ \fn void QWebEnginePage::updatePositionDependentActions(const QPoint &pos)
Updates the page's actions depending on the position \a pos. For example if \a pos is over an image
element the CopyImageToClipboard action is enabled.
*/
/*!
- \enum QWebPage::Extension
+ \enum QWebEnginePage::Extension
This enum describes the types of extensions that the page can support. Before using these extensions, you
should verify that the extension is supported by calling supportsExtension().
@@ -707,7 +721,7 @@
*/
/*!
- \enum QWebPage::ErrorDomain
+ \enum QWebEnginePage::ErrorDomain
\since 4.6
This enum describes the domain of an ErrorPageExtensionOption object (i.e. the layer in which the error occurred).
@@ -718,74 +732,74 @@
*/
/*!
- \class QWebPage::ExtensionOption
+ \class QWebEnginePage::ExtensionOption
\since 4.4
- \brief The ExtensionOption class provides an extended input argument to QWebPage's extension support.
+ \brief The ExtensionOption class provides an extended input argument to QWebEnginePage's extension support.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- \sa QWebPage::extension(), QWebPage::ExtensionReturn
+ \sa QWebEnginePage::extension(), QWebEnginePage::ExtensionReturn
*/
/*!
- \class QWebPage::ExtensionReturn
+ \class QWebEnginePage::ExtensionReturn
\since 4.4
- \brief The ExtensionReturn class provides an output result from a QWebPage's extension.
+ \brief The ExtensionReturn class provides an output result from a QWebEnginePage's extension.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- \sa QWebPage::extension(), QWebPage::ExtensionOption
+ \sa QWebEnginePage::extension(), QWebEnginePage::ExtensionOption
*/
/*!
- \class QWebPage::ErrorPageExtensionOption
+ \class QWebEnginePage::ErrorPageExtensionOption
\since 4.6
\brief The ErrorPageExtensionOption class describes the option
for the error page extension.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
The ErrorPageExtensionOption class holds the \a url for which an error occurred as well as
the associated \a frame.
The error itself is reported by an error \a domain, the \a error code as well as \a errorString.
- \sa QWebPage::extension(), QWebPage::ErrorPageExtensionReturn
+ \sa QWebEnginePage::extension(), QWebEnginePage::ErrorPageExtensionReturn
*/
/*!
- \variable QWebPage::ErrorPageExtensionOption::url
+ \variable QWebEnginePage::ErrorPageExtensionOption::url
\brief the url for which an error occurred
*/
/*!
- \variable QWebPage::ErrorPageExtensionOption::frame
+ \variable QWebEnginePage::ErrorPageExtensionOption::frame
\brief the frame associated with the error
*/
/*!
- \variable QWebPage::ErrorPageExtensionOption::domain
+ \variable QWebEnginePage::ErrorPageExtensionOption::domain
\brief the domain that reported the error
*/
/*!
- \variable QWebPage::ErrorPageExtensionOption::error
+ \variable QWebEnginePage::ErrorPageExtensionOption::error
\brief the error code. Interpretation of the value depends on the \a domain
- \sa QWebPage::ErrorDomain
+ \sa QWebEnginePage::ErrorDomain
*/
/*!
- \variable QWebPage::ErrorPageExtensionOption::errorString
+ \variable QWebEnginePage::ErrorPageExtensionOption::errorString
\brief a string that describes the error
*/
/*!
- \class QWebPage::ErrorPageExtensionReturn
+ \class QWebEnginePage::ErrorPageExtensionReturn
\since 4.6
\brief The ErrorPageExtensionReturn describes the error page, which will be shown for the
frame for which the error occurred.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
The ErrorPageExtensionReturn class holds the data needed for creating an error page. Some are
optional such as \a contentType, which defaults to "text/html", as well as the \a encoding, which
@@ -797,83 +811,83 @@
External objects such as stylesheets or images referenced in the HTML are located relative to
\a baseUrl.
- \sa QWebPage::extension(), QWebPage::ErrorPageExtensionOption, QString::toUtf8()
+ \sa QWebEnginePage::extension(), QWebEnginePage::ErrorPageExtensionOption, QString::toUtf8()
*/
/*!
- \fn QWebPage::ErrorPageExtensionReturn::ErrorPageExtensionReturn()
+ \fn QWebEnginePage::ErrorPageExtensionReturn::ErrorPageExtensionReturn()
Constructs a new error page object.
*/
/*!
- \variable QWebPage::ErrorPageExtensionReturn::contentType
+ \variable QWebEnginePage::ErrorPageExtensionReturn::contentType
\brief the error page's content type
*/
/*!
- \variable QWebPage::ErrorPageExtensionReturn::encoding
+ \variable QWebEnginePage::ErrorPageExtensionReturn::encoding
\brief the error page encoding
*/
/*!
- \variable QWebPage::ErrorPageExtensionReturn::baseUrl
+ \variable QWebEnginePage::ErrorPageExtensionReturn::baseUrl
\brief the base url
External objects such as stylesheets or images referenced in the HTML are located relative to this url.
*/
/*!
- \variable QWebPage::ErrorPageExtensionReturn::content
+ \variable QWebEnginePage::ErrorPageExtensionReturn::content
\brief the HTML content of the error page
*/
/*!
- \class QWebPage::ChooseMultipleFilesExtensionOption
+ \class QWebEnginePage::ChooseMultipleFilesExtensionOption
\since 4.5
\brief The ChooseMultipleFilesExtensionOption class describes the option
for the multiple files selection extension.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
The ChooseMultipleFilesExtensionOption class holds the frame originating the request
and the suggested filenames which might be provided.
- \sa QWebPage::extension(), QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn
+ \sa QWebEnginePage::extension(), QWebEnginePage::chooseFile(), QWebEnginePage::ChooseMultipleFilesExtensionReturn
*/
/*!
- \variable QWebPage::ChooseMultipleFilesExtensionOption::parentFrame
+ \variable QWebEnginePage::ChooseMultipleFilesExtensionOption::parentFrame
\brief The frame in which the request originated
*/
/*!
- \variable QWebPage::ChooseMultipleFilesExtensionOption::suggestedFileNames
+ \variable QWebEnginePage::ChooseMultipleFilesExtensionOption::suggestedFileNames
\brief The suggested filenames
*/
/*!
- \variable QWebPage::ChooseMultipleFilesExtensionReturn::fileNames
+ \variable QWebEnginePage::ChooseMultipleFilesExtensionReturn::fileNames
\brief The selected filenames
*/
/*!
- \class QWebPage::ChooseMultipleFilesExtensionReturn
+ \class QWebEnginePage::ChooseMultipleFilesExtensionReturn
\since 4.5
\brief The ChooseMultipleFilesExtensionReturn describes the return value
for the multiple files selection extension.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
The ChooseMultipleFilesExtensionReturn class holds the filenames selected by the user
when the extension is invoked.
- \sa QWebPage::extension(), QWebPage::ChooseMultipleFilesExtensionOption
+ \sa QWebEnginePage::extension(), QWebEnginePage::ChooseMultipleFilesExtensionOption
*/
/*!
- \fn bool QWebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)
- This virtual function can be reimplemented in a QWebPage subclass to provide support for extensions. The \a option
+ \fn bool QWebEnginePage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)
+ This virtual function can be reimplemented in a QWebEnginePage subclass to provide support for extensions. The \a option
argument is provided as input to the extension; the output results can be stored in \a output.
The behavior of this function is determined by \a extension. The \a option
@@ -889,14 +903,14 @@
*/
/*!
- \fn bool QWebPage::supportsExtension(Extension extension) const
+ \fn bool QWebEnginePage::supportsExtension(Extension extension) const
This virtual function returns true if the web page supports \a extension; otherwise false is returned.
\sa extension()
*/
/*!
- \fn bool QWebPage::findText(const QString &subString, FindFlags options)
+ \fn bool QWebEnginePage::findText(const QString &subString, FindFlags options)
Finds the specified string, \a subString, in the page, using the given \a options.
If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences
@@ -912,14 +926,14 @@
*/
/*!
- \fn QWebSettings *QWebPage::settings() const
+ \fn QWebEngineSettings *QWebEnginePage::settings() const
Returns a pointer to the page's settings object.
- \sa QWebSettings::globalSettings()
+ \sa QWebEngineSettings::globalSettings()
*/
/*!
- \fn QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFile)
+ \fn QString QWebEnginePage::chooseFile(QWebEngineFrame *parentFrame, const QString& suggestedFile)
This function is called when the web content requests a file name, for example
as a result of the user clicking on a "file upload" button in a HTML form.
@@ -930,44 +944,44 @@
*/
/*!
- \fn void QWebPage::setNetworkAccessManager(QNetworkAccessManager *manager)
+ \fn void QWebEnginePage::setNetworkAccessManager(QNetworkAccessManager *manager)
Sets the QNetworkAccessManager \a manager responsible for serving network requests for this
- QWebPage.
+ QWebEnginePage.
\note It is currently not supported to change the network access manager after the
- QWebPage has used it. The results of doing this are undefined.
+ QWebEnginePage has used it. The results of doing this are undefined.
\sa networkAccessManager()
*/
/*!
- \fn QNetworkAccessManager *QWebPage::networkAccessManager() const
+ \fn QNetworkAccessManager *QWebEnginePage::networkAccessManager() const
Returns the QNetworkAccessManager that is responsible for serving network
- requests for this QWebPage.
+ requests for this QWebEnginePage.
\sa setNetworkAccessManager()
*/
/*!
- \fn void QWebPage::setPluginFactory(QWebPluginFactory *factory)
- Sets the QWebPluginFactory \a factory responsible for creating plugins embedded into this
- QWebPage.
+ \fn void QWebEnginePage::setPluginFactory(QWebEnginePluginFactory *factory)
+ Sets the QWebEnginePluginFactory \a factory responsible for creating plugins embedded into this
+ QWebEnginePage.
- Note: The plugin factory is only used if the QWebSettings::PluginsEnabled attribute is enabled.
+ Note: The plugin factory is only used if the QWebEngineSettings::PluginsEnabled attribute is enabled.
\sa pluginFactory()
*/
/*!
- \fn QWebPluginFactory *QWebPage::pluginFactory() const
- Returns the QWebPluginFactory that is responsible for creating plugins embedded into
- this QWebPage. If no plugin factory is installed a null pointer is returned.
+ \fn QWebEnginePluginFactory *QWebEnginePage::pluginFactory() const
+ Returns the QWebEnginePluginFactory that is responsible for creating plugins embedded into
+ this QWebEnginePage. If no plugin factory is installed a null pointer is returned.
\sa setPluginFactory()
*/
/*!
- \fn QString QWebPage::userAgentForUrl(const QUrl&) const
+ \fn QString QWebEnginePage::userAgentForUrl(const QUrl&) const
This function is called when a user agent for HTTP requests is needed. You can reimplement this
function to dynamically return different user agents for different URLs, based on the \a url parameter.
@@ -986,7 +1000,7 @@
*/
/*!
- \fn quint64 QWebPage::totalBytes() const
+ \fn quint64 QWebEnginePage::totalBytes() const
Returns the total number of bytes that were received from the network to render the current page,
including extra content such as embedded images.
@@ -994,39 +1008,24 @@
*/
/*!
- \fn quint64 QWebPage::bytesReceived() const
+ \fn quint64 QWebEnginePage::bytesReceived() const
Returns the number of bytes that were received from the network to render the current page.
\sa totalBytes(), loadProgress()
*/
/*!
- \fn void QWebPage::setVisibilityState(VisibilityState state)
- \property QWebPage::visibilityState
- \brief the page's visibility state
-
- This property should be changed by Qt applications who want to notify the JavaScript application
- that the visibility state has changed (e.g. by reimplementing QWidget::setVisible).
- The visibility state will be updated with the \a state parameter value only if it's different from the previous set.
- Then, HTML DOM Document Object attributes 'hidden' and 'visibilityState'
- will be updated to the correct value and a 'visiblitychange' event will be fired.
- More information about this HTML5 API can be found at \l{http://www.w3.org/TR/page-visibility/}{W3C Recommendation: Page Visibility}.
-
- By default, this property is set to VisibilityStateVisible.
-*/
-
-/*!
\since 4.8
- \fn void QWebPage::viewportChangeRequested()
+ \fn void QWebEnginePage::viewportChangeRequested()
Page authors can provide the supplied values by using the viewport meta tag. More information
about this can be found at \l{http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html}{Safari Reference Library: Using the Viewport Meta Tag}.
- \sa QWebPage::ViewportAttributes, setPreferredContentsSize(), QGraphicsWebView::setScale()
+ \sa QWebEnginePage::ViewportAttributes, setPreferredContentsSize()
*/
/*!
- \fn void QWebPage::loadStarted()
+ \fn void QWebEnginePage::loadStarted()
This signal is emitted when a page starts loading content.
@@ -1034,7 +1033,7 @@
*/
/*!
- \fn void QWebPage::loadProgress(int progress)
+ \fn void QWebEnginePage::loadProgress(int progress)
This signal is emitted when the global progress status changes.
The current value is provided by \a progress and scales from 0 to 100,
@@ -1045,7 +1044,7 @@
*/
/*!
- \fn void QWebPage::loadFinished(bool ok)
+ \fn void QWebEnginePage::loadFinished(bool ok)
This signal is emitted when the page finishes loading content. This signal
is independent of script execution or page rendering.
@@ -1055,7 +1054,7 @@
*/
/*!
- \fn void QWebPage::linkHovered(const QString &link, const QString &title, const QString &textContent)
+ \fn void QWebEnginePage::linkHovered(const QString &link, const QString &title, const QString &textContent)
This signal is emitted when the mouse hovers over a link.
@@ -1069,13 +1068,13 @@
*/
/*!
- \fn void QWebPage::statusBarMessage(const QString& text)
+ \fn void QWebEnginePage::statusBarMessage(const QString& text)
This signal is emitted when the statusbar \a text is changed by the page.
*/
/*!
- \fn void QWebPage::frameCreated(QWebFrame *frame)
+ \fn void QWebEnginePage::frameCreated(QWebEngineFrame *frame)
This signal is emitted whenever the page creates a new \a frame.
@@ -1083,7 +1082,7 @@
*/
/*!
- \fn void QWebPage::selectionChanged()
+ \fn void QWebEnginePage::selectionChanged()
This signal is emitted whenever the selection changes, either interactively
or programmatically (e.g. by calling triggerAction() with a selection action).
@@ -1092,28 +1091,28 @@
*/
/*!
- \fn void QWebPage::contentsChanged()
+ \fn void QWebEnginePage::contentsChanged()
\since 4.5
This signal is emitted whenever the text in form elements changes
as well as other editable content.
- \sa contentEditable, modified, QWebFrame::toHtml(), QWebFrame::toPlainText()
+ \sa contentEditable, modified, toHtml(), toPlainText()
*/
/*!
- \fn void QWebPage::geometryChangeRequested(const QRect& geom)
+ \fn void QWebEnginePage::geometryChangeRequested(const QRect& geom)
This signal is emitted whenever the document wants to change the position and size of the
page to \a geom. This can happen for example through JavaScript.
*/
/*!
- \fn void QWebPage::repaintRequested(const QRect& dirtyRect)
+ \fn void QWebEnginePage::repaintRequested(const QRect& dirtyRect)
- This signal is emitted whenever this QWebPage should be updated. It's useful
- when rendering a QWebPage without a QWebView or QGraphicsWebView.
- \a dirtyRect contains the area that needs to be updated. To paint the QWebPage get
+ This signal is emitted whenever this QWebEnginePage should be updated. It's useful
+ when rendering a QWebEnginePage without a QWebEngineView.
+ \a dirtyRect contains the area that needs to be updated. To paint the QWebEnginePage get
the mainFrame() and call the render(QPainter*, const QRegion&) method with the
\a dirtyRect as the second parameter.
@@ -1122,7 +1121,7 @@
*/
/*!
- \fn void QWebPage::scrollRequested(int dx, int dy, const QRect& rectToScroll)
+ \fn void QWebEnginePage::scrollRequested(int dx, int dy, const QRect& rectToScroll)
This signal is emitted whenever the content given by \a rectToScroll needs
to be scrolled \a dx and \a dy downwards and no view was set.
@@ -1131,23 +1130,23 @@
*/
/*!
- \fn void QWebPage::windowCloseRequested()
+ \fn void QWebEnginePage::windowCloseRequested()
This signal is emitted whenever the page requests the web browser window to be closed,
for example through the JavaScript \c{window.close()} call.
*/
/*!
- \fn void QWebPage::printRequested(QWebFrame *frame)
+ \fn void QWebEnginePage::printRequested(QWebEngineFrame *frame)
This signal is emitted whenever the page requests the web browser to print \a frame,
for example through the JavaScript \c{window.print()} call.
- \sa QWebFrame::print(), QPrintPreviewDialog
+ \sa print(), QPrintPreviewDialog
*/
/*!
- \fn void QWebPage::unsupportedContent(QNetworkReply *reply)
+ \fn void QWebEnginePage::unsupportedContent(QNetworkReply *reply)
This signal is emitted when WebKit cannot handle a link the user navigated to or a
web server's response includes a "Content-Disposition" header with the 'attachment'
@@ -1165,7 +1164,7 @@
*/
/*!
- \fn void QWebPage::downloadRequested(const QNetworkRequest &request)
+ \fn void QWebEnginePage::downloadRequested(const QNetworkRequest &request)
This signal is emitted when the user decides to download a link. The url of
the link as well as additional meta-information is contained in \a request.
@@ -1174,7 +1173,7 @@
*/
/*!
- \fn void QWebPage::microFocusChanged()
+ \fn void QWebEnginePage::microFocusChanged()
This signal is emitted when for example the position of the cursor in an editable form
element changes. It is used to inform input methods about the new on-screen position where
@@ -1183,12 +1182,12 @@
*/
/*!
- \fn void QWebPage::linkClicked(const QUrl &url)
+ \fn void QWebEnginePage::linkClicked(const QUrl &url)
This signal is emitted whenever the user clicks on a link and the page's linkDelegationPolicy
property is set to delegate the link handling for the specified \a url.
- By default no links are delegated and are handled by QWebPage instead.
+ By default no links are delegated and are handled by QWebEnginePage instead.
\note This signal possibly won't be emitted for clicked links which use
JavaScript to trigger navigation.
@@ -1197,37 +1196,37 @@
*/
/*!
- \fn void QWebPage::toolBarVisibilityChangeRequested(bool visible)
+ \fn void QWebEnginePage::toolBarVisibilityChangeRequested(bool visible)
This signal is emitted whenever the visibility of the toolbar in a web browser
- window that hosts QWebPage should be changed to \a visible.
+ window that hosts QWebEnginePage should be changed to \a visible.
*/
/*!
- \fn void QWebPage::statusBarVisibilityChangeRequested(bool visible)
+ \fn void QWebEnginePage::statusBarVisibilityChangeRequested(bool visible)
This signal is emitted whenever the visibility of the statusbar in a web browser
- window that hosts QWebPage should be changed to \a visible.
+ window that hosts QWebEnginePage should be changed to \a visible.
*/
/*!
- \fn void QWebPage::menuBarVisibilityChangeRequested(bool visible)
+ \fn void QWebEnginePage::menuBarVisibilityChangeRequested(bool visible)
This signal is emitted whenever the visibility of the menubar in a web browser
- window that hosts QWebPage should be changed to \a visible.
+ window that hosts QWebEnginePage should be changed to \a visible.
*/
/*!
- \fn void QWebPage::databaseQuotaExceeded(QWebFrame* frame, QString databaseName);
+ \fn void QWebEnginePage::databaseQuotaExceeded(QWebEngineFrame* frame, QString databaseName);
\since 4.5
This signal is emitted whenever the web site shown in \a frame is asking to store data
to the database \a databaseName and the quota allocated to that web site is exceeded.
- \sa QWebDatabase
+ \sa QWebEngineDatabase
*/
/*!
- \fn void QWebPage::applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded);
+ \fn void QWebEnginePage::applicationCacheQuotaExceeded(QWebEngineSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded);
This signal is emitted whenever the web site is asking to store data to the application cache
database databaseName and the quota allocated to that web site is exceeded.
@@ -1236,79 +1235,29 @@
/*!
\since 4.5
- \fn void QWebPage::saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item);
+ \fn void QWebEnginePage::saveFrameStateRequested(QWebEngineFrame* frame, QWebEngineHistoryItem* item);
This signal is emitted shortly before the history of navigated pages
in \a frame is changed, for example when navigating back in the history.
- The provided QWebHistoryItem, \a item, holds the history entry of the frame before
+ The provided QWebEngineHistoryItem, \a item, holds the history entry of the frame before
the change.
A potential use-case for this signal is to store custom data in
- the QWebHistoryItem associated to the frame, using QWebHistoryItem::setUserData().
+ the QWebEngineHistoryItem associated to the frame, using QWebEngineHistoryItem::setUserData().
*/
/*!
\since 4.5
- \fn void QWebPage::restoreFrameStateRequested(QWebFrame* frame);
+ \fn void QWebEnginePage::restoreFrameStateRequested(QWebEngineFrame* frame);
This signal is emitted when the load of \a frame is finished and the application may now update its state accordingly.
*/
/*!
- \class QWebFrame
- \since 4.4
- \brief The QWebFrame class represents a frame in a web page.
-
- \inmodule QtWebKit
-
- QWebFrame represents a frame inside a web page. Each QWebPage
- object contains at least one frame, the main frame, obtained using
- QWebPage::mainFrame(). Additional frames will be created for HTML
- \c{<frame>} or \c{<iframe>} elements.
-
- A frame can be loaded using load() or setUrl(). Alternatively, if you have
- the HTML content readily available, you can use setHtml() instead.
-
- The page() function returns a pointer to the web page object. See
- \l{QWebView}{Elements of QWebView} for an explanation of how web
- frames are related to a web page and web view.
-
- The QWebFrame class also offers methods to retrieve both the URL currently
- loaded by the frame (see url()) as well as the URL originally requested
- to be loaded (see requestedUrl()). These methods make possible the retrieval
- of the URL before and after a DNS resolution or a redirection occurs during
- the load process. The requestedUrl() also matches to the URL added to the
- frame history (\l{QWebHistory}) if load is successful.
-
- The title of an HTML frame can be accessed with the title() property.
- Additionally, a frame may also specify an icon, which can be accessed
- using the icon() property. If the title or the icon changes, the
- corresponding titleChanged() and iconChanged() signals will be emitted.
- The zoomFactor() property can be used to change the overall size
- of the content displayed in the frame.
-
- QWebFrame objects are created and controlled by the web page. You
- can connect to the web page's \l{QWebPage::}{frameCreated()} signal
- to be notified when a new frame is created.
-
- There are multiple ways to programmatically examine the contents of a frame.
- The hitTestContent() function can be used to find elements by coordinate.
- For access to the underlying DOM tree, there is documentElement(),
- findAllElements() and findFirstElement().
-
- A QWebFrame can be printed onto a QPrinter using the print() function.
- This function is marked as a slot and can be conveniently connected to
- \l{QPrintPreviewDialog}'s \l{QPrintPreviewDialog::}{paintRequested()}
- signal.
-
- \sa QWebPage
-*/
-
-/*!
- \enum QWebFrame::RenderLayer
+ \enum QWebEnginePage::RenderLayer
- This enum describes the layers available for rendering using \l{QWebFrame::}{render()}.
+ This enum describes the layers available for rendering using \l{QWebEnginePage::}{render()}.
The layers can be OR-ed together from the following list:
\value ContentsLayer The web content of the frame
@@ -1319,7 +1268,7 @@
*/
/*!
- \fn void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object, ValueOwnership own)
+ \fn void QWebEnginePage::addToJavaScriptWindowObject(const QString &name, QObject *object, ValueOwnership own)
Make \a object available under \a name from within the frame's JavaScript
context. The \a object will be inserted as a child of the frame's window
@@ -1339,14 +1288,14 @@
*/
/*!
- \fn QString QWebFrame::toHtml() const
+ \fn QString QWebEnginePage::toHtml() const
Returns the frame's content as HTML, enclosed in HTML and BODY tags.
\sa setHtml(), toPlainText()
*/
/*!
- \fn QString QWebFrame::toPlainText() const
+ \fn QString QWebEnginePage::toPlainText() const
Returns the content of this frame converted to plain text, completely
stripped of all HTML formatting.
@@ -1354,15 +1303,14 @@
*/
/*!
- \fn QString QWebFrame::title() const
- \property QWebFrame::title
+ \property QWebEnginePage::title
\brief the title of the frame as defined by the HTML &lt;title&gt; element
\sa titleChanged()
*/
/*!
- \fn QMultiMap<QString, QString> QWebFrame::metaData() const
+ \fn QMultiMap<QString, QString> QWebEnginePage::metaData() const
\since 4.5
\brief Returns the meta data in this frame as a QMultiMap
@@ -1395,8 +1343,7 @@
*/
/*!
- \fn void QWebFrame::setUrl(const QUrl &url)
- \property QWebFrame::url
+ \property QWebEnginePage::url
\brief the url of the frame currently viewed
Setting this property clears the view and loads the URL.
@@ -1407,9 +1354,8 @@
*/
/*!
- \fn QUrl QWebFrame::requestedUrl() const
\since 4.6
- \property QWebFrame::requestedUrl
+ \property QWebEnginePage::requestedUrl
The URL requested to loaded by the frame currently viewed. The URL may differ from
the one returned by url() if a DNS resolution or a redirection occurs.
@@ -1418,35 +1364,26 @@
*/
/*!
- \fn QUrl QWebFrame::baseUrl() const
\since 4.6
- \property QWebFrame::baseUrl
+ \property QWebEnginePage::baseUrl
\brief the base URL of the frame, can be used to resolve relative URLs
\since 4.6
*/
/*!
- \fn QIcon QWebFrame::icon() const
- \property QWebFrame::icon
+ \property QWebEnginePage::icon
\brief the icon associated with this frame
- \sa iconChanged(), QWebSettings::iconForUrl()
+ \sa iconChanged(), QWebEngineSettings::iconForUrl()
*/
/*!
- \fn QString QWebFrame::frameName() const
+ \fn QString QWebEnginePage::frameName() const
The name of this frame as defined by the parent frame.
*/
/*!
- \fn QWebPage *QWebFrame::page() const
- The web page that contains this frame.
-
- \sa pageChanged()
-*/
-
-/*!
- \fn void QWebFrame::load(const QUrl &url)
+ \fn void QWebEnginePage::load(const QUrl &url)
Loads \a url into this frame.
\note The view remains the same until enough data has arrived to display the new \a url.
@@ -1455,7 +1392,7 @@
*/
/*!
- \fn void QWebFrame::load(const QNetworkRequest &req, QNetworkAccessManager::Operation operation, const QByteArray &body)
+ \fn void QWebEnginePage::load(const QNetworkRequest &req, QNetworkAccessManager::Operation operation, const QByteArray &body)
Loads a network request, \a req, into this frame, using the method specified in \a
operation.
@@ -1467,7 +1404,7 @@
*/
/*!
- \fn void QWebFrame::setHtml(const QString &html, const QUrl &baseUrl)
+ \fn void QWebEnginePage::setHtml(const QString &html, const QUrl &baseUrl)
Sets the content of this frame to \a html. \a baseUrl is optional and used to resolve relative
URLs in the document, such as referenced images or stylesheets.
@@ -1493,7 +1430,7 @@
*/
/*!
- \fn void QWebFrame::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
+ \fn void QWebEnginePage::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
Sets the content of this frame to the specified content \a data. If the \a mimeType argument
is empty it is currently assumed that the content is HTML but in future versions we may introduce
auto-detection.
@@ -1508,34 +1445,34 @@
*/
/*!
- \fn QWebFrame *QWebFrame::parentFrame() const
+ \fn QWebEnginePage *QWebEnginePage::parentFrame() const
Returns the parent frame of this frame, or 0 if the frame is the web pages
main frame.
- This is equivalent to qobject_cast<QWebFrame*>(frame->parent()).
+ This is equivalent to qobject_cast<QWebEnginePage*>(frame->parent()).
\sa childFrames()
*/
/*!
- \fn QList<QWebFrame*> QWebFrame::childFrames() const
+ \fn QList<QWebEnginePage*> QWebEnginePage::childFrames() const
Returns a list of all frames that are direct children of this frame.
\sa parentFrame()
*/
/*!
- \fn Qt::ScrollBarPolicy QWebFrame::scrollBarPolicy(Qt::Orientation orientation) const
+ \fn Qt::ScrollBarPolicy QWebEnginePage::scrollBarPolicy(Qt::Orientation orientation) const
Returns the scrollbar policy for the scrollbar defined by \a orientation.
*/
/*!
- \fn void QWebFrame::setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPolicy policy)
+ \fn void QWebEnginePage::setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPolicy policy)
Sets the scrollbar policy for the scrollbar defined by \a orientation to \a policy.
*/
/*!
- \fn void QWebFrame::setScrollBarValue(Qt::Orientation orientation, int value)
+ \fn void QWebEnginePage::setScrollBarValue(Qt::Orientation orientation, int value)
Sets the current \a value for the scrollbar with orientation \a orientation.
The scrollbar forces the \a value to be within the legal range: minimum <= value <= maximum.
@@ -1546,7 +1483,7 @@
*/
/*!
- \fn int QWebFrame::scrollBarValue(Qt::Orientation orientation) const
+ \fn int QWebEnginePage::scrollBarValue(Qt::Orientation orientation) const
Returns the current value for the scrollbar with orientation \a orientation, or 0
if no scrollbar is found for \a orientation.
@@ -1554,7 +1491,7 @@
*/
/*!
- \fn int QWebFrame::scrollBarMaximum(Qt::Orientation orientation) const
+ \fn int QWebEnginePage::scrollBarMaximum(Qt::Orientation orientation) const
Returns the maximum value for the scrollbar with orientation \a orientation, or 0
if no scrollbar is found for \a orientation.
@@ -1562,7 +1499,7 @@
*/
/*!
- \fn int QWebFrame::scrollBarMinimum(Qt::Orientation orientation) const
+ \fn int QWebEnginePage::scrollBarMinimum(Qt::Orientation orientation) const
Returns the minimum value for the scrollbar with orientation \a orientation.
The minimum value is always 0.
@@ -1571,7 +1508,7 @@
*/
/*!
- \fn QRect QWebFrame::scrollBarGeometry(Qt::Orientation orientation) const
+ \fn QRect QWebEnginePage::scrollBarGeometry(Qt::Orientation orientation) const
\since 4.6
Returns the geometry for the scrollbar with orientation \a orientation.
@@ -1579,29 +1516,28 @@
*/
/*!
- \fn void QWebFrame::scroll(int dx, int dy)
+ \fn void QWebEnginePage::scroll(int dx, int dy)
\since 4.5
Scrolls the frame \a dx pixels to the right and \a dy pixels downward. Both
\a dx and \a dy may be negative.
- \sa QWebFrame::scrollPosition
+ \sa QWebEnginePage::scrollPosition
*/
/*!
- \fn QPoint QWebFrame::scrollPosition() const
- \property QWebFrame::scrollPosition
+ \property QWebEnginePage::scrollPosition
\since 4.5
\brief the position the frame is currently scrolled to.
*/
/*!
- \fn void QWebFrame::scrollToAnchor(const QString& anchor)
+ \fn void QWebEnginePage::scrollToAnchor(const QString& anchor)
\since 4.7
Scrolls the frame to the given \a anchor name.
*/
/*!
- \fn void QWebFrame::render(QPainter* painter, RenderLayers layer, const QRegion& clip)
+ \fn void QWebEnginePage::render(QPainter* painter, RenderLayers layer, const QRegion& clip)
\since 4.6
Render the \a layer of the frame using \a painter clipping to \a clip.
@@ -1609,75 +1545,72 @@
*/
/*!
- \fn void QWebFrame::render(QPainter* painter, const QRegion& clip)
+ \fn void QWebEnginePage::render(QPainter* painter, const QRegion& clip)
Render the frame into \a painter clipping to \a clip.
*/
/*!
- \property QWebFrame::textSizeMultiplier
+ \property QWebEnginePage::textSizeMultiplier
\brief the scaling factor for all text in the frame
\obsolete
Use setZoomFactor instead, in combination with the ZoomTextOnly attribute in
- QWebSettings.
+ QWebEngineSettings.
\note Setting this property also enables the ZoomTextOnly attribute in
- QWebSettings.
+ QWebEngineSettings.
*/
/*!
- \fn void QWebFrame::setTextSizeMultiplier(qreal factor)
+ \fn void QWebEnginePage::setTextSizeMultiplier(qreal factor)
Sets the value of the multiplier used to scale the text in a Web frame to
the \a factor specified.
*/
/*!
- \fn qreal QWebFrame::textSizeMultiplier() const
+ \fn qreal QWebEnginePage::textSizeMultiplier() const
Returns the value of the multiplier used to scale the text in a Web frame.
*/
/*!
- \fn void QWebFrame::setZoomFactor(qreal factor)
- \property QWebFrame::zoomFactor
+ \property QWebEnginePage::zoomFactor
\since 4.5
\brief the zoom factor for the frame
*/
/*!
- \fn bool QWebFrame::hasFocus() const
- \property QWebFrame::focus
+ \property QWebEnginePage::focus
\since 4.6
Returns true if this frame has keyboard input focus; otherwise, returns false.
*/
/*!
- \fn void QWebFrame::setFocus()
+ \fn void QWebEnginePage::setFocus()
\since 4.6
Gives keyboard input focus to this frame.
*/
/*!
- \fn QPoint QWebFrame::pos() const
+ \fn QPoint QWebEnginePage::pos() const
Returns the position of the frame relative to it's parent frame.
*/
/*!
- \fn QRect QWebFrame::geometry() const
+ \fn QRect QWebEnginePage::geometry() const
Return the geometry of the frame relative to it's parent frame.
*/
/*!
- \fn QSize QWebFrame::contentsSize() const
- \property QWebFrame::contentsSize
+ \property QWebEnginePage::contentsSize
\brief the size of the contents in this frame
\sa contentsSizeChanged()
*/
/*!
- \fn QWebElement QWebFrame::documentElement() const
+ \fn QWebEngineElement QWebEnginePage::documentElement() const
\since 4.6
Returns the document element of this frame.
@@ -1687,7 +1620,7 @@
*/
/*!
- \fn QWebElementCollection QWebFrame::findAllElements(const QString &selectorQuery) const
+ \fn QWebElementCollection QWebEnginePage::findAllElements(const QString &selectorQuery) const
\since 4.6
Returns a new list of elements matching the given CSS selector \a selectorQuery.
If there are no matching elements, an empty list is returned.
@@ -1695,11 +1628,11 @@
\l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is
used for the query.
- \sa QWebElement::findAll()
+ \sa QWebEngineElement::findAll()
*/
/*!
- \fn QWebElement QWebFrame::findFirstElement(const QString &selectorQuery) const
+ \fn QWebEngineElement QWebEnginePage::findFirstElement(const QString &selectorQuery) const
\since 4.6
Returns the first element in the frame's document that matches the
given CSS selector \a selectorQuery. If there is no matching element, a
@@ -1708,23 +1641,23 @@
\l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is
used for the query.
- \sa QWebElement::findFirst()
+ \sa QWebEngineElement::findFirst()
*/
/*!
- \fn QWebHitTestResult QWebFrame::hitTestContent(const QPoint &pos) const
+ \fn QWebEngineHitTestResult QWebEnginePage::hitTestContent(const QPoint &pos) const
Performs a hit test on the frame contents at the given position \a pos and returns the hit test result.
*/
/*!
- \fn void QWebFrame::print(QPrinter *printer) const
+ \fn void QWebEnginePage::print(QPrinter *printer) const
Prints the frame to the given \a printer.
\sa render()
*/
/*!
- \fn QVariant QWebFrame::evaluateJavaScript(const QString& scriptSource)
+ \fn QVariant QWebEnginePage::evaluateJavaScript(const QString& scriptSource)
Evaluates the JavaScript defined by \a scriptSource using this frame as context
and returns the result of the last executed statement.
@@ -1732,31 +1665,31 @@
*/
/*!
- \fn QWebSecurityOrigin QWebFrame::securityOrigin() const
+ \fn QWebEngineSecurityOrigin QWebEnginePage::securityOrigin() const
\since 4.5
Returns the frame's security origin.
*/
/*!
- \fn void QWebFrame::javaScriptWindowObjectCleared()
+ \fn void QWebEnginePage::javaScriptWindowObjectCleared()
This signal is emitted whenever the global window object of the JavaScript
environment is cleared, e.g., before starting a new load.
- If you intend to add QObjects to a QWebFrame using
+ If you intend to add QObjects to a QWebEnginePage using
addToJavaScriptWindowObject(), you should add them in a slot connected
to this signal. This ensures that your objects remain accessible when
loading new URLs.
*/
/*!
- \fn void QWebFrame::provisionalLoad()
+ \fn void QWebEnginePage::provisionalLoad()
\internal
*/
/*!
- \fn void QWebFrame::titleChanged(const QString &title)
+ \fn void QWebEnginePage::titleChanged(const QString &title)
This signal is emitted whenever the title of the frame changes.
The \a title string specifies the new title.
@@ -1765,7 +1698,7 @@
*/
/*!
- \fn void QWebFrame::urlChanged(const QUrl &url)
+ \fn void QWebEnginePage::urlChanged(const QUrl &url)
This signal is emitted with the URL of the frame when the frame's title is
received. The new URL is specified by \a url.
@@ -1774,7 +1707,7 @@
*/
/*!
- \fn void QWebFrame::initialLayoutCompleted()
+ \fn void QWebEnginePage::initialLayoutCompleted()
This signal is emitted when the frame is laid out the first time.
This is the first time you will see contents displayed on the frame.
@@ -1783,7 +1716,7 @@
*/
/*!
- \fn void QWebFrame::iconChanged()
+ \fn void QWebEnginePage::iconChanged()
This signal is emitted when the icon ("favicon") associated with the frame
has been loaded.
@@ -1792,7 +1725,7 @@
*/
/*!
- \fn void QWebFrame::contentsSizeChanged(const QSize &size)
+ \fn void QWebEnginePage::contentsSizeChanged(const QSize &size)
\since 4.6
This signal is emitted when the frame's contents size changes
@@ -1802,85 +1735,57 @@
*/
/*!
- \fn void QWebFrame::loadStarted()
- \since 4.6
-
- This signal is emitted when a new load of this frame is started.
-
- \sa loadFinished()
-*/
-
-/*!
- \fn void QWebFrame::loadFinished(bool ok)
- \since 4.6
-
- This signal is emitted when a load of this frame is finished.
- \a ok will indicate whether the load was successful or any error occurred.
-
- \sa loadStarted()
-*/
-
-/*!
- \fn void QWebFrame::pageChanged()
- \since 4.7
-
- This signal is emitted when this frame has been moved to a different QWebPage.
-
- \sa page()
-*/
-
-/*!
- \class QWebHitTestResult
+ \class QWebEngineHitTestResult
\since 4.4
- \brief The QWebHitTestResult class provides information about the web
+ \brief The QWebEngineHitTestResult class provides information about the web
page content after a hit test.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- QWebHitTestResult is returned by QWebFrame::hitTestContent() to provide
+ QWebEngineHitTestResult is returned by QWebEnginePage::hitTestContent() to provide
information about the content of the web page at the specified position.
*/
/*!
- \fn QWebHitTestResult::QWebHitTestResult()
+ \fn QWebEngineHitTestResult::QWebEngineHitTestResult()
Constructs a null hit test result.
*/
/*!
- \fn QWebHitTestResult::QWebHitTestResult(const QWebHitTestResult &other)
+ \fn QWebEngineHitTestResult::QWebEngineHitTestResult(const QWebEngineHitTestResult &other)
Constructs a hit test result from \a other.
*/
/*!
- \fn QWebHitTestResult &QWebHitTestResult::operator=(const QWebHitTestResult &other)
+ \fn QWebEngineHitTestResult &QWebEngineHitTestResult::operator=(const QWebEngineHitTestResult &other)
Assigns the \a other hit test result to this.
*/
/*!
- \fn QWebHitTestResult::~QWebHitTestResult()
+ \fn QWebEngineHitTestResult::~QWebEngineHitTestResult()
Destructor.
*/
/*!
- \fn bool QWebHitTestResult::isNull() const
+ \fn bool QWebEngineHitTestResult::isNull() const
Returns true if the hit test result is null; otherwise returns false.
*/
/*!
- \fn QPoint QWebHitTestResult::pos() const
+ \fn QPoint QWebEngineHitTestResult::pos() const
Returns the position where the hit test occurred in the coordinates of frame containing the element hit.
\sa frame()
*/
/*!
- \fn QRect QWebHitTestResult::boundingRect() const
+ \fn QRect QWebEngineHitTestResult::boundingRect() const
\since 4.5
Returns the bounding rect of the element.
*/
/*!
- \fn QWebElement QWebHitTestResult::enclosingBlockElement() const
+ \fn QWebEngineElement QWebEngineHitTestResult::enclosingBlockElement() const
\since 4.6
Returns the block element that encloses the element hit.
@@ -1890,27 +1795,27 @@
*/
/*!
- \fn QString QWebHitTestResult::title() const
+ \fn QString QWebEngineHitTestResult::title() const
Returns the title of the nearest enclosing HTML element.
*/
/*!
- \fn QString QWebHitTestResult::linkText() const
+ \fn QString QWebEngineHitTestResult::linkText() const
Returns the text of the link.
*/
/*!
- \fn QUrl QWebHitTestResult::linkUrl() const
+ \fn QUrl QWebEngineHitTestResult::linkUrl() const
Returns the url to which the link points to.
*/
/*!
- \fn QUrl QWebHitTestResult::linkTitle() const
+ \fn QUrl QWebEngineHitTestResult::linkTitle() const
Returns the title of the link.
*/
/*!
- \fn QWebElement QWebHitTestResult::linkElement() const
+ \fn QWebEngineElement QWebEngineHitTestResult::linkElement() const
\since 4.6
Returns the element that represents the link.
@@ -1918,45 +1823,45 @@
*/
/*!
- \fn QWebFrame *QWebHitTestResult::linkTargetFrame() const
+ \fn QWebEnginePage *QWebEngineHitTestResult::linkTargetFrame() const
Returns the frame that will load the link if it is activated.
\sa linkElement()
*/
/*!
- \fn QString QWebHitTestResult::alternateText() const
+ \fn QString QWebEngineHitTestResult::alternateText() const
Returns the alternate text of the element. This corresponds to the HTML alt attribute.
*/
/*!
- \fn QUrl QWebHitTestResult::imageUrl() const
+ \fn QUrl QWebEngineHitTestResult::imageUrl() const
Returns the url of the image.
*/
/*!
- \fn QPixmap QWebHitTestResult::pixmap() const
+ \fn QPixmap QWebEngineHitTestResult::pixmap() const
Returns a QPixmap containing the image. A null pixmap is returned if the
element being tested is not an image.
*/
/*!
- \fn bool QWebHitTestResult::isContentEditable() const
+ \fn bool QWebEngineHitTestResult::isContentEditable() const
Returns true if the content is editable by the user; otherwise returns false.
*/
/*!
- \fn bool QWebHitTestResult::isContentSelected() const
+ \fn bool QWebEngineHitTestResult::isContentSelected() const
Returns true if the content tested is part of the selection; otherwise returns false.
*/
/*!
- \fn QWebElement QWebHitTestResult::element() const
+ \fn QWebEngineElement QWebEngineHitTestResult::element() const
\since 4.6
- Returns the underlying DOM element as QWebElement.
+ Returns the underlying DOM element as QWebEngineElement.
*/
/*!
- \fn QWebFrame *QWebHitTestResult::frame() const
+ \fn QWebEnginePage *QWebEngineHitTestResult::frame() const
Returns the frame of the element hit.
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginesecurityorigin_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesecurityorigin_lgpl.qdoc
index 396ec94d8..ec75f5fe4 100644
--- a/src/webenginewidgets/doc/src/qwebenginesecurityorigin_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginesecurityorigin_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
This library is free software; you can redistribute it and/or
@@ -22,13 +23,13 @@
// placed inline in the code as usual.
/*!
- \class QWebSecurityOrigin
+ \class QWebEngineSecurityOrigin
\since 4.5
- \brief The QWebSecurityOrigin class defines a security boundary for web sites.
+ \brief The QWebEngineSecurityOrigin class defines a security boundary for web sites.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- QWebSecurityOrigin provides access to the security domains defined by web sites.
+ QWebEngineSecurityOrigin provides access to the security domains defined by web sites.
An origin consists of a host name, a scheme, and a port number. Web sites
with the same security origin can access each other's resources for client-side
scripting or databases.
@@ -41,15 +42,15 @@
By default local schemes like \c{file://} and \c{qrc://} are concidered to be in the same
security origin, and can access each other's resources. You can add additional local schemes
- by using QWebSecurityOrigin::addLocalScheme(), or override the default same-origin behavior
- by setting QWebSettings::LocalContentCanAccessFileUrls to \c{false}.
+ by using QWebEngineSecurityOrigin::addLocalScheme(), or override the default same-origin behavior
+ by setting QWebEngineSettings::LocalContentCanAccessFileUrls to \c{false}.
\note Local resources are by default restricted from accessing remote content, which
means your \c{file://} will not be able to access \c{http://domain.com/foo.html}. You
- can relax this restriction by setting QWebSettings::LocalContentCanAccessRemoteUrls to
+ can relax this restriction by setting QWebEngineSettings::LocalContentCanAccessRemoteUrls to
\c{true}.
- Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a
+ Call QWebEnginePage::securityOrigin() to get the QWebEngineSecurityOrigin for a frame in a
web page, and use host(), scheme() and port() to identify the security origin.
Use databases() to access the databases defined within a security origin. The
@@ -60,37 +61,37 @@
For more information refer to the
\l{http://en.wikipedia.org/wiki/Same_origin_policy}{"Same origin policy" Wikipedia Article}.
- \sa QWebFrame::securityOrigin()
+ \sa QWebEnginePage::securityOrigin()
*/
/*!
- \fn QString QWebSecurityOrigin::scheme() const
+ \fn QString QWebEngineSecurityOrigin::scheme() const
Returns the scheme defining the security origin.
*/
/*!
- \fn QString QWebSecurityOrigin::host() const
+ \fn QString QWebEngineSecurityOrigin::host() const
Returns the host name defining the security origin.
*/
/*!
- \fn int QWebSecurityOrigin::port() const
+ \fn int QWebEngineSecurityOrigin::port() const
Returns the port number defining the security origin.
*/
/*!
- \fn qint64 QWebSecurityOrigin::databaseUsage() const
+ \fn qint64 QWebEngineSecurityOrigin::databaseUsage() const
Returns the number of bytes all databases in the security origin
use on the disk.
*/
/*!
- \fn qint64 QWebSecurityOrigin::databaseQuota() const
+ \fn qint64 QWebEngineSecurityOrigin::databaseQuota() const
Returns the quota for the databases in the security origin.
*/
/*!
- \fn void QWebSecurityOrigin::setDatabaseQuota(qint64 quota)
+ \fn void QWebEngineSecurityOrigin::setDatabaseQuota(qint64 quota)
Sets the quota for the databases in the security origin to \a quota bytes.
If the quota is set to a value less than the current usage, the quota will remain
@@ -99,34 +100,34 @@
*/
/*!
- \fn QWebSecurityOrigin::~QWebSecurityOrigin()
+ \fn QWebEngineSecurityOrigin::~QWebEngineSecurityOrigin()
Destroys the security origin.
*/
/*!
- \fn QList<QWebSecurityOrigin> QWebSecurityOrigin::allOrigins()
+ \fn QList<QWebEngineSecurityOrigin> QWebEngineSecurityOrigin::allOrigins()
Returns a list of all security origins with a database quota defined.
*/
/*!
- \fn QList<QWebDatabase> QWebSecurityOrigin::databases() const
+ \fn QList<QWebEngineDatabase> QWebEngineSecurityOrigin::databases() const
Returns a list of all databases defined in the security origin.
*/
/*!
- \fn void QWebSecurityOrigin::addLocalScheme(const QString& scheme)
+ \fn void QWebEngineSecurityOrigin::addLocalScheme(const QString& scheme)
\since 4.6
Adds the given \a scheme to the list of schemes that are considered equivalent
to the \c file: scheme.
- Cross domain restrictions depend on the two web settings QWebSettings::LocalContentCanAccessFileUrls
- and QWebSettings::LocalContentCanAccessFileUrls. By default all local schemes are concidered to be
+ Cross domain restrictions depend on the two web settings QWebEngineSettings::LocalContentCanAccessFileUrls
+ and QWebEngineSettings::LocalContentCanAccessFileUrls. By default all local schemes are concidered to be
in the same security origin, and local schemes can not access remote content.
*/
/*!
- \fn void QWebSecurityOrigin::removeLocalScheme(const QString& scheme)
+ \fn void QWebEngineSecurityOrigin::removeLocalScheme(const QString& scheme)
\since 4.6
Removes the given \a scheme from the list of local schemes.
@@ -138,7 +139,7 @@
*/
/*!
- \fn QStringList QWebSecurityOrigin::localSchemes()
+ \fn QStringList QWebEngineSecurityOrigin::localSchemes()
\since 4.6
Returns a list of all the schemes concidered to be local.
diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
index e24ab64e1..af639f196 100644
--- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
This library is free software; you can redistribute it and/or
@@ -22,36 +23,36 @@
// placed inline in the code as usual.
/*!
- \class QWebSettings
+ \class QWebEngineSettings
\since 4.4
- \brief The QWebSettings class provides an object to store the settings used
- by QWebPage and QWebFrame.
+ \brief The QWebEngineSettings class provides an object to store the settings used
+ by QWebEnginePage.
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- Each QWebPage object has its own QWebSettings object, which configures the
+ Each QWebEnginePage object has its own QWebEngineSettings object, which configures the
settings for that page. If a setting is not configured, then it is looked
up in the global settings object, which can be accessed using
globalSettings().
- QWebSettings allows configuration of browser properties, such as font sizes and
+ QWebEngineSettings allows configuration of browser properties, such as font sizes and
families, the location of a custom style sheet, and generic attributes like
JavaScript and plugins. Individual attributes are set using the setAttribute()
- function. The \l{QWebSettings::WebAttribute}{WebAttribute} enum further describes
+ function. The \l{QWebEngineSettings::WebAttribute}{WebAttribute} enum further describes
each attribute.
- QWebSettings also configures global properties such as the web page memory
+ QWebEngineSettings also configures global properties such as the web page memory
cache, icon database, local database storage and offline
applications storage.
\section1 Enabling Plugins
Support for browser plugins can enabled by setting the
- \l{QWebSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications,
+ \l{QWebEngineSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications,
this attribute is enabled for all pages by setting it on the
\l{globalSettings()}{global settings object}. Qt WebKit will always ignore this setting
when processing Qt plugins. The decision to allow a Qt plugin is made by the client
- in its reimplementation of QWebPage::createPlugin().
+ in its reimplementation of QWebEnginePage::createPlugin().
\section1 Web Application Support
@@ -65,19 +66,19 @@
setOfflineStoragePath() with an appropriate file path, and can limit the quota
for each application by calling setOfflineStorageDefaultQuota().
- \sa QWebPage::settings(), QWebView::settings(), {Web Browser}
+ \sa QWebEnginePage::settings(), QWebEngineView::settings(), {WebEngine Tab Browser Example}
*/
/*!
- \fn QWebSettings* QWebSettings::globalSettings()
+ \fn QWebEngineSettings* QWebEngineSettings::globalSettings()
Returns the global settings object.
Any setting changed on the default object is automatically applied to all
- QWebPage instances where the particular setting is not overridden already.
+ QWebEnginePage instances where the particular setting is not overridden already.
*/
/*!
- \enum QWebSettings::FontFamily
+ \enum QWebEngineSettings::FontFamily
This enum describes the generic font families defined by CSS 2.
For more information see the
@@ -92,19 +93,19 @@
*/
/*!
- \enum QWebSettings::FontSize
+ \enum QWebEngineSettings::FontSize
- This enum describes the font sizes configurable through QWebSettings.
+ This enum describes the font sizes configurable through QWebEngineSettings.
\value MinimumFontSize The hard minimum font size.
\value MinimumLogicalFontSize The minimum logical font size that is applied
- when zooming out with QWebFrame::setTextSizeMultiplier().
+ when zooming out with QWebEnginePage::setTextSizeMultiplier().
\value DefaultFontSize The default font size for regular text.
\value DefaultFixedFontSize The default font size for fixed-pitch text.
*/
/*!
- \enum QWebSettings::ThirdPartyCookiePolicy
+ \enum QWebEngineSettings::ThirdPartyCookiePolicy
This enum describes the policies configurable for accepting and sending
third-party cookies. These are cookies that are set or retrieved when fetching
@@ -119,13 +120,13 @@
*/
/*!
- \enum QWebSettings::WebGraphic
+ \enum QWebEngineSettings::WebGraphic
This enums describes the standard graphical elements used in webpages.
\value MissingImageGraphic The replacement graphic shown when an image could not be loaded.
\value MissingPluginGraphic The replacement graphic shown when a plugin could not be loaded.
- \value DefaultFrameIconGraphic The default icon for QWebFrame::icon().
+ \value DefaultFrameIconGraphic The default icon for QWebEnginePage::icon().
\value TextAreaSizeGripCornerGraphic The graphic shown for the size grip of text areas.
\value DeleteButtonGraphic The graphic shown for the WebKit-Editing-Delete-Button in Deletion UI.
\value InputSpeechButtonGraphic The graphic shown in input fields that support speech recognition.
@@ -134,9 +135,9 @@
*/
/*!
- \enum QWebSettings::WebAttribute
+ \enum QWebEngineSettings::WebAttribute
- This enum describes various attributes that are configurable through QWebSettings.
+ This enum describes various attributes that are configurable through QWebEngineSettings.
\value AutoLoadImages Specifies whether images are automatically loaded in
web pages. This is enabled by default.
@@ -158,7 +159,7 @@
can read or write to the clipboard. This is disabled by default.
\value DeveloperExtrasEnabled Enables extra tools for Web developers.
Currently this enables the "Inspect" element in the context menu as
- well as the use of QWebInspector which controls the web inspector
+ well as the use of QWebEngineInspector which controls the web inspector
for web site debugging. This is disabled by default.
\value SpatialNavigationEnabled Enables or disables the Spatial Navigation
feature, which consists in the ability to navigate between focusable
@@ -181,14 +182,14 @@
local storage feature is enabled or not. This is disabled by default.
(This value was introduced in 4.6.)
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
- QWebSettings::LocalStorageEnabled instead.
+ QWebEngineSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are
allowed to access remote urls. This is disabled by default. For more information
- about security origins and local vs. remote content see QWebSecurityOrigin.
+ about security origins and local vs. remote content see QWebEngineSecurityOrigin.
(This value was introduced in 4.6.)
\value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are
allowed to access other local urls. This is enabled by default. For more information
- about security origins and local vs. remote content see QWebSecurityOrigin.
+ about security origins and local vs. remote content see QWebEngineSecurityOrigin.
\value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site
scripting attempts. Suspicious scripts will be blocked and reported in the inspector's
JavaScript console. Enabling this feature might have an impact on performance
@@ -222,25 +223,25 @@
*/
/*!
- \fn void QWebSettings::setFontSize(FontSize type, int size)
+ \fn void QWebEngineSettings::setFontSize(FontSize type, int size)
Sets the font size for \a type to \a size.
*/
/*!
- \fn int QWebSettings::fontSize(FontSize type) const
+ \fn int QWebEngineSettings::fontSize(FontSize type) const
Returns the default font size for \a type.
*/
/*!
- \fn void QWebSettings::resetFontSize(FontSize type)
+ \fn void QWebEngineSettings::resetFontSize(FontSize type)
Resets the font size for \a type to the size specified in the global
settings object.
- This function has no effect on the global QWebSettings instance.
+ This function has no effect on the global QWebEngineSettings instance.
*/
/*!
- \fn void QWebSettings::setUserStyleSheetUrl(const QUrl& location)
+ \fn void QWebEngineSettings::setUserStyleSheetUrl(const QUrl& location)
Specifies the location of a user stylesheet to load with every web page.
The \a location must be either a path on the local filesystem, or a data URL
@@ -254,14 +255,14 @@
*/
/*!
- \fn QUrl QWebSettings::userStyleSheetUrl() const
+ \fn QUrl QWebEngineSettings::userStyleSheetUrl() const
Returns the location of the user stylesheet.
\sa setUserStyleSheetUrl()
*/
/*!
- \fn void QWebSettings::setDefaultTextEncoding(const QString& encoding)
+ \fn void QWebEngineSettings::setDefaultTextEncoding(const QString& encoding)
\since 4.6
Specifies the default text encoding system.
@@ -273,7 +274,7 @@
*/
/*!
- \fn QString QWebSettings::defaultTextEncoding() const
+ \fn QString QWebEngineSettings::defaultTextEncoding() const
\since 4.6
Returns the default text encoding.
@@ -281,7 +282,7 @@
*/
/*!
- \fn void QWebSettings::setIconDatabasePath(const QString& path)
+ \fn void QWebEngineSettings::setIconDatabasePath(const QString& path)
Sets the path of the icon database to \a path. The icon database is used
to store "favicons" associated with web sites.
@@ -293,7 +294,7 @@
*/
/*!
- \fn QString QWebSettings::iconDatabasePath()
+ \fn QString QWebEngineSettings::iconDatabasePath()
Returns the path of the icon database or an empty string if the icon
database is disabled.
@@ -301,12 +302,12 @@
*/
/*!
- \fn void QWebSettings::clearIconDatabase()
+ \fn void QWebEngineSettings::clearIconDatabase()
Clears the icon database.
*/
/*!
- \fn QIcon QWebSettings::iconForUrl(const QUrl& url)
+ \fn QIcon QWebEngineSettings::iconForUrl(const QUrl& url)
Returns the web site's icon for \a url.
If the web site does not specify an icon \b OR if the icon is not in the
@@ -318,18 +319,18 @@
*/
/*!
- \fn void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap& graphic)
+ \fn void QWebEngineSettings::setWebGraphic(WebGraphic type, const QPixmap& graphic)
Sets \a graphic to be drawn when Qt WebKit needs to draw an image of the
given \a type.
For example, when an image cannot be loaded, the pixmap specified by
- \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.
+ \l{QWebEngineSettings::WebGraphic}{MissingImageGraphic} is drawn instead.
\sa webGraphic()
*/
/*!
- \fn QPixmap QWebSettings::webGraphic(WebGraphic type)
+ \fn QPixmap QWebEngineSettings::webGraphic(WebGraphic type)
Returns a previously set pixmap used to draw replacement graphics of the
specified \a type.
@@ -337,7 +338,7 @@
*/
/*!
- \fn void QWebSettings::clearMemoryCaches()
+ \fn void QWebEngineSettings::clearMemoryCaches()
Frees up as much memory as possible by calling the JavaScript garbage collector and cleaning all memory caches such
as page, object and font cache.
@@ -345,7 +346,7 @@
*/
/*!
- \fn void QWebSettings::setMaximumPagesInCache(int pages)
+ \fn void QWebEngineSettings::setMaximumPagesInCache(int pages)
Sets the maximum number of pages to hold in the memory page cache to \a pages.
The Page Cache allows for a nicer user experience when navigating forth or back
@@ -357,12 +358,12 @@
*/
/*!
- \fn int QWebSettings::maximumPagesInCache()
+ \fn int QWebEngineSettings::maximumPagesInCache()
Returns the maximum number of web pages that are kept in the memory cache.
*/
/*!
- \fn void QWebSettings::setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity)
+ \fn void QWebEngineSettings::setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity)
Specifies the capacities for the memory cache for dead objects such as
stylesheets or scripts.
@@ -380,17 +381,17 @@
*/
/*!
- \fn void QWebSettings::setThirdPartyCookiePolicy(ThirdPartyCookiePolicy policy)
+ \fn void QWebEngineSettings::setThirdPartyCookiePolicy(ThirdPartyCookiePolicy policy)
Sets the third-party cookie policy, the default is AlwaysAllowThirdPartyCookies.
*/
/*!
- \fn QWebSettings::ThirdPartyCookiePolicy QWebSettings::thirdPartyCookiePolicy() const
+ \fn QWebEngineSettings::ThirdPartyCookiePolicy QWebEngineSettings::thirdPartyCookiePolicy() const
Returns the third-party cookie policy.
*/
/*!
- \fn void QWebSettings::setCSSMediaType(const QString& type)
+ \fn void QWebEngineSettings::setCSSMediaType(const QString& type)
Sets the CSS media type to \a type.
Setting this will override the normal value of the CSS media property.
@@ -399,58 +400,58 @@
*/
/*!
- \fn QString QWebSettings::cssMediaType() const
+ \fn QString QWebEngineSettings::cssMediaType() const
Returns the current CSS media type.
\note It will only return the value set through setCSSMediaType and not the one used internally.
*/
/*!
- \fn void QWebSettings::setFontFamily(FontFamily which, const QString& family)
+ \fn void QWebEngineSettings::setFontFamily(FontFamily which, const QString& family)
Sets the actual font family to \a family for the specified generic family,
\a which.
*/
/*!
- \fn QString QWebSettings::fontFamily(FontFamily which) const
+ \fn QString QWebEngineSettings::fontFamily(FontFamily which) const
Returns the actual font family for the specified generic font family,
\a which.
*/
/*!
- \fn void QWebSettings::resetFontFamily(FontFamily which)
+ \fn void QWebEngineSettings::resetFontFamily(FontFamily which)
Resets the actual font family specified by \a which to the one set
- in the global QWebSettings instance.
+ in the global QWebEngineSettings instance.
- This function has no effect on the global QWebSettings instance.
+ This function has no effect on the global QWebEngineSettings instance.
*/
/*!
- \fn void QWebSettings::setAttribute(WebAttribute attribute, bool on)
+ \fn void QWebEngineSettings::setAttribute(WebAttribute attribute, bool on)
Enables or disables the specified \a attribute feature depending on the
value of \a on.
*/
/*!
- \fn bool QWebSettings::testAttribute(WebAttribute attribute) const
+ \fn bool QWebEngineSettings::testAttribute(WebAttribute attribute) const
Returns true if \a attribute is enabled; otherwise returns false.
*/
/*!
- \fn void QWebSettings::resetAttribute(WebAttribute attribute)
+ \fn void QWebEngineSettings::resetAttribute(WebAttribute attribute)
Resets the setting of \a attribute to the value specified in the
- global QWebSettings instance.
+ global QWebEngineSettings instance.
- This function has no effect on the global QWebSettings instance.
+ This function has no effect on the global QWebEngineSettings instance.
\sa globalSettings()
*/
/*!
- \fn void QWebSettings::setOfflineStoragePath(const QString& path)
+ \fn void QWebEngineSettings::setOfflineStoragePath(const QString& path)
\since 4.5
Sets \a path as the save location for HTML5 client-side database storage data.
@@ -460,13 +461,13 @@
Setting an empty path disables the feature.
Support for client-side databases can enabled by setting the
- \l{QWebSettings::OfflineStorageDatabaseEnabled}{OfflineStorageDatabaseEnabled} attribute.
+ \l{QWebEngineSettings::OfflineStorageDatabaseEnabled}{OfflineStorageDatabaseEnabled} attribute.
\sa offlineStoragePath()
*/
/*!
- \fn QString QWebSettings::offlineStoragePath()
+ \fn QString QWebEngineSettings::offlineStoragePath()
\since 4.5
Returns the path of the HTML5 client-side database storage or an empty string if the
@@ -476,7 +477,7 @@
*/
/*!
- \fn void QWebSettings::setOfflineStorageDefaultQuota(qint64 maximumSize)
+ \fn void QWebEngineSettings::setOfflineStorageDefaultQuota(qint64 maximumSize)
\since 4.5
Sets the value of the default quota for new offline storage databases
@@ -484,14 +485,14 @@
*/
/*!
- \fn qint64 QWebSettings::offlineStorageDefaultQuota()
+ \fn qint64 QWebEngineSettings::offlineStorageDefaultQuota()
\since 4.5
Returns the value of the default quota for new offline storage databases.
*/
/*!
- \fn void QWebSettings::setOfflineWebApplicationCachePath(const QString& path)
+ \fn void QWebEngineSettings::setOfflineWebApplicationCachePath(const QString& path)
\since 4.6
Sets the path for HTML5 offline web application cache storage to \a path.
@@ -509,13 +510,13 @@
Setting an empty path disables the feature.
Support for offline web application cache storage can enabled by setting the
- \l{QWebSettings::OfflineWebApplicationCacheEnabled}{OfflineWebApplicationCacheEnabled} attribute.
+ \l{QWebEngineSettings::OfflineWebApplicationCacheEnabled}{OfflineWebApplicationCacheEnabled} attribute.
\sa offlineWebApplicationCachePath()
*/
/*!
- \fn QString QWebSettings::offlineWebApplicationCachePath()
+ \fn QString QWebEngineSettings::offlineWebApplicationCachePath()
\since 4.6
Returns the path of the HTML5 offline web application cache storage
@@ -525,7 +526,7 @@
*/
/*!
- \fn void QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)
+ \fn void QWebEngineSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)
\since 4.6
Sets the value of the quota for the offline web application cache
@@ -533,14 +534,14 @@
*/
/*!
- \fn qint64 QWebSettings::offlineWebApplicationCacheQuota()
+ \fn qint64 QWebEngineSettings::offlineWebApplicationCacheQuota()
\since 4.6
Returns the value of the quota for the offline web application cache.
*/
/*!
- \fn void QWebSettings::setLocalStoragePath(const QString& path)
+ \fn void QWebEngineSettings::setLocalStoragePath(const QString& path)
\since 4.6
Sets the path for HTML5 local storage to \a path.
@@ -549,13 +550,13 @@
\l{http://www.w3.org/TR/webstorage/#the-localstorage-attribute}{Web Storage standard}.
Support for local storage can enabled by setting the
- \l{QWebSettings::LocalStorageEnabled}{LocalStorageEnabled} attribute.
+ \l{QWebEngineSettings::LocalStorageEnabled}{LocalStorageEnabled} attribute.
\sa localStoragePath()
*/
/*!
- \fn QString QWebSettings::localStoragePath() const
+ \fn QString QWebEngineSettings::localStoragePath() const
\since 4.6
Returns the path for HTML5 local storage.
@@ -564,7 +565,7 @@
*/
/*!
- \fn void QWebSettings::enablePersistentStorage(const QString& path)
+ \fn void QWebEngineSettings::enablePersistentStorage(const QString& path)
\since 4.6
Enables WebKit data persistence and sets the path to \a path.
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 9440ebd83..4be4fa079 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -1,4 +1,5 @@
/*
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2008 Holger Hans Peter Freyther
Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
@@ -24,27 +25,23 @@
// placed inline in the code as usual.
/*!
- \class QWebView
+ \class QWebEngineView
\since 4.4
- \brief The QWebView class provides a widget that is used to view and edit
+ \brief The QWebEngineView class provides a widget that is used to view and edit
web documents.
\ingroup advanced
- \inmodule QtWebKit
+ \inmodule QtWebEngine
- QWebView is the main widget component of the Qt WebKit web browsing module.
+ QWebEngineView is the main widget component of the Qt WebKit web browsing module.
It can be used in various applications to display web content live from the
Internet.
- The image below shows QWebView previewed in \QD with a Nokia website.
-
- \image qwebview-url.png
-
- A web site can be loaded onto QWebView with the load() function. Like all
+ A web site can be loaded onto QWebEngineView with the load() function. Like all
Qt widgets, the show() function must be invoked in order to display
- QWebView. The snippet below illustrates this:
+ QWebEngineView. The snippet below illustrates this:
- \snippet webkitsnippets/simple/main.cpp Using QWebView
+ \snippet snippets/simple/main.cpp Using QWebEngineView
Alternatively, setUrl() can also be used to load a web site. If you have
the HTML content readily available, you can use setHtml() instead.
@@ -57,9 +54,9 @@
load success or failure.
The page() function returns a pointer to the web page object. See
- \l{Elements of QWebView} for an explanation of how the web page
+ \l{Elements of QWebEngineView} for an explanation of how the web page
is related to the view. To modify your web view's settings, you can access
- the QWebSettings object with the settings() function. With QWebSettings,
+ the QWebEngineSettings object with the settings() function. With QWebEngineSettings,
you can change the default fonts, enable or disable features such as
JavaScript and plugins.
@@ -77,56 +74,52 @@
encapsulated within the QAction objects returned by pageAction(). These
actions can be programmatically triggered using triggerPageAction().
Alternatively, the actions can be added to a toolbar or a menu directly.
- QWebView maintains the state of the returned actions but allows
+ QWebEngineView maintains the state of the returned actions but allows
modification of action properties such as \l{QAction::}{text} or
\l{QAction::}{icon}.
- A QWebView can be printed onto a QPrinter using the print() function.
+ A QWebEngineView can be printed onto a QPrinter using the print() function.
This function is marked as a slot and can be conveniently connected to
\l{QPrintPreviewDialog}'s \l{QPrintPreviewDialog::}{paintRequested()}
signal.
If you want to provide support for web sites that allow the user to open
- new windows, such as pop-up windows, you can subclass QWebView and
+ new windows, such as pop-up windows, you can subclass QWebEngineView and
reimplement the createWindow() function.
- \section1 Elements of QWebView
-
- QWebView consists of other objects such as QWebFrame and QWebPage. The
- flowchart below shows these elements are related.
-
- \image qwebview-diagram.png
+ \section1 Elements of QWebEngineView
- \note It is possible to use QWebPage and QWebFrame, without using QWebView,
+ QWebEngineView also consists of a QWebEnginePage.
+ It is possible to use QWebEnginePage without using QWebEngineView,
if you do not require QWidget attributes. Nevertheless, Qt WebKit depends
on QtGui, so you should use a QApplication instead of QCoreApplication.
- \sa {Previewer Example}, {Web Browser}, {Form Extractor Example},
- {Google Chat Example}, {Fancy Browser Example}
+ \sa {Previewer Example}, {WebEngine Tab Browser Example}, {Form Extractor Example},
+ {Google Chat Example}, {WebEngine Fancy Browser Example}
*/
/*!
- \fn QWebView::QWebView(QWidget *parent)
- Constructs an empty QWebView with parent \a parent.
+ \fn QWebEngineView::QWebEngineView(QWidget *parent)
+ Constructs an empty QWebEngineView with parent \a parent.
\sa load()
*/
/*!
- \fn QWebView::~QWebView()
+ \fn QWebEngineView::~QWebEngineView()
Destroys the web view.
*/
/*!
- \fn QWebPage *QWebView::page() const
+ \fn QWebEnginePage *QWebEngineView::page() const
Returns a pointer to the underlying web page.
\sa setPage()
*/
/*!
- \fn void QWebView::setPage(QWebPage* page)
+ \fn void QWebEngineView::setPage(QWebEnginePage* page)
Makes \a page the new web page of the web view.
The parent QObject of the provided page remains the owner
@@ -137,7 +130,7 @@
*/
/*!
- \fn void QWebView::load(const QUrl &url)
+ \fn void QWebEngineView::load(const QUrl &url)
Loads the specified \a url and displays it.
\note The view remains the same until enough data has arrived to display the new \a url.
@@ -146,8 +139,8 @@
*/
/*!
- \fn void QWebView::load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation, const QByteArray &body)
- \fn void QWebView::load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation, const QByteArray &body)
+ \fn void QWebEngineView::load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation, const QByteArray &body)
+ \fn void QWebEngineView::load(const QNetworkRequest &request, QNetworkAccessManager::Operation operation, const QByteArray &body)
Loads a network request, \a request, using the method specified in \a operation.
@@ -160,7 +153,7 @@
/*!
- \fn void QWebView::setHtml(const QString &html, const QUrl &baseUrl)
+ \fn void QWebEngineView::setHtml(const QString &html, const QUrl &baseUrl)
Sets the content of the web view to the specified \a html.
External objects such as stylesheets or images referenced in the HTML
@@ -179,11 +172,11 @@
\warning This function works only for HTML, for other mime types (i.e. XHTML, SVG)
setContent() should be used instead.
- \sa load(), setContent(), QWebFrame::toHtml(), QWebFrame::setContent()
+ \sa load(), setContent(), QWebEnginePage::toHtml(), QWebEnginePage::setContent()
*/
/*!
- \fn void QWebView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
+ \fn void QWebEngineView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
Sets the content of the web view to the specified content \a data. If the \a mimeType argument
is empty it is currently assumed that the content is HTML but in future versions we may introduce
auto-detection.
@@ -192,31 +185,31 @@
The \a data is loaded immediately; external objects are loaded asynchronously.
- \sa load(), setHtml(), QWebFrame::toHtml()
+ \sa load(), setHtml(), QWebEnginePage::toHtml()
*/
/*!
- \fn QWebHistory *QWebView::history() const
+ \fn QWebEngineHistory *QWebEngineView::history() const
Returns a pointer to the view's history of navigated web pages.
It is equivalent to
- \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 0
+ \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 0
*/
/*!
- \fn QWebSettings *QWebView::settings() const
+ \fn QWebEngineSettings *QWebEngineView::settings() const
Returns a pointer to the view/page specific settings object.
It is equivalent to
- \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 1
+ \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 1
- \sa QWebSettings::globalSettings()
+ \sa QWebEngineSettings::globalSettings()
*/
/*!
- \property QWebView::title
+ \property QWebEngineView::title
\brief the title of the web page currently viewed
By default, this property contains an empty string.
@@ -225,7 +218,7 @@
*/
/*!
- \property QWebView::url
+ \property QWebEngineView::url
\brief the url of the web page currently viewed
Setting this property clears the view and loads the URL.
@@ -237,16 +230,16 @@
/*!
- \property QWebView::icon
+ \property QWebEngineView::icon
\brief the icon associated with the web page currently viewed
By default, this property contains a null icon.
- \sa iconChanged(), QWebSettings::iconForUrl()
+ \sa iconChanged(), QWebEngineSettings::iconForUrl()
*/
/*!
- \property QWebView::hasSelection
+ \property QWebEngineView::hasSelection
\brief whether this page contains selected content or not.
By default, this property is false.
@@ -255,7 +248,7 @@
*/
/*!
- \property QWebView::selectedText
+ \property QWebEngineView::selectedText
\brief the text currently selected
By default, this property contains an empty string.
@@ -265,7 +258,7 @@
/*!
\since 4.8
- \property QWebView::selectedHtml
+ \property QWebEngineView::selectedHtml
\brief the HTML currently selected
By default, this property contains an empty string.
@@ -274,25 +267,25 @@
*/
/*!
- \fn QAction *QWebView::pageAction(QWebPage::WebAction action) const
+ \fn QAction *QWebEngineView::pageAction(QWebEnginePage::WebAction action) const
Returns a pointer to a QAction that encapsulates the specified web action \a action.
*/
/*!
- \fn void QWebView::triggerPageAction(QWebPage::WebAction action, bool checked)
+ \fn void QWebEngineView::triggerPageAction(QWebEnginePage::WebAction action, bool checked)
Triggers the specified \a action. If it is a checkable action the specified
\a checked state is assumed.
The following example triggers the copy action and therefore copies any
selected text to the clipboard.
- \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 2
+ \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 2
\sa pageAction()
*/
/*!
- \property QWebView::modified
+ \property QWebEngineView::modified
\brief whether the document was modified by the user
Parts of HTML documents can be editable for example through the
@@ -302,7 +295,7 @@
*/
/*
- \property QWebView::textInteractionFlags
+ \property QWebEngineView::textInteractionFlags
\brief how the view should handle user input
Specifies how the user can interact with the text on the page.
@@ -310,39 +303,39 @@
/*!
- \property QWebView::zoomFactor
+ \property QWebEngineView::zoomFactor
\since 4.5
\brief the zoom factor for the view
*/
/*!
- \property QWebView::textSizeMultiplier
+ \property QWebEngineView::textSizeMultiplier
\brief the scaling factor for all text in the frame
\obsolete
Use setZoomFactor instead, in combination with the
- ZoomTextOnly attribute in QWebSettings.
+ ZoomTextOnly attribute in QWebEngineSettings.
\note Setting this property also enables the
- ZoomTextOnly attribute in QWebSettings.
+ ZoomTextOnly attribute in QWebEngineSettings.
By default, this property contains a value of 1.0.
*/
/*!
- \fn void QWebView::setTextSizeMultiplier(qreal factor)
+ \fn void QWebEngineView::setTextSizeMultiplier(qreal factor)
Sets the value of the multiplier used to scale the text in a Web page to
the \a factor specified.
*/
/*!
- \fn qreal QWebView::textSizeMultiplier() const
+ \fn qreal QWebEngineView::textSizeMultiplier() const
Returns the value of the multiplier used to scale the text in a Web page.
*/
/*!
- \property QWebView::renderHints
+ \property QWebEngineView::renderHints
\since 4.6
\brief the default render hints for the view
@@ -354,7 +347,7 @@
*/
/*!
- \fn QPainter::RenderHints QWebView::renderHints() const
+ \fn QPainter::RenderHints QWebEngineView::renderHints() const
\since 4.6
Returns the render hints used by the view to render content.
@@ -362,7 +355,7 @@
*/
/*!
- \fn void QWebView::setRenderHints(QPainter::RenderHints hints)
+ \fn void QWebEngineView::setRenderHints(QPainter::RenderHints hints)
\since 4.6
Sets the render hints used by the view to the specified \a hints.
@@ -370,7 +363,7 @@
*/
/*!
- \fn void QWebView::setRenderHint(QPainter::RenderHint hint, bool enabled)
+ \fn void QWebEngineView::setRenderHint(QPainter::RenderHint hint, bool enabled)
\since 4.6
If \a enabled is true, enables the specified render \a hint; otherwise
disables it.
@@ -379,7 +372,7 @@
*/
/*!
- \fn bool QWebView::findText(const QString &subString, QWebPage::FindFlags options)
+ \fn bool QWebEngineView::findText(const QString &subString, QWebEnginePage::FindFlags options)
Finds the specified string, \a subString, in the page, using the given \a options.
If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences
@@ -397,57 +390,57 @@
*/
/*!
- \fn void QWebView::print(QPrinter *printer) const
+ \fn void QWebEngineView::print(QPrinter *printer) const
Prints the main frame to the given \a printer.
- \sa QWebFrame::print(), QPrintPreviewDialog
+ \sa QWebEnginePage::print(), QPrintPreviewDialog
*/
/*!
- \fn void QWebView::stop()
+ \fn void QWebEngineView::stop()
Convenience slot that stops loading the document.
It is equivalent to
- \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 3
+ \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 3
\sa reload(), pageAction(), loadFinished()
*/
/*!
- \fn void QWebView::back()
+ \fn void QWebEngineView::back()
Convenience slot that loads the previous document in the list of documents
built by navigating links. Does nothing if there is no previous document.
It is equivalent to
- \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 4
+ \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 4
\sa forward(), pageAction()
*/
/*!
- \fn void QWebView::forward()
+ \fn void QWebEngineView::forward()
Convenience slot that loads the next document in the list of documents
built by navigating links. Does nothing if there is no next document.
It is equivalent to
- \snippet webkitsnippets/qtwebkit_qwebview_snippet.cpp 5
+ \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 5
\sa back(), pageAction()
*/
/*!
- \fn void QWebView::reload()
+ \fn void QWebEngineView::reload()
Reloads the current document.
\sa stop(), pageAction(), loadStarted()
*/
/*!
- \fn QWebView *QWebView::createWindow(QWebPage::WebWindowType type)
- This function is called from the createWindow() method of the associated QWebPage,
+ \fn QWebEngineView *QWebEngineView::createWindow(QWebEnginePage::WebWindowType type)
+ This function is called from the createWindow() method of the associated QWebEnginePage,
each time the page wants to create a new window of the given \a type. This might
be the result, for example, of a JavaScript request to open a document in a new window.
@@ -456,13 +449,13 @@
\note In the cases when the window creation is being triggered by JavaScript, apart from
reimplementing this method application must also set the JavaScriptCanOpenWindows attribute
- of QWebSettings to true in order for it to get called.
+ of QWebEngineSettings to true in order for it to get called.
- \sa QWebPage::createWindow(), QWebPage::acceptNavigationRequest()
+ \sa QWebEnginePage::createWindow(), QWebEnginePage::acceptNavigationRequest()
*/
/*!
- \fn void QWebView::titleChanged(const QString &title)
+ \fn void QWebEngineView::titleChanged(const QString &title)
This signal is emitted whenever the \a title of the main frame changes.
@@ -470,7 +463,7 @@
*/
/*!
- \fn void QWebView::urlChanged(const QUrl &url)
+ \fn void QWebEngineView::urlChanged(const QUrl &url)
This signal is emitted when the \a url of the view changes.
@@ -478,24 +471,24 @@
*/
/*!
- \fn void QWebView::statusBarMessage(const QString& text)
+ \fn void QWebEngineView::statusBarMessage(const QString& text)
This signal is emitted when the status bar \a text is changed by the page.
*/
/*!
- \fn void QWebView::iconChanged()
+ \fn void QWebEngineView::iconChanged()
This signal is emitted whenever the icon of the page is loaded or changes.
In order for icons to be loaded, you will need to set an icon database path
- using QWebSettings::setIconDatabasePath().
+ using QWebEngineSettings::setIconDatabasePath().
- \sa icon(), QWebSettings::setIconDatabasePath()
+ \sa icon(), QWebEngineSettings::setIconDatabasePath()
*/
/*!
- \fn void QWebView::loadStarted()
+ \fn void QWebEngineView::loadStarted()
This signal is emitted when a new load of the page is started.
@@ -504,7 +497,7 @@
/*!
- \fn void QWebView::loadFinished(bool ok)
+ \fn void QWebEngineView::loadFinished(bool ok)
This signal is emitted when a load of the page is finished.
\a ok will indicate whether the load was successful or any error occurred.
@@ -513,7 +506,7 @@
*/
/*!
- \fn void QWebView::selectionChanged()
+ \fn void QWebEngineView::selectionChanged()
This signal is emitted whenever the selection changes.
@@ -521,7 +514,7 @@
*/
/*!
- \fn void QWebView::loadProgress(int progress)
+ \fn void QWebEngineView::loadProgress(int progress)
This signal is emitted every time an element in the web page
completes loading and the overall loading progress advances.
@@ -535,10 +528,10 @@
*/
/*!
- \fn void QWebView::linkClicked(const QUrl &url)
+ \fn void QWebEngineView::linkClicked(const QUrl &url)
This signal is emitted whenever the user clicks on a link and the page's linkDelegationPolicy
property is set to delegate the link handling for the specified \a url.
- \sa QWebPage::linkDelegationPolicy()
+ \sa QWebEnginePage::linkDelegationPolicy()
*/
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index c97e4b61e..5de78c270 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -6,6 +6,8 @@ DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
QT += widgets network
QT_PRIVATE += webenginecore widgets-private gui-private network-private core-private
+QMAKE_DOCS = $$PWD/doc/qtwebenginewidgets.qdocconf
+
INCLUDEPATH += $$PWD api ../core
SOURCES = \