summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
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 /src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
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>
Diffstat (limited to 'src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc')
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc173
1 files changed, 83 insertions, 90 deletions
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()
*/