From 0862f71c8d3ee22ba9cf5173c262e78994999d5f Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 11 Mar 2014 15:15:51 +0100 Subject: Import the QtWebKit documentation This places the documentation in separates .qdoc files with the original license header preserved. We don't want to contaminate our implementation yet just for the documentation, so keep it separate for now. New documentation that isn't attached to the QtWebKit LGPL license should go inline in the code as usual. Change-Id: I113a9ad2b826ed7cea053be065f201b637070d28 Reviewed-by: Andras Becsi --- .../doc/snippets/qtwebengine_build_snippet.qdoc | 8 + .../qtwebengine_qwebengineinspector_snippet.cpp | 38 + .../qtwebengine_qwebengineview_snippet.cpp | 58 + src/webenginewidgets/doc/snippets/simple/main.cpp | 34 + .../doc/snippets/simple/simple.pro | 2 + .../doc/snippets/webelement/main.cpp | 125 ++ .../doc/snippets/webelement/webelement.pro | 2 + src/webenginewidgets/doc/snippets/webpage/main.cpp | 82 + .../doc/snippets/webpage/webpage.pro | 3 + .../doc/src/qtwebenginewidgets.qdoc | 237 +++ .../doc/src/qwebenginehistory_lgpl.qdoc | 301 +++ .../doc/src/qwebenginehistoryinterface_lgpl.qdoc | 83 + .../doc/src/qwebengineinspector_lgpl.qdoc | 103 + .../doc/src/qwebenginepage_lgpl.qdoc | 1962 ++++++++++++++++++++ .../doc/src/qwebenginesecurityorigin_lgpl.qdoc | 148 ++ .../doc/src/qwebenginesettings_lgpl.qdoc | 578 ++++++ .../doc/src/qwebengineview_lgpl.qdoc | 544 ++++++ 17 files changed, 4308 insertions(+) create mode 100644 src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc create mode 100644 src/webenginewidgets/doc/snippets/qtwebengine_qwebengineinspector_snippet.cpp create mode 100644 src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp create mode 100644 src/webenginewidgets/doc/snippets/simple/main.cpp create mode 100644 src/webenginewidgets/doc/snippets/simple/simple.pro create mode 100644 src/webenginewidgets/doc/snippets/webelement/main.cpp create mode 100644 src/webenginewidgets/doc/snippets/webelement/webelement.pro create mode 100644 src/webenginewidgets/doc/snippets/webpage/main.cpp create mode 100644 src/webenginewidgets/doc/snippets/webpage/webpage.pro create mode 100644 src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebenginesecurityorigin_lgpl.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc create mode 100644 src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc (limited to 'src/webenginewidgets') diff --git a/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc b/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc new file mode 100644 index 000000000..d4fc2bd85 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc @@ -0,0 +1,8 @@ +//! [0] +QT += webkit +//! [0] + + +//! [1] +#include +//! [1] diff --git a/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineinspector_snippet.cpp b/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineinspector_snippet.cpp new file mode 100644 index 000000000..5e57de027 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineinspector_snippet.cpp @@ -0,0 +1,38 @@ +/* + Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +void wrapInFunction() +{ + +//! [0] + // ... + QWebPage *page = new QWebPage; + // ... + + QWebInspector *inspector = new QWebInspector; + inspector->setPage(page); +//! [0] + +} + diff --git a/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp b/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp new file mode 100644 index 000000000..2bf43b848 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp @@ -0,0 +1,58 @@ +/* + Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +void wrapInFunction() +{ + +//! [0] + view->page()->history(); +//! [0] + + +//! [1] + view->page()->settings(); +//! [1] + + +//! [2] + view->triggerAction(QWebPage::Copy); +//! [2] + + +//! [3] + view->page()->triggerPageAction(QWebPage::Stop); +//! [3] + + +//! [4] + view->page()->triggerPageAction(QWebPage::GoBack); +//! [4] + + +//! [5] + view->page()->triggerPageAction(QWebPage::GoForward); +//! [5] + +} + diff --git a/src/webenginewidgets/doc/snippets/simple/main.cpp b/src/webenginewidgets/doc/snippets/simple/main.cpp new file mode 100644 index 000000000..408630eb1 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/simple/main.cpp @@ -0,0 +1,34 @@ +/* + Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +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/")); + view->show(); +//! [Using QWebView] + return app.exec(); +} diff --git a/src/webenginewidgets/doc/snippets/simple/simple.pro b/src/webenginewidgets/doc/snippets/simple/simple.pro new file mode 100644 index 000000000..7fe095809 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/simple/simple.pro @@ -0,0 +1,2 @@ +QT += webkitwidgets +SOURCES = main.cpp diff --git a/src/webenginewidgets/doc/snippets/webelement/main.cpp b/src/webenginewidgets/doc/snippets/webelement/main.cpp new file mode 100644 index 000000000..b1781a6f4 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/webelement/main.cpp @@ -0,0 +1,125 @@ +/* + Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include + +static QWebFrame *frame; + +static void traverse() +{ +//! [Traversing with QWebElement] + frame->setHtml("

First Paragraph

Second Paragraph

"); + QWebElement doc = frame->documentElement(); + QWebElement body = doc.firstChild(); + QWebElement firstParagraph = body.firstChild(); + QWebElement secondParagraph = firstParagraph.nextSibling(); +//! [Traversing with QWebElement] +} + +static void findButtonAndClick() +{ + + frame->setHtml("
" + "" + "" + "
"); + +//! [Calling a DOM element method] + + QWebElement document = frame->documentElement(); + /* Assume that the document has the following structure: + +
+ + +
+ + */ + + QWebElement button = document.findFirst("input[type=submit]"); + button.evaluateJavaScript("click()"); + +//! [Calling a DOM element method] + + } + +static void autocomplete1() +{ + QWebElement document = frame->documentElement(); + +//! [autocomplete1] + QWebElement firstTextInput = document.findFirst("input[type=text]"); + QString storedText = firstTextInput.attribute("value"); +//! [autocomplete1] + +} + + +static void autocomplete2() +{ + + QWebElement document = frame->documentElement(); + QString storedText = "text"; + +//! [autocomplete2] + QWebElement firstTextInput = document.findFirst("input[type=text]"); + textInput.setAttribute("value", storedText); +//! [autocomplete2] + +} + + +static void findAll() +{ +//! [FindAll] + QWebElement document = frame->documentElement(); + /* Assume the document has the following structure: + +

+ Intro + Snippets +

+

+ Content + Here +

+ */ + +//! [FindAll intro] + QWebElementCollection allSpans = document.findAll("span"); + QWebElementCollection introSpans = document.findAll("p.intro span"); +//! [FindAll intro] //! [FindAll] +} + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QWebView *view = new QWebView(0); + frame = view->page()->mainFrame(); + traverse(); + findAll(); + findButtonAndClick(); + autocomplete1(); + autocomplete2(); + return 0; +} diff --git a/src/webenginewidgets/doc/snippets/webelement/webelement.pro b/src/webenginewidgets/doc/snippets/webelement/webelement.pro new file mode 100644 index 000000000..fbe701314 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/webelement/webelement.pro @@ -0,0 +1,2 @@ +TEMPLATE = app +SOURCES = main.cpp diff --git a/src/webenginewidgets/doc/snippets/webpage/main.cpp b/src/webenginewidgets/doc/snippets/webpage/main.cpp new file mode 100644 index 000000000..daeed2bc6 --- /dev/null +++ b/src/webenginewidgets/doc/snippets/webpage/main.cpp @@ -0,0 +1,82 @@ +/* + Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +//! [0] +class Thumbnailer : public QObject +{ + Q_OBJECT + +public: + Thumbnailer(const QUrl &url); + +Q_SIGNALS: + void finished(); + +private Q_SLOTS: + void render(); + +private: + QWebPage page; + +}; +//! [0] + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + Thumbnailer thumbnail(QUrl("http://qt.nokia.com")); + + QObject::connect(&thumbnail, SIGNAL(finished()), + &app, SLOT(quit())); + + return app.exec(); +} + +//! [1] +Thumbnailer::Thumbnailer(const QUrl &url) +{ + page.mainFrame()->load(url); + connect(&page, SIGNAL(loadFinished(bool)), + this, SLOT(render())); +} +//! [1] + +//! [2] +void Thumbnailer::render() +{ + page.setViewportSize(page.mainFrame()->contentsSize()); + QImage image(page.viewportSize(), QImage::Format_ARGB32); + QPainter painter(&image); + + page.mainFrame()->render(&painter); + painter.end(); + + QImage thumbnail = image.scaled(400, 400); + thumbnail.save("thumbnail.png"); + + emit finished(); +} +//! [2] +#include "main.moc" diff --git a/src/webenginewidgets/doc/snippets/webpage/webpage.pro b/src/webenginewidgets/doc/snippets/webpage/webpage.pro new file mode 100644 index 000000000..8d9c6938e --- /dev/null +++ b/src/webenginewidgets/doc/snippets/webpage/webpage.pro @@ -0,0 +1,3 @@ +CONFIG += console +QT += webkitwidgets +SOURCES = main.cpp diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc new file mode 100644 index 000000000..5847d1403 --- /dev/null +++ b/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc @@ -0,0 +1,237 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \module QtWebKit + \title Qt WebKit 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 + + To link against the module, add this line to your \l qmake \c + .pro file: + + \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0 +*/ + +/*! + \page qtwebkitwidgets-index.html + \title Qt WebKit Widgets + \ingroup modules + + \brief The Qt WebKit 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 + 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 + 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. + + \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 + + To link against the module, add this line to your \l qmake \c + .pro file: + + \snippet webkitsnippets/qtwebkit_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 + 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 + + QWebView is used to view Web pages. An instance of QWebView has one + QWebPage. QWebPage 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 + 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 + 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} + attribute must be enabled for the application. + + The following locations are searched for plugins: + + \table + \header \li Linux/Unix (X11) + \row \li + \list + \li \c{.mozilla/plugins} in the user's home directory + \li \c{.netscape/plugins} in the user's home directory + \li System locations, such as + \list + \li \c{/usr/lib/browser/plugins} + \li \c{/usr/local/lib/mozilla/plugins} + \li \c{/usr/lib/firefox/plugins} + \li \c{/usr/lib64/browser-plugins} + \li \c{/usr/lib/browser-plugins} + \li \c{/usr/lib/mozilla/plugins} + \li \c{/usr/local/netscape/plugins} + \li \c{/opt/mozilla/plugins} + \li \c{/opt/mozilla/lib/plugins} + \li \c{/opt/netscape/plugins} + \li \c{/opt/netscape/communicator/plugins} + \li \c{/usr/lib/netscape/plugins} + \li \c{/usr/lib/netscape/plugins-libc5} + \li \c{/usr/lib/netscape/plugins-libc6} + \li \c{/usr/lib64/netscape/plugins} + \li \c{/usr/lib64/mozilla/plugins} + \endlist + \li Locations specified by environment variables: + \list + \li \c{$MOZILLA_HOME/plugins} + \li \c{$MOZ_PLUGIN_PATH} + \li \c{$QTWEBKIT_PLUGIN_PATH} + \endlist + \endlist + \endtable + + \table + \header \li Windows + \row \li + \list + \li The user's \c{Application Data\Mozilla\plugins} directory + \li Standard system locations of plugins for Quicktime, Flash, etc. + \endlist + \endtable + + \table + \header \li Mac OS X + \row \li + \list + \li \c{Library/Internet Plug-Ins} in the user's home directory + \li The system \c{/Library/Internet Plug-Ins} directory + \endlist + \endtable + + \section1 Examples + + There are several Qt WebKit Widgets examples located in the + \l{Qt WebKit Examples} page. + + \section1 License Information + + This is a snapshot of the Qt port of WebKit. 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 + 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. + Individual contributor names and copyright dates can be found + inline in the code. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + \endlegalese +*/ diff --git a/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc new file mode 100644 index 000000000..fc6d5e50e --- /dev/null +++ b/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc @@ -0,0 +1,301 @@ +/* + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +// The documentation in this file was imported from QtWebKit and is thus constrained +// by its LGPL license. Documentation written from scratch for new methods should be +// placed inline in the code as usual. + +/*! + \class QWebHistoryItem + \since 4.4 + \brief The QWebHistoryItem class represents one item in the history of a QWebPage + + \inmodule QtWebKit + + Each QWebHistoryItem 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 + the functions used to access them. + + \table + \header \li Function \li Description + \row \li title() \li The page title. + \row \li url() \li The location of the page. + \row \li originalUrl() \li The URL used to access the page. + \row \li lastVisited() \li The date and time of the user's last visit to the page. + \row \li icon() \li The icon associated with the page that was provided by the server. + \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 + instance. + + \sa QWebHistory, QWebPage::history(), QWebHistoryInterface +*/ + +/*! + \fn QWebHistoryItem::QWebHistoryItem(const QWebHistoryItem &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) + 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() + Destroys the history item. +*/ + +/*! + \fn QUrl QWebHistoryItem::originalUrl() const + Returns the original URL associated with the history item. + + \sa url() +*/ + +/*! + \fn QUrl QWebHistoryItem::url() const + Returns the URL associated with the history item. + + \sa originalUrl(), title(), lastVisited() +*/ + +/*! + \fn QString QWebHistoryItem::title() const + Returns the title of the page associated with the history item. + + \sa icon(), url(), lastVisited() +*/ + +/*! + \fn QDateTime QWebHistoryItem::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 + Returns the icon associated with the history item. + + \sa title(), url(), lastVisited() +*/ + +/*! + \fn QVariant QWebHistoryItem::userData() const + \since 4.5 + Returns the user specific data that was stored with the history item. + + \sa setUserData() +*/ + +/*! + \fn void QWebHistoryItem::setUserData(const QVariant& userData) + \since 4.5 + + Stores user specific data \a userData with the history item. + + \note All copies of this item will be modified. + + \sa userData() +*/ + +/*! + \fn bool QWebHistoryItem::isValid() const + \since 4.5 + Returns whether this is a valid history item. +*/ + +/*! + \class QWebHistory + \since 4.4 + \brief The QWebHistory class represents the history of a QWebPage + + \inmodule QtWebKit + + Each QWebPage instance contains a history of visited pages that can be accessed + by QWebPage::history(). QWebHistory represents this history and makes it possible + to navigate it. + + The history uses the concept of a \e{current item}, dividing the pages visited + into those that can be visited by navigating \e back and \e forward using the + back() and forward() functions. The current item can be obtained by calling + currentItem(), and an arbitrary item in the history can be made the current + item by passing it to goToItem(). + + A list of items describing the pages that can be visited by going back can be + obtained by calling the backItems() function; similarly, items describing the + pages ahead of the current page can be obtained with the forwardItems() function. + The total list of items is obtained with the items() function. + + Just as with containers, functions are available to examine the history in terms + of a list. Arbitrary items in the history can be obtained with itemAt(), the total + 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 + by using the << operator. + + \sa QWebHistoryItem, QWebHistoryInterface, QWebPage +*/ + +/*! + \fn void QWebHistory::clear() + Clears the history. + + \sa count(), items() +*/ + +/*! + \fn QList QWebHistory::items() const + Returns a list of all items currently in the history. + + \sa count(), clear() +*/ + +/*! + \fn QList QWebHistory::backItems(int maxItems) const + Returns the list of items in the backwards history list. + At most \a maxItems entries are returned. + + \sa forwardItems() +*/ + +/*! + \fn QList QWebHistory::forwardItems(int maxItems) const + Returns the list of items in the forward history list. + At most \a maxItems entries are returned. + + \sa backItems() +*/ + +/*! + \fn bool QWebHistory::canGoBack() const + Returns true if there is an item preceding the current item in the history; + otherwise returns false. + + \sa canGoForward() +*/ + +/*! + \fn bool QWebHistory::canGoForward() const + Returns true if we have an item to go forward to; otherwise returns false. + + \sa canGoBack() +*/ + +/*! + \fn void QWebHistory::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. + + \sa forward(), goToItem() +*/ + +/*! + \fn void QWebHistory::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. + + \sa back(), goToItem() +*/ + +/*! + \fn void QWebHistory::goToItem(const QWebHistoryItem &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 + Returns the item before the current item in the history. +*/ + +/*! + \fn QWebHistoryItem QWebHistory::currentItem() const + Returns the current item in the history. +*/ + +/*! + \fn QWebHistoryItem QWebHistory::forwardItem() const + Returns the item after the current item in the history. +*/ + +/*! + \fn int QWebHistory::currentItemIndex() const + \since 4.5 + Returns the index of the current item in history. +*/ + +/*! + \fn QWebHistoryItem QWebHistory::itemAt(int i) const + Returns the item at index \a i in the history. +*/ + +/*! + \fn int QWebHistory::count() const + Returns the total number of items in the history. +*/ + +/*! + \fn int QWebHistory::maximumItemCount() const + \since 4.5 + Returns the maximum number of items in the history. + + \sa setMaximumItemCount() +*/ + +/*! + \fn void QWebHistory::setMaximumItemCount(int count) + \since 4.5 + Sets the maximum number of items in the history to \a count. + + \sa maximumItemCount() +*/ + +/*! + \fn QDataStream& operator<<(QDataStream& target, const QWebHistory& history) + \since 4.6 + \relates QWebHistory + + \brief The operator<< function streams a history into a data stream. + + It saves the \a history into the specified \a stream. +*/ + + +/*! + \fn QDataStream& operator>>(QDataStream& source, QWebHistory& history) + \relates QWebHistory + \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. +*/ + diff --git a/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc new file mode 100644 index 000000000..1d17e7ce0 --- /dev/null +++ b/src/webenginewidgets/doc/src/qwebenginehistoryinterface_lgpl.qdoc @@ -0,0 +1,83 @@ +/* + Copyright (C) 2007 Staikos Computing Services Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + + This class provides all functionality needed for tracking global history. +*/ + +// The documentation in this file was imported from QtWebKit and is thus constrained +// by its LGPL license. Documentation written from scratch for new methods should be +// placed inline in the code as usual. + +/*! + \class QWebHistoryInterface + \since 4.4 + \brief The QWebHistoryInterface class provides an interface to implement link history. + + \inmodule QtWebKit + + The QWebHistoryInterface 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 + track of visited links. + + \note The history tracked by QWebHistoryInterface is not specific to an instance of QWebPage + but applies to all pages. +*/ + +/*! + \fn void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface* 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 + \a defaultInterface if it does not have a parent. +*/ + +/*! + \fn QWebHistoryInterface* QWebHistoryInterface::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 QWebHistoryInterface::~QWebHistoryInterface() + Destroys the interface. If this is currently the default interface it will be unset. +*/ + +/*! + \fn bool QWebHistoryInterface::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 + + 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 new file mode 100644 index 000000000..864618309 --- /dev/null +++ b/src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc @@ -0,0 +1,103 @@ +/* + Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +// The documentation in this file was imported from QtWebKit and is thus constrained +// by its LGPL license. Documentation written from scratch for new methods should be +// placed inline in the code as usual. + +/*! + \class QWebInspector + \since 4.6 + \inmodule QtWebKit + \brief The QWebInspector class allows the placement and control of a + QWebPage'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. + + A typical use of QWebInspector follows: + + \snippet webkitsnippets/qtwebkit_qwebinspector_snippet.cpp 0 + + A QWebInspector can be made visible either programmatically using + setVisible(), or by the user through the attached QWebPage's context + menu. + + \note A QWebInspector will display a blank widget if either: + \list + \li page() is null + \li QWebSettings::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: + \list + \li an element is inspected + \li the QWebInspector is shown. + \endlist + + \section1 Inspector configuration persistence + + The inspector allows the user to configure some options through its + 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, + the only way to enable those settings to be persisted is currently to enable + local storage globally through QWebSettings::globalSettings(). + + \sa QWebSettings::localStoragePath(), QWebSettings::LocalStorageEnabled +*/ + +/*! + \fn QWebInspector::QWebInspector(QWidget* parent) + Constructs an unbound QWebInspector with \a parent as its parent. +*/ + +/*! + \fn QWebInspector::~QWebInspector() + Destroys the inspector. +*/ + +/*! + \fn void QWebInspector::setPage(QWebPage* page) + Bind this inspector to the QWebPage to be inspected. + + \b {Notes:} + \list + \li There can only be one QWebInspector associated with a QWebPage + 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 + \endlist + + \sa page() +*/ + +/*! + \fn QWebPage* QWebInspector::page() const + Returns the inspected QWebPage. + 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 new file mode 100644 index 000000000..a63ac9c6f --- /dev/null +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -0,0 +1,1962 @@ +/* + Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2007 Staikos Computing Services Inc. + Copyright (C) 2007 Apple Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +// The documentation in this file was imported from QtWebKit and is thus constrained +// by its LGPL license. Documentation written from scratch for new methods should be +// placed inline in the code as usual. + +/*! + \class QWebPage + \since 4.4 + \brief The QWebPage class provides an object to view and edit web documents. + + \inmodule QtWebKit + + 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. + + QWebPage's API is very similar to QWebView, 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. + + The loadStarted() signal is emitted when the page begins to load.The + loadProgress() signal, on the other hand, is emitted whenever an element + of the web page completes loading, such as an embedded image, a script, + etc. Finally, the loadFinished() signal is emitted when the page contents + are loaded completely, independent of script execution or page rendering. + Its argument, either true or false, indicates whether or not the load + operation succeeded. + + \section1 Using QWebPage in a Widget-less Environment + + Before you begin painting a QWebPage 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 + is shown in the code snippet below. + + Suppose we have a \c Thumbnail class as follows: + + \snippet webkitsnippets/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, + \c render(). + + \snippet webkitsnippets/webpage/main.cpp 1 + + The \c render() function shows how we can paint a thumbnail using a + QWebPage object. + + \snippet webkitsnippets/webpage/main.cpp 2 + + We begin by setting the \l{QWebPage::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 + 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() + \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 + called from the default contextMenuEvent() handler. The popup menu's + ownership is transferred to the caller. + */ + +/*! + \property QWebPage::palette + \brief the page's palette + + The base brush of the palette is used to draw the background of the main frame. + + By default, this property contains the application's default palette. +*/ + +/*! + \fn QVariant QWebPage::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. + + \a property specifies which property is queried. + + \sa QWidget::inputMethodEvent(), QInputMethodEvent, QInputContext +*/ + +/*! + \enum QWebPage::FindFlag + + This enum describes the options available to the findText() function. The options + can be OR-ed together from the following list: + + \value FindBackward Searches backwards instead of forwards. + \value FindCaseSensitively By default findText() works case insensitive. Specifying this option + changes the behavior to a case sensitive find operation. + \value FindWrapsAroundDocument Makes findText() restart from the beginning of the document if the end + was reached and the text was not found. + \value HighlightAllOccurrences Highlights all existing occurrences of a specific string. + (This value was introduced in 4.6.) + \value FindAtWordBeginningsOnly Searches for the sub-string only at the beginnings of words. + (This value was introduced in 5.2.) + \value TreatMedialCapitalAsWordBeginning Treats a capital letter occurring anywhere in the middle of a word + as the beginning of a new word. + (This value was introduced in 5.2.) + \value FindBeginsInSelection Begin searching inside the text selection first. + (This value was introduced in 5.2.) +*/ + +/*! + \enum QWebPage::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 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 +*/ + +/*! + \enum QWebPage::NavigationType + + This enum describes the types of navigation available when browsing through hyperlinked + documents. + + \value NavigationTypeLinkClicked The user clicked on a link or pressed return on a focused link. + \value NavigationTypeFormSubmitted The user activated a submit button for an HTML form. + \value NavigationTypeBackOrForward Navigation to a previously shown document in the back or forward history is requested. + \value NavigationTypeReload The user activated the reload action. + \value NavigationTypeFormResubmitted An HTML form was submitted a second time. + \value NavigationTypeOther A navigation to another document using a method not listed above. + + \sa acceptNavigationRequest() +*/ + +/*! + \enum QWebPage::WebAction + + This enum describes the types of action which can be performed on the web page. + + Actions only have an effect when they are applicable. The availability of + actions can be be determined by checking \l{QAction::}{isEnabled()} on the + action returned by action(). + + One method of enabling the text editing, cursor movement, and text selection actions + is by setting \l contentEditable to true. + + \value NoWebAction No action is triggered. + \value OpenLink Open the current link. + \value OpenLinkInNewWindow Open the current link in a new window. + \value OpenLinkInThisWindow Open the current link without opening a new window. Used on links that would default to opening in another frame or a new window. (Added in Qt 5.0) + \value OpenFrameInNewWindow Replicate the current frame in a new window. + \value DownloadLinkToDisk Download the current link to the disk. + \value CopyLinkToClipboard Copy the current link to the clipboard. + \value OpenImageInNewWindow Open the highlighted image in a new window. + \value DownloadImageToDisk Download the highlighted image to the disk. + \value CopyImageToClipboard Copy the highlighted image to the clipboard. (Added in Qt 4.8) + \value CopyImageUrlToClipboard Copy the highlighted image's URL to the clipboard. + \value Back Navigate back in the history of navigated links. + \value Forward Navigate forward in the history of navigated links. + \value Stop Stop loading the current page. + \value StopScheduledPageRefresh Stop all pending page refresh/redirect requests. (Added in Qt 4.7) + \value Reload Reload the current page. + \value ReloadAndBypassCache Reload the current page, but do not use any local cache. (Added in Qt 4.6) + \value Cut Cut the content currently selected into the clipboard. + \value Copy Copy the content currently selected into the clipboard. + \value Paste Paste content from the clipboard. + \value Undo Undo the last editing action. + \value Redo Redo the last editing action. + \value MoveToNextChar Move the cursor to the next character. + \value MoveToPreviousChar Move the cursor to the previous character. + \value MoveToNextWord Move the cursor to the next word. + \value MoveToPreviousWord Move the cursor to the previous word. + \value MoveToNextLine Move the cursor to the next line. + \value MoveToPreviousLine Move the cursor to the previous line. + \value MoveToStartOfLine Move the cursor to the start of the line. + \value MoveToEndOfLine Move the cursor to the end of the line. + \value MoveToStartOfBlock Move the cursor to the start of the block. + \value MoveToEndOfBlock Move the cursor to the end of the block. + \value MoveToStartOfDocument Move the cursor to the start of the document. + \value MoveToEndOfDocument Move the cursor to the end of the document. + \value SelectNextChar Select to the next character. + \value SelectPreviousChar Select to the previous character. + \value SelectNextWord Select to the next word. + \value SelectPreviousWord Select to the previous word. + \value SelectNextLine Select to the next line. + \value SelectPreviousLine Select to the previous line. + \value SelectStartOfLine Select to the start of the line. + \value SelectEndOfLine Select to the end of the line. + \value SelectStartOfBlock Select to the start of the block. + \value SelectEndOfBlock Select to the end of the block. + \value SelectStartOfDocument Select to the start of the document. + \value SelectEndOfDocument Select to the end of the document. + \value DeleteStartOfWord Delete to the start of the word. + \value DeleteEndOfWord Delete to the end of the word. + \value SetTextDirectionDefault Set the text direction to the default direction. + \value SetTextDirectionLeftToRight Set the text direction to left-to-right. + \value SetTextDirectionRightToLeft Set the text direction to right-to-left. + \value ToggleBold Toggle the formatting between bold and normal weight. + \value ToggleItalic Toggle the formatting between italic and normal style. + \value ToggleUnderline Toggle underlining. + \value InspectElement Show the Web Inspector with the currently highlighted HTML element. + \value InsertParagraphSeparator Insert a new paragraph. + \value InsertLineSeparator Insert a new line. + \value SelectAll Selects all content. + \value PasteAndMatchStyle Paste content from the clipboard with current style. (Added in Qt 4.6) + \value RemoveFormat Removes formatting and style. (Added in Qt 4.6) + \value ToggleStrikethrough Toggle the formatting between strikethrough and normal style. (Added in Qt 4.6) + \value ToggleSubscript Toggle the formatting between subscript and baseline. (Added in Qt 4.6) + \value ToggleSuperscript Toggle the formatting between supercript and baseline. (Added in Qt 4.6) + \value InsertUnorderedList Toggles the selection between an ordered list and a normal block. (Added in Qt 4.6) + \value InsertOrderedList Toggles the selection between an ordered list and a normal block. (Added in Qt 4.6) + \value Indent Increases the indentation of the currently selected format block by one increment. (Added in Qt 4.6) + \value Outdent Decreases the indentation of the currently selected format block by one increment. (Added in Qt 4.6) + \value AlignCenter Applies center alignment to content. (Added in Qt 4.6) + \value AlignJustified Applies full justification to content. (Added in Qt 4.6) + \value AlignLeft Applies left justification to content. (Added in Qt 4.6) + \value AlignRight Applies right justification to content. (Added in Qt 4.6) + + \omitvalue WebActionCount + +*/ + +/*! + \enum QWebPage::WebWindowType + + This enum describes the types of window that can be created by the createWindow() function. + + \value WebBrowserWindow The window is a regular web browser window. + \value WebModalDialog The window acts as modal dialog. +*/ + +/*! + \class QWebPage::ViewportAttributes + \since 4.7 + \brief The QWebPage::ViewportAttributes class describes hints that can be applied to a viewport. + + QWebPage::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. + + ViewportAttributes can be set by a web author using the viewport meta tag extension, documented + at \l{http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html}{Safari Reference Library: Using the Viewport Meta Tag}. + + 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 +*/ + +/*! + \fn QWebPage::ViewportAttributes::ViewportAttributes() + Constructs an empty QWebPage::ViewportAttributes. +*/ + +/*! + \fn QWebPage::ViewportAttributes::ViewportAttributes(const QWebPage::ViewportAttributes& other) + Constructs a QWebPage::ViewportAttributes which is a copy from \a other . +*/ + +/*! + \fn QWebPage::ViewportAttributes::~ViewportAttributes() + Destroys the QWebPage::ViewportAttributes. +*/ + +/*! + \fn QWebPage::ViewportAttributes& QWebPage::ViewportAttributes::operator=(const QWebPage::ViewportAttributes& other) + Assigns the given QWebPage::ViewportAttributes to this viewport hints and returns a + reference to this. +*/ + +/*! \fn inline bool QWebPage::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 + Returns the size of the viewport. +*/ + +/*! \fn inline qreal QWebPage::ViewportAttributes::initialScaleFactor() const + Returns the initial scale of the viewport as a multiplier. +*/ + +/*! \fn inline qreal QWebPage::ViewportAttributes::minimumScaleFactor() const + Returns the minimum scale value of the viewport as a multiplier. +*/ + +/*! \fn inline qreal QWebPage::ViewportAttributes::maximumScaleFactor() const + Returns the maximum scale value of the viewport as a multiplier. +*/ + +/*! \fn inline bool QWebPage::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 QWebPage::~QWebPage() + Destroys the web page. +*/ + +/*! + \fn QWebFrame *QWebPage::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 + want to explicitly render a web page into a given painter. + + \sa currentFrame() +*/ + +/*! + \fn QWebFrame *QWebPage::currentFrame() const + Returns the frame currently active. + + \sa mainFrame(), frameCreated() +*/ + +/*! + \fn QWebFrame* QWebPage::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 + that position. + + \sa mainFrame(), currentFrame() +*/ + +/*! + \fn QWebHistory *QWebPage::history() const + Returns a pointer to the view's history of navigated web pages. +*/ + +/*! + \fn void QWebPage::setView(QWidget* view) + Sets the \a view that is associated with the web page. + + \sa view() +*/ + +/*! + \fn QWidget *QWebPage::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) + 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. + + The default implementation prints nothing. +*/ + +/*! + \fn void QWebPage::javaScriptAlert(QWebFrame *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. + + The default implementation shows the message, \a msg, with QMessageBox::information. +*/ + +/*! + \fn bool QWebPage::javaScriptConfirm(QWebFrame *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. + + The default implementation executes the query using QMessageBox::information with QMessageBox::Ok and QMessageBox::Cancel buttons. +*/ + +/*! + \fn bool QWebPage::javaScriptPrompt(QWebFrame *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. + + If the prompt was cancelled by the user the implementation should return false; otherwise the + result should be written to \a result and true should be returned. If the prompt was not cancelled by the + user, the implementation should return true and the result string must not be null. + + The default implementation uses QInputDialog::getText(). +*/ + +/*! + \fn bool QWebPage::shouldInterruptJavaScript() + \since 4.6 + This function is called when a JavaScript program is running for a long period of time. + + If the user wanted to stop the JavaScript the implementation should return true; otherwise false. + + The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons. +*/ + +/*! + \fn QWebPage *QWebPage::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 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 \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. + + \sa acceptNavigationRequest(), QWebView::createWindow() +*/ + +/*! + \fn QObject *QWebPage::createPlugin(const QString &classid, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) + 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 + 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 bool QWebPage::supportsContentType(const QString& mimeType) const + Returns true if QWebPage can handle the given \a mimeType; otherwise, returns false. +*/ + +/*! + \fn void QWebPage::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. + + If \a action is a checkable action then \a checked specified whether the action + is toggled or not. + + \sa action() +*/ + +/*! + \fn void QWebPage::setViewportSize(const QSize &size) const + \property QWebPage::viewportSize + \brief the size of the viewport + + The size affects for example the visibility of scrollbars + if the document is larger than the viewport. + + By default, for a newly-created Web page, this property contains a size with + zero width and height. + + \sa QWebFrame::render(), preferredContentsSize +*/ + +/*! + \fn QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& availableSize) const + Computes the optimal viewport configuration given the \a availableSize, when + user interface components are disregarded. + + The configuration is also dependent on the device screen size which is obtained + automatically. For testing purposes the size can be overridden by setting two + environment variables QTWEBKIT_DEVICE_WIDTH and QTWEBKIT_DEVICE_HEIGHT, which + both needs to be set. + + The ViewportAttributes includes a pixel density ratio, which will also be exposed to + the web author though the -webkit-pixel-ratio media feature. This is the ratio + between 1 density-independent pixel (DPI) and physical pixels. + + A density-independent pixel is equivalent to one physical pixel on a 160 DPI screen, + so on our platform assumes that as the baseline density. + + The conversion of DIP units to screen pixels is quite simple: + + pixels = DIPs * (density / 160). + + Thus, on a 240 DPI screen, 1 DIPs would equal 1.5 physical pixels. + + An invalid instance will be returned in the case an empty size is passed to the + method. + + \note The density is automatically obtained from the DPI of the screen where the page + is being shown, but as many X11 servers are reporting wrong DPI, it is possible to + override it using QX11Info::setAppDpiY(). +*/ + +/*! + \fn void QWebPage::setPreferredContentsSize(const QSize& size) const + \property QWebPage::preferredContentsSize + \since 4.6 + \brief a custom size used for laying out the page contents. + + By default all pages are laid out using the viewport of the page as the base. + + As pages mostly are designed for desktop usage, they often do not layout properly + on small devices as the contents require a certain view width. For this reason + it is common to use a different layout size and then scale the contents to fit + within the actual view. + + If this property is set to a valid size, this size is used for all layout needs + instead of the size of the viewport. + + Setting an invalid size, makes the page fall back to using the viewport size for layout. + + \sa viewportSize +*/ + +/* + \fn void QWebPage::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. + + \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 +*/ + +/*! + \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::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. + + If \a frame is a null pointer then navigation to a new window is requested. If the request is + 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. + + \sa createWindow() +*/ + +/*! + \fn bool QWebPage::hasSelection() const + \property QWebPage::hasSelection + \brief whether this page contains selected content or not. + + \sa selectionChanged() +*/ + +/*! + \fn QString QWebPage::selectedText() const + \property QWebPage::selectedText + \brief the text currently selected + + By default, this property contains an empty string. + + \sa selectionChanged(), selectedHtml() +*/ + +/*! + \fn QString QWebPage::selectedHtml() const + \since 4.8 + \property QWebPage::selectedHtml + \brief the HTML currently selected + + By default, this property contains an empty string. + + \sa selectionChanged(), selectedText() +*/ + +/*! + \fn QAction *QWebPage::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 + changing its properties. + + QWebPage 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 + \brief whether the page contains unsubmitted form data, or the contents have been changed. + + By default, this property is false. + + \sa contentsChanged(), contentEditable, undoStack() +*/ + +/*! + \fn QUndoStack *QWebPage::undoStack() const + Returns a pointer to the undo stack used for editable content. + + \sa modified +*/ + +/*! + \fn bool QWebPage::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. + + Returns true if it can find a new focusable element, or false if it can't. +*/ + +/*! + \fn void QWebPage::setContentEditable(bool editable) + \property QWebPage::contentEditable + \brief whether the content in this QWebPage 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 + cursor. If disabled (the default) only HTML elements in the web page with their + \c{contenteditable} attribute set are editable. + + \sa modified, contentsChanged(), WebAction +*/ + +/*! + \fn void QWebPage::setForwardUnsupportedContent(bool forward) + \property QWebPage::forwardUnsupportedContent + \brief whether QWebPage should forward unsupported content + + If enabled, the unsupportedContent() signal is emitted with a network reply that + can be used to read the content. + + If disabled, the download of such content is aborted immediately. + + By default unsupported content is not forwarded. +*/ + +/*! + \fn void QWebPage::setLinkDelegationPolicy(LinkDelegationPolicy policy) + \property QWebPage::linkDelegationPolicy + \brief how QWebPage should delegate the handling of links through the + linkClicked() signal + + The default is to delegate no links. +*/ + +/*! + \fn bool QWebPage::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. + + A web page may swallow a context menu event through a custom event handler, allowing for context + menus to be implemented in HTML/JavaScript. This is used by \l{http://maps.google.com/}{Google + Maps}, for example. +*/ + +/*! + \fn void QWebPage::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 + + 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(). + + \value ChooseMultipleFilesExtension Whether the web page supports multiple file selection. + This extension is invoked when the web content requests one or more file names, for example + as a result of the user clicking on a "file upload" button in a HTML form where multiple + file selection is allowed. + + \value ErrorPageExtension Whether the web page can provide an error page when loading fails. + (introduced in Qt 4.6) + + \sa ChooseMultipleFilesExtensionOption, ChooseMultipleFilesExtensionReturn, ErrorPageExtensionOption, ErrorPageExtensionReturn +*/ + +/*! + \enum QWebPage::ErrorDomain + \since 4.6 + + This enum describes the domain of an ErrorPageExtensionOption object (i.e. the layer in which the error occurred). + + \value QtNetwork The error occurred in the QtNetwork layer; the error code is of type QNetworkReply::NetworkError. + \value Http The error occurred in the HTTP layer; the error code is a HTTP status code (see QNetworkRequest::HttpStatusCodeAttribute). + \value WebKit The error is an internal WebKit error. +*/ + +/*! + \class QWebPage::ExtensionOption + \since 4.4 + \brief The ExtensionOption class provides an extended input argument to QWebPage's extension support. + + \inmodule QtWebKit + + \sa QWebPage::extension(), QWebPage::ExtensionReturn +*/ + +/*! + \class QWebPage::ExtensionReturn + \since 4.4 + \brief The ExtensionReturn class provides an output result from a QWebPage's extension. + + \inmodule QtWebKit + + \sa QWebPage::extension(), QWebPage::ExtensionOption +*/ + +/*! + \class QWebPage::ErrorPageExtensionOption + \since 4.6 + \brief The ErrorPageExtensionOption class describes the option + for the error page extension. + + \inmodule QtWebKit + + 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 +*/ + +/*! + \variable QWebPage::ErrorPageExtensionOption::url + \brief the url for which an error occurred +*/ + +/*! + \variable QWebPage::ErrorPageExtensionOption::frame + \brief the frame associated with the error +*/ + +/*! + \variable QWebPage::ErrorPageExtensionOption::domain + \brief the domain that reported the error +*/ + +/*! + \variable QWebPage::ErrorPageExtensionOption::error + \brief the error code. Interpretation of the value depends on the \a domain + \sa QWebPage::ErrorDomain +*/ + +/*! + \variable QWebPage::ErrorPageExtensionOption::errorString + \brief a string that describes the error +*/ + +/*! + \class QWebPage::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 + + 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 + is assumed to be UTF-8 if not indicated otherwise. + + The error page is stored in the \a content byte array, as HTML content. In order to convert a + QString to a byte array, the QString::toUtf8() method can be used. + + External objects such as stylesheets or images referenced in the HTML are located relative to + \a baseUrl. + + \sa QWebPage::extension(), QWebPage::ErrorPageExtensionOption, QString::toUtf8() +*/ + +/*! + \fn QWebPage::ErrorPageExtensionReturn::ErrorPageExtensionReturn() + + Constructs a new error page object. +*/ + +/*! + \variable QWebPage::ErrorPageExtensionReturn::contentType + \brief the error page's content type +*/ + +/*! + \variable QWebPage::ErrorPageExtensionReturn::encoding + \brief the error page encoding +*/ + +/*! + \variable QWebPage::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 + \brief the HTML content of the error page +*/ + +/*! + \class QWebPage::ChooseMultipleFilesExtensionOption + \since 4.5 + \brief The ChooseMultipleFilesExtensionOption class describes the option + for the multiple files selection extension. + + \inmodule QtWebKit + + The ChooseMultipleFilesExtensionOption class holds the frame originating the request + and the suggested filenames which might be provided. + + \sa QWebPage::extension(), QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn +*/ + +/*! + \variable QWebPage::ChooseMultipleFilesExtensionOption::parentFrame + \brief The frame in which the request originated +*/ + +/*! + \variable QWebPage::ChooseMultipleFilesExtensionOption::suggestedFileNames + \brief The suggested filenames +*/ + +/*! + \variable QWebPage::ChooseMultipleFilesExtensionReturn::fileNames + \brief The selected filenames +*/ + +/*! + \class QWebPage::ChooseMultipleFilesExtensionReturn + \since 4.5 + \brief The ChooseMultipleFilesExtensionReturn describes the return value + for the multiple files selection extension. + + \inmodule QtWebKit + + The ChooseMultipleFilesExtensionReturn class holds the filenames selected by the user + when the extension is invoked. + + \sa QWebPage::extension(), QWebPage::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 + 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 + and \a output values are typically casted to the corresponding types (for + example, ChooseMultipleFilesExtensionOption and + ChooseMultipleFilesExtensionReturn for ChooseMultipleFilesExtension). + + You can call supportsExtension() to check if an extension is supported by the page. + + Returns true if the extension was called successfully; otherwise returns false. + + \sa supportsExtension(), Extension +*/ + +/*! + \fn bool QWebPage::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) + 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 + that exist in the page. All subsequent calls will extend the highlight, rather than + replace it, with occurrences of the new string. + + If the HighlightAllOccurrences flag is not passed, the function will select an occurrence + and all subsequent calls will replace the current occurrence with the next one. + + To clear the selection, just pass an empty string. + + Returns true if \a subString was found; otherwise returns false. +*/ + +/*! + \fn QWebSettings *QWebPage::settings() const + Returns a pointer to the page's settings object. + + \sa QWebSettings::globalSettings() +*/ + +/*! + \fn QString QWebPage::chooseFile(QWebFrame *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. + + A suggested filename may be provided in \a suggestedFile. The frame originating the + request is provided as \a parentFrame. + + \sa ChooseMultipleFilesExtension +*/ + +/*! + \fn void QWebPage::setNetworkAccessManager(QNetworkAccessManager *manager) + Sets the QNetworkAccessManager \a manager responsible for serving network requests for this + QWebPage. + + \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. + + \sa networkAccessManager() +*/ + +/*! + \fn QNetworkAccessManager *QWebPage::networkAccessManager() const + Returns the QNetworkAccessManager that is responsible for serving network + requests for this QWebPage. + + \sa setNetworkAccessManager() +*/ + +/*! + \fn void QWebPage::setPluginFactory(QWebPluginFactory *factory) + Sets the QWebPluginFactory \a factory responsible for creating plugins embedded into this + QWebPage. + + Note: The plugin factory is only used if the QWebSettings::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. + + \sa setPluginFactory() +*/ + +/*! + \fn QString QWebPage::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. + + The default implementation returns the following value: + + "Mozilla/5.0 (%Platform%%Security%%Subplatform%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Safari/%WebKitVersion%" + + In this string the following values are replaced at run-time: + \list + \li %Platform% expands to the windowing system followed by "; " if it is not Windows (e.g. "X11; "). + \li %Security% expands to "N; " if SSL is disabled. + \li %Subplatform% expands to the operating system version (e.g. "Windows NT 6.1" or "Intel Mac OS X 10.5"). + \li %WebKitVersion% is the version of WebKit the application was compiled against. + \li %AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version. + \endlist +*/ + +/*! + \fn quint64 QWebPage::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. + + \sa bytesReceived() +*/ + +/*! + \fn quint64 QWebPage::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() + + 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() +*/ + +/*! + \fn void QWebPage::loadStarted() + + This signal is emitted when a page starts loading content. + + \sa loadFinished() +*/ + +/*! + \fn void QWebPage::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, + which is the default range of QProgressBar. + It accumulates changes from all the child frames. + + \sa bytesReceived() +*/ + +/*! + \fn void QWebPage::loadFinished(bool ok) + + This signal is emitted when the page finishes loading content. This signal + is independent of script execution or page rendering. + \a ok will indicate whether the load was successful or any error occurred. + + \sa loadStarted(), ErrorPageExtension +*/ + +/*! + \fn void QWebPage::linkHovered(const QString &link, const QString &title, const QString &textContent) + + This signal is emitted when the mouse hovers over a link. + + \a link contains the link url. + \a title is the link element's title, if it is specified in the markup. + \a textContent provides text within the link element, e.g., text inside an HTML anchor tag. + + When the mouse leaves the link element the signal is emitted with empty parameters. + + \sa linkClicked() +*/ + +/*! + \fn void QWebPage::statusBarMessage(const QString& text) + + This signal is emitted when the statusbar \a text is changed by the page. +*/ + +/*! + \fn void QWebPage::frameCreated(QWebFrame *frame) + + This signal is emitted whenever the page creates a new \a frame. + + \sa currentFrame() +*/ + +/*! + \fn void QWebPage::selectionChanged() + + This signal is emitted whenever the selection changes, either interactively + or programmatically (e.g. by calling triggerAction() with a selection action). + + \sa selectedText() +*/ + +/*! + \fn void QWebPage::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() +*/ + +/*! + \fn void QWebPage::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) + + 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 + the mainFrame() and call the render(QPainter*, const QRegion&) method with the + \a dirtyRect as the second parameter. + + \sa mainFrame() + \sa view() +*/ + +/*! + \fn void QWebPage::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. + + \sa view() +*/ + +/*! + \fn void QWebPage::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) + + 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 +*/ + +/*! + \fn void QWebPage::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' + directive. If "Content-Disposition" is present in \a reply, the web server is indicating + that the client should prompt the user to save the content regardless of content-type. + See RFC 2616 sections 19.5.1 for details about Content-Disposition. + + At signal emission time the meta-data of the QNetworkReply \a reply is available. + + \note The receiving slot is responsible for deleting the QNetworkReply \a reply. + + \note This signal is only emitted if the forwardUnsupportedContent property is set to true. + + \sa downloadRequested() +*/ + +/*! + \fn void QWebPage::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. + + \sa unsupportedContent() +*/ + +/*! + \fn void QWebPage::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 + the user is able to enter text. This signal is usually connected to the + QWidget::updateMicroFocus() slot. +*/ + +/*! + \fn void QWebPage::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. + + \note This signal possibly won't be emitted for clicked links which use + JavaScript to trigger navigation. + + \sa linkHovered() +*/ + +/*! + \fn void QWebPage::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. +*/ + +/*! + \fn void QWebPage::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. +*/ + +/*! + \fn void QWebPage::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. +*/ + +/*! + \fn void QWebPage::databaseQuotaExceeded(QWebFrame* 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 +*/ +/*! + \fn void QWebPage::applicationCacheQuotaExceeded(QWebSecurityOrigin* 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. + +*/ + +/*! + \since 4.5 + \fn void QWebPage::saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* 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 change. + + A potential use-case for this signal is to store custom data in + the QWebHistoryItem associated to the frame, using QWebHistoryItem::setUserData(). +*/ + +/*! + \since 4.5 + \fn void QWebPage::restoreFrameStateRequested(QWebFrame* 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{} or \c{