From 26d33081187c5b2865cfd2431202cacfde54c081 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 19 Aug 2015 12:30:48 +0200 Subject: Doc: reorganize and rename docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move general docs to src/webengine/doc/src - Remove a dedicated .qdocconf for Qt WebEngine Core, build its documentation as part of Qt WebEngine - Describe all Qt WebEngine modules on the Qt WebEngine index and overview pages - Add a wireframe drawing on the architecture Change-Id: Ib4261d1a16bbaf313d0f858515184a96dab524a5 Reviewed-by: Topi Reiniƶ --- src/core/core_module.pro | 2 - src/core/doc/qtwebenginecore.qdocconf | 32 -- src/core/doc/src/qtwebenginecore-index.qdoc | 104 ++++ src/core/doc/src/qtwebenginecore-module.qdoc | 44 ++ src/core/doc/src/qtwebenginecore.qdoc | 99 ---- .../doc/images/qtwebengine-architecture.png | Bin 0 -> 11325 bytes src/webengine/doc/qtwebengine.qdocconf | 40 +- .../doc/src/qquickwebengineview_lgpl.qdoc | 573 --------------------- src/webengine/doc/src/qtwebengine-examples.qdoc | 38 ++ src/webengine/doc/src/qtwebengine-index.qdoc | 89 ++++ src/webengine/doc/src/qtwebengine-overview.qdoc | 171 ++++++ src/webengine/doc/src/qtwebengine-qmlmodule.qdoc | 39 ++ src/webengine/doc/src/qtwebengine.qdoc | 53 -- src/webengine/doc/src/webengineview.qdoc | 525 +++++++++++++++++++ .../doc/qtwebenginewidgets.qdocconf | 6 +- .../doc/src/qtwebenginewidgets-examples.qdoc | 38 ++ .../doc/src/qtwebenginewidgets-index.qdoc | 110 ++++ .../doc/src/qtwebenginewidgets-module.qdoc | 43 ++ .../doc/src/qtwebenginewidgets.qdoc | 162 ------ .../doc/src/qwebenginepage_lgpl.qdoc | 2 +- .../doc/src/qwebengineview_lgpl.qdoc | 14 +- 21 files changed, 1246 insertions(+), 938 deletions(-) delete mode 100644 src/core/doc/qtwebenginecore.qdocconf create mode 100644 src/core/doc/src/qtwebenginecore-index.qdoc create mode 100644 src/core/doc/src/qtwebenginecore-module.qdoc delete mode 100644 src/core/doc/src/qtwebenginecore.qdoc create mode 100644 src/webengine/doc/images/qtwebengine-architecture.png delete mode 100644 src/webengine/doc/src/qquickwebengineview_lgpl.qdoc create mode 100644 src/webengine/doc/src/qtwebengine-examples.qdoc create mode 100644 src/webengine/doc/src/qtwebengine-index.qdoc create mode 100644 src/webengine/doc/src/qtwebengine-overview.qdoc create mode 100644 src/webengine/doc/src/qtwebengine-qmlmodule.qdoc delete mode 100644 src/webengine/doc/src/qtwebengine.qdoc create mode 100644 src/webengine/doc/src/webengineview.qdoc create mode 100644 src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc create mode 100644 src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc create mode 100644 src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc delete mode 100644 src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc (limited to 'src') diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 291aac916..c23fc235b 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -9,8 +9,6 @@ QMAKE_INFO_PLIST = Info_mac.plist error("Could not find the linking information that gyp should have generated.") } -QMAKE_DOCS = $$PWD/doc/qtwebenginecore.qdocconf - load(qt_module) api_library_name = qtwebenginecoreapi diff --git a/src/core/doc/qtwebenginecore.qdocconf b/src/core/doc/qtwebenginecore.qdocconf deleted file mode 100644 index 491447706..000000000 --- a/src/core/doc/qtwebenginecore.qdocconf +++ /dev/null @@ -1,32 +0,0 @@ -include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) - -project = QtWebEngineCore -description = Qt WebEngineCore Reference Documentation -version = $QT_VERSION - -qhp.projects = QtWebEngineCore - -qhp.QtWebEngineCore.file = qtwebenginecore.qhp -qhp.QtWebEngineCore.namespace = org.qt-project.qtwebenginecore.$QT_VERSION_TAG -qhp.QtWebEngineCore.virtualFolder = qtwebenginecore -qhp.QtWebEngineCore.indexTitle = Qt WebEngine Core -qhp.QtWebEngineCore.indexRoot = - -qhp.QtWebEngineCore.filterAttributes = qtwebenginecore $QT_VERSION qtrefdoc -qhp.QtWebEngineCore.customFilters.Qt.name = QtWebEngineCore $QT_VERSION -qhp.QtWebEngineCore.customFilters.Qt.filterAttributes = qtwebenginecore $QT_VERSION -qhp.QtWebEngineCore.subprojects = classes -qhp.QtWebEngineCore.subprojects.classes.title = C++ Classes -qhp.QtWebEngineCore.subprojects.classes.indexTitle = Qt WebEngine Core C++ Classes -qhp.QtWebEngineCore.subprojects.classes.selectors = class fake:headerfile -qhp.QtWebEngineCore.subprojects.classes.sortPages = true - -depends += qtcore qtdoc qmake - -headerdirs += ../api -sourcedirs += ../api src - -exampledirs += snippets - -navigation.landingpage = "Qt WebEngine Core" -navigation.cppclassespage = "Qt WebEngine Core C++ Class Types" diff --git a/src/core/doc/src/qtwebenginecore-index.qdoc b/src/core/doc/src/qtwebenginecore-index.qdoc new file mode 100644 index 000000000..49231c8f2 --- /dev/null +++ b/src/core/doc/src/qtwebenginecore-index.qdoc @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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$ +** +****************************************************************************/ + +/*! + \page qtwebenginecore-index.html + \title Qt WebEngine Core + \ingroup modules + + \brief Provides common API shared by Qt WebEngine and Qt WebEngine Widgets. + + Qt WebEngine Core provides API shared by \l {Qt WebEngine} and \l {Qt WebEngine Widgets}. + + \section1 Getting Started + + To include the definitions of the module's classes, use the + following directive: + + \snippet qtwebenginecore_build_snippet.qdoc 1 + + To link against the module, add this line to your qmake project file: + + \snippet qtwebenginecore_build_snippet.qdoc 0 + + \section1 Articles and Guides + + \list + \li \l{Qt WebEngine Overview} + \endlist + + \section1 API Reference + + \list + \li \l{Qt WebEngine Core C++ Classes} + \endlist + + \section1 License Information + + This is a snapshot of the integration of Chromium into Qt. + + Qt Commercial Edition licensees that wish to distribute applications that + use the Qt WebEngine module need to be aware of their obligations under the + GNU Library General Public License (LGPLv2). + + Developers using the Open Source Edition can choose to redistribute + the module under the GNU LGPLv3 or GPLv2 and up. + + \legalese + + Chromium is licensed under the following license: + + Copyright (c) 2013 The Chromium Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + OWNER OR 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. + + \endlegalese +*/ diff --git a/src/core/doc/src/qtwebenginecore-module.qdoc b/src/core/doc/src/qtwebenginecore-module.qdoc new file mode 100644 index 000000000..750a0244e --- /dev/null +++ b/src/core/doc/src/qtwebenginecore-module.qdoc @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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 QtWebEngineCore + \title Qt WebEngine Core C++ Classes + \brief Provides public API shared by both QtWebEngine and QtWebEngineWidgets + \since 5.6 + \ingroup qtwebengine-modules + + To include the definitions of the module's classes, use the + following directive: + + \snippet qtwebenginecore_build_snippet.qdoc 1 + + If you use qmake to build your projects, Qt WebEngine Core is usually + indirectly included through the \l[QtWebEngine]{Qt WebEngine} or + \l[QtWebEngineWidgets]{Qt WebEngine Widgets} modules. +*/ diff --git a/src/core/doc/src/qtwebenginecore.qdoc b/src/core/doc/src/qtwebenginecore.qdoc deleted file mode 100644 index a690d3f0e..000000000 --- a/src/core/doc/src/qtwebenginecore.qdoc +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/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 QtWebEngineCore - \title Qt WebEngine Core C++ Classes - \brief Provides public API shared by both QtWebEngine and QtWebEngineWidgets - \since 5.6 - - To include the definitions of the module's classes, use the - following directive: - - \snippet qtwebenginecore_build_snippet.qdoc 1 - - If you use qmake to build your projects, Qt WebEngine Core is usually - indirectly included through the \l[QtWebEngine]{Qt WebEngine} or - \l[QtWebEngineWidgets]{Qt WebEngine Widgets} modules. -*/ - -/*! - \page qtwebenginecore-index.html - \title Qt WebEngine Core - \ingroup modules - - \brief Common API shared by both Qt WebEngine and Qt WebEngine Widgets. - - Qt WebEngine Core provides API shared by both Qt WebEngine and - Qt WebEngine Widgets. - - - \section1 License Information - This is a snapshot of the integration of Chromium into Qt. - - Qt Commercial Edition licensees that wish to distribute applications that - use the Qt WebEngine module need to be aware of their obligations under the - GNU Library General Public License (LGPLv2). - - Developers using the Open Source Edition can choose to redistribute - the module under the GNU LGPLv3 or GPLv2 and up. - - \legalese - - Chromium is licensed under the following license: - - Copyright (c) 2013 The Chromium Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - OWNER OR 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. - - \endlegalese -*/ diff --git a/src/webengine/doc/images/qtwebengine-architecture.png b/src/webengine/doc/images/qtwebengine-architecture.png new file mode 100644 index 000000000..37ca2da16 Binary files /dev/null and b/src/webengine/doc/images/qtwebengine-architecture.png differ diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf index ad6898440..527983ca1 100644 --- a/src/webengine/doc/qtwebengine.qdocconf +++ b/src/webengine/doc/qtwebengine.qdocconf @@ -17,23 +17,49 @@ qhp.QtWebEngine.indexRoot = qhp.QtWebEngine.filterAttributes = qtwebengine $QT_VERSION qtrefdoc qhp.QtWebEngine.customFilters.Qt.name = QtWebEngine $QT_VERSION qhp.QtWebEngine.customFilters.Qt.filterAttributes = qtwebengine $QT_VERSION -qhp.QtWebEngine.subprojects = qmltypes examples + +qhp.QtWebEngine.subprojects = classes qmltypes examples + +qhp.QtWebEngine.subprojects.classes.title = C++ Classes +qhp.QtWebEngine.subprojects.classes.indexTitle = Qt WebEngine C++ Classes +qhp.QtWebEngine.subprojects.classes.selectors = class doc:headerfile +qhp.QtWebEngine.subprojects.classes.sortPages = true + qhp.QtWebEngine.subprojects.qmltypes.title = QML Types qhp.QtWebEngine.subprojects.qmltypes.indexTitle = Qt WebEngine QML Types -qhp.QtWebEngine.subprojects.qmltypes.selectors = qmlclass +qhp.QtWebEngine.subprojects.qmltypes.selectors = qmltype qhp.QtWebEngine.subprojects.qmltypes.sortPages = true + qhp.QtWebEngine.subprojects.examples.title = Examples qhp.QtWebEngine.subprojects.examples.indexTitle = Qt WebEngine Examples -qhp.QtWebEngine.subprojects.examples.selectors = fake:example +qhp.QtWebEngine.subprojects.examples.selectors = doc:example qhp.QtWebEngine.subprojects.examples.sortPages = true tagfile = ../../../doc/qtwebengine/qtwebengine.tags -depends += qtcore qtgui qtquick qtquickcontrols qtdoc +depends += qtcore \ + qtgui \ + qtqml \ + qtquick \ + qtquickcontrols \ + qtdoc \ + qtwebchannel \ + qtwebenginewidgets + +headerdirs += . \ + ../api \ + ../../core/api + +sourcedirs += . \ + ../api \ + ../../core/api \ + ../../core/doc/src -headerdirs += . ../api -sourcedirs += . ../api -exampledirs += ../../../examples/webengine . +exampledirs += . \ + ../../../examples/webengine \ + snippets \ + ../../core/doc/snippets navigation.landingpage = "Qt WebEngine" +navigation.cppclassespage = "Qt WebEngine C++ Classes" navigation.qmltypespage = "Qt WebEngine QML Types" diff --git a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc deleted file mode 100644 index 5f41fde67..000000000 --- a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright (C) 2015 The Qt Company Ltd. - * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) - * Copyright (c) 2012 Hewlett-Packard Development Company, L.P. - * - * 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 program 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 program; 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. - -/*! - \page qtwebengine-index.html - \title Qt WebEngine - - The Qt WebEngine module provides the WebEngineView API which allows QML applications - to render regions of dynamic web content. A \e{WebEngineView} component may share - the screen with other QML components or encompass the full screen as - specified within the QML application. - - It allows an application to load pages into the WebEngineView, either by URL or with - an HTML string, and navigate within session history. By default, - links to different pages load within the same WebEngineView, but web sites may - request them to be opened as a new tab, window or dialog. - - The following sample QML application loads a web page, responds to session - history context. - - \code - import QtQuick 2.1 - import QtQuick.Controls 1.1 - import QtWebEngine 1.0 - - ApplicationWindow { - width: 1280 - height: 720 - visible: true - WebEngineView { - id: webview - url: "http://www.qt-project.org" - anchors.fill: parent - } - } - \endcode - - \section1 API References - - \list - \li \l{Qt WebEngine QML Types}{QML Types} - \endlist - - \section1 Examples - - There are several Qt WebEngine examples located in the - \l{Qt WebEngine Examples} page. - -*/ - - -/*! - \qmltype WebEngineView - \instantiates QQuickWebEngineView - \inqmlmodule QtWebEngine 1.0 - \since QtWebEngine 1.0 - \brief A WebEngineView renders web content within a QML application. -*/ - -/*! - \qmlmethod void WebEngineView::goBack() - - Go backward within the browser's session history, if possible. - This function is equivalent to the \c{window.history.back()} DOM method. - - \sa WebEngineView::canGoBack -*/ - -/*! - \qmlmethod void WebEngineView::goForward() - - Go forward within the browser's session history, if possible. - This function is equivalent to the \c{window.history.forward()} DOM method. -*/ - -/*! - \qmlmethod void WebEngineView::stop() - - Stops loading the current page. -*/ - -/*! - \qmlmethod void WebEngineView::reload() - - Reloads the current page. This function is equivalent to the - \c{window.location.reload()} DOM method. -*/ - -/*! - \qmlproperty url WebEngineView::url - - The location of the currently displaying HTML page. This writable - property offers the main interface to load a page into a web view. - It functions the same as the \c{window.location} DOM property. - - \sa WebEngineView::loadHtml() -*/ - -/*! - \qmlproperty url WebEngineView::icon - \readonly - - This property holds the location of the currently displaying web site icon, - also known as favicon or shortcut icon. This read-only URL corresponds to - the image used within a mobile browser application to represent a - bookmarked page on the device's home screen. - - The following snippet uses the \c{icon} property to build an \c{Image} - component: - - \code - Image { - id: appIcon - source: webView.icon != "" ? webView.icon : "fallbackFavIcon.png"; - ... - } - \endcode -*/ - -/*! - \qmlproperty int WebEngineView::loadProgress - - This property holds the amount of the page that has been loaded, expressed - as an integer percentage in the range from \c{0} to \c{100}. -*/ - -/*! - \qmlproperty bool WebEngineView::canGoBack - - Returns \c{true} if there are prior session history entries, \c{false} - otherwise. -*/ - -/*! - \qmlproperty bool WebEngineView::canGoForward - - Returns \c{true} if there are subsequent session history entries, - \c{false} otherwise. -*/ - -/*! - \qmlproperty bool WebEngineView::loading - - Returns \c{true} if the HTML page is currently loading, \c{false} otherwise. -*/ - -/*! - \qmlproperty string WebEngineView::title - \readonly - - This property holds the title of the currently displaying HTML page, a - read-only value that reflects the contents of the \c{} tag. -*/ - -/*! - \qmlproperty bool WebEngineView::isFullScreen - \since QtWebEngine 1.1 - \readonly - - Returns \c{true} if the web view is in fullscreen mode, \c{false} otherwise. - - \sa WebEngineView::fullScreenRequested(), WebEngineView::fullScreenCancelled() -*/ - -/*! - \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl) - \brief Loads the specified \a html as the content of the web view. - - This method offers a lower-level alternative to the \c{url} property, - which references HTML pages via URL. - - External objects such as stylesheets or images referenced in the HTML - document should be located relative to \a baseUrl. For example, if \a html - is retrieved from \c http://www.example.com/documents/overview.html, which - is the base url, then an image referenced with the relative url, \c diagram.png, - should be at \c{http://www.example.com/documents/diagram.png}. - - \sa WebEngineView::url -*/ - - -/*! - \qmlmethod void WebEngineView::runJavaScript(string script, variant callback) - \brief Runs the specified \a script in the content of the web view. - - In case a callback function is provided it will be invoked after the script - finished running. - - \code - runJavaScript("document.title", function(result) { console.log(result); }); - \endcode - -*/ - -/*! - \qmlmethod void WebEngineView::findText(string subString) - \since QtWebEngine 1.1 - Finds the specified string, \a subString, in the page. - - To clear the selection, just pass an empty string. -*/ - -/*! - \qmlmethod void WebEngineView::findText(string subString, FindFlags options) - \since QtWebEngine 1.1 - Finds the specified string, \a subString, in the page, using the given \a options. - - To clear the selection, just pass an empty string. - - \code - findText("Qt", WebEngineView.FindBackward | WebEngineView.FindCaseSensitively); - \endcode -*/ - -/*! - \qmlmethod void WebEngineView::findText(string subString, FindFlags options, variant resultCallback) - \since QtWebEngine 1.1 - Finds the specified string, \a subString, in the page, using the given \a options. - - To clear the selection, just pass an empty string. - - The \a resultCallback must take a boolean parameter. It will be called with - a value of true if the \a subString was found; otherwise the callback value - will be false. - - \code - findText("Qt", WebEngineView.FindCaseSensitively, function(success) { - if (success) - console.log("Qt was found!"); - }); - \endcode -*/ - -/*! - \qmlmethod void WebEngineView::grantFeaturePermission(url securityOrigin, WebEngineView::Feature feature, bool granted) - - Sets the permission for the web site identified by \a securityOrigin to use \a feature. - - \sa featurePermissionRequested() -*/ - -/*! - \qmlmethod void WebEngineView::fullScreenCancelled() - \since QtWebEngine 1.1 - - Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the - browser engine when the windowing system forces the application to leave fullscreen mode. - - \code - ApplicationWindow { - onVisibilityChanged: { - if (webEngineView.isFullScreen && visibility != Window.FullScreen) - webEngineView.fullScreenCancelled() - } - - WebEngineView { - id: webEngineView - ... - } - } - \endcode - - \sa WebEngineView::isFullScreen, WebEngineView::fullScreenRequested() -*/ - -/*! - \qmlsignal void WebEngineView::featurePermissionRequested(url securityOrigin, WebEngineView::Feature feature) - - This is signal is emitted when the web site identified by \a securityOrigin requests - to make use of the resource or device identified by \a feature. - - \sa grantFeaturePermission() -*/ - -/*! - \qmlsignal WebEngineView::loadingChanged(loadRequest) - - This signal is emitted when a page load begins, ends, or fails. - The corresponding handler is onLoadingChanged. - - When handling the signal with onLoadingChanged, various read-only - parameters are available on the \a loadRequest: - - \table - \header - \li Property - \li Description - \row - \li url - \li The location of the resource that is loading. - \row - \li status - \li Reflects one of four load states: - \c{WebEngineView::LoadStartedStatus}, \c{WebEngineView::LoadStoppedStatus}, - \c{WebEngineView::LoadSucceededStatus}, or \c{WebEngineView::LoadFailedStatus}. - See WebEngineLoadRequest::status and WebEngineView::LoadStatus. - \row - \li errorString - \li The description of load error. - \row - \li errorCode - \li The HTTP error code. - \row - \li errorDomain - \li The high-level error types, one of - \c{WebEngineView::ConnectionErrorDomain}, \c{WebEngineView::HttpErrorDomain}, \c{WebEngineView::InternalErrorDomain}, - \c{WebEngineView::DownloadErrorDomain}, or \c{WebEngineView::NoErrorDomain}. See - \l{WebEngineView::ErrorDomain} for the full list. - \endtable - - \sa WebEngineView::loading -*/ - -/*! - \qmlsignal WebEngineView::certificateError(error) - - This signal is emitted when an invalid certificate error is raised while loading a given request. - - The certificate error can be rejected by calling WebEngineCertificateError::rejectCertificate, - which will stop loading the request. - - The certificate error can be ignored by calling WebEngineCertificateError::ignoreCertificateError - which will resume loading the request. - - It is possible to defer the decision of rejecting the given certificate by calling - WebEngineCertificateError::defer, which is useful when waiting for user input. - By default the invalid certificate will be automatically rejected. - - The corresponding handler is onCertificateError. - - \sa WebEngineCertificateError -*/ - -/*! - \qmlsignal WebEngineView::linkHovered(hoveredUrl) - - Within a mouse-driven interface, this signal is emitted when a mouse - pointer passes over a link, corresponding to the \c{mouseover} DOM - event. This event may also occur in touch interfaces for \c{mouseover} - events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl} - provides the link's location. - - The corresponding handler is onLinkHovered. -*/ - -/*! - \qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, message, lineNumber, sourceID) - This signal is emitted when a JavaScript program tries to print a \a message to the web browser's console. - - For example in case of evaluation errors the source URL may be provided in \a sourceID as well as the \a lineNumber. - - \a level indicates the severity of the event that triggered the message, i.e. if it - was triggered by an error or a less severe event. - - The corresponding handler is onJavaScriptConsoleMessage. -*/ - -/*! - \qmlsignal WebEngineView::newViewRequested(request) - - This signal is emitted when a page load is requested to happen in a separate - WebEngineView. This can either be because the current page requested it explicitly - through a JavaScript call to window.open, or because the user clicked on a link - while holding Shift, Ctrl or a built-in combination that triggers the page to open - in a new window. - - If this signal isn't handled the requested load will fail. - - An example implementation: - - \snippet snippets/qtwebengine_webengineview_newviewrequested.qml 0 - - The corresponding handler is onNewViewRequested. - - \sa WebEngineNewViewRequest, WebEngineView::NewViewDestination, {WebEngine Quick Nano Browser} -*/ - -/*! - \qmlsignal WebEngineView::fullScreenRequested(request) - \since QtWebEngine 1.1 - - This signal is emitted when the web page requests fullscreen mode through the - JavaScript API. - - The corresponding handler is onFullScreenRequested. - - \sa WebEngineFullScreenRequest, WebEngineView::isFullScreen -*/ - -/*! - \qmlproperty enumeration WebEngineView::ErrorDomain - - This enumeration details various high-level error types. - - \value NoErrorDomain - \value WebEngineView::InternalErrorDomain - Content fails to be interpreted by Qt WebEngine. - \value WebEngineView::ConnectionErrorDomain - Error results from faulty network connection. - \value WebEngineView::CertificateErrorDomain - Error related to the SSL/TLS certficate. - \value WebEngineView::HttpErrorDomain - Error related to the HTTP connection. - \value WebEngineView::FtpErrorDomain - Error related to the FTP connection. - \value WebEngineView::DnsErrorDomain - Error related to the DNS connection. -*/ - -/*! - \qmlproperty enumeration WebEngineView::JavaScriptConsoleMessageLevel - - Indicates the severity of a JavaScript console message. - - \table - - \header - \li Constant - \li Description - - \row - \li InfoMessageLevel - \li Message is purely informative and should be safe to ignore. - - \row - \li WarningMessageLevel - \li Message indicates there might be a problem that may need attention. - - \row - \li ErrorMessageLevel - \li Message indicates there has been an error. - - \endtable -*/ - -/*! - \qmlproperty enumeration WebEngineView::LoadStatus - - Reflects a page's load status. - - \table - - \header - \li Constant - \li Description - - \row - \li LoadStartedStatus - \li Page is currently loading. - - \row - \li LoadSucceededStatus - \li Page has successfully loaded, and is not currently loading. - - \row - \li LoadFailedStatus - \li Page has failed to load, and is not currently loading. - - \endtable -*/ - -/*! - \qmlproperty enumeration WebEngineView::NewViewDestination - - This enumeration details the format in which a new view request should be opened. - - \value WebEngineView::NewViewInWindow - The page expects to be opened in a separate Window. - \value WebEngineView::NewViewInTab - The page expects to be opened in a tab of the same window. - \value WebEngineView::NewViewInDialog - The page expects to be opened in a Window without any tab, tool or URL bar. - \value WebEngineView::NewViewInBackgroundTab - The page expects to be opened in a tab of the same window, without hiding the currently visible WebEngineView. - - \sa WebEngineNewViewRequest::destination -*/ - -/*! - \qmlproperty enumeration WebEngineView::FindFlags - - 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. - - \sa WebEngineView::findText() -*/ - -/*! - \qmlproperty enumeration WebEngineView::Feature - - This enum describes the platform feature access categories that the user may be asked to grant or deny access to. - - \value Geolocation Access to location hardware or service - \value MediaAudioCapture Audio capture devices such a microphones - \value MediaVideoCapture Video devices, e.g. cameras - \value MediaAudioVideoCapture Both Audio and Video capture devices. - - \sa featurePermissionRequested(), grantFeaturePermission() - -*/ - -/*! - \qmltype WebEngineFullScreenRequest - \instantiates QQuickWebEngineFullScreenRequest - \inqmlmodule QtWebEngine 1.1 - \since QtWebEngine 1.1 - - \brief A utility class for the WebEngineView::fullScreenRequested signal. - - \sa WebEngineView::fullScreenRequested -*/ - -/*! - \qmlproperty bool WebEngineFullScreenRequest::toggleOn - \since QtWebEngine 1.1 - \readonly - - Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise. - - \sa WebEngineFullScreenRequest::accept() -*/ - -/*! - \qmlmethod void WebEngineFullScreenRequest::accept() - \since QtWebEngine 1.1 - - Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen - property to be equal to WebEngineFullScreenRequest::toggleOn. - - \code - ApplicationWindow { - id: window - WebEngineView { - onFullScreenRequested: { - if (request.toggleOn) - window.showFullScreen() - else - window.showNormal() - request.accept() - } - } - } - \endcode - - \sa WebEngineFullScreenRequest::toggleOn() -*/ diff --git a/src/webengine/doc/src/qtwebengine-examples.qdoc b/src/webengine/doc/src/qtwebengine-examples.qdoc new file mode 100644 index 000000000..ec49577e4 --- /dev/null +++ b/src/webengine/doc/src/qtwebengine-examples.qdoc @@ -0,0 +1,38 @@ +/* + Copyright (C) 2015 The Qt Company Ltd. + 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. +*/ + +/*! + \group webengine-examples + \title Qt WebEngine Examples + \brief Examples demonstrating the Qt WebEngine usage + \ingroup all-examples + + These examples and demonstrations show a range of different uses for \l{Qt WebEngine}, + from displaying Web pages within a QML user interface to an implementation of + a basic function Web browser. + + For widget-based applications, Qt provides an integrated Web browser component based on + Chromium, the popular open source browser engine. +*/ diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc new file mode 100644 index 000000000..e6f071913 --- /dev/null +++ b/src/webengine/doc/src/qtwebengine-index.qdoc @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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$ +** +****************************************************************************/ + +/*! + \page qtwebengine-index.html + \title Qt WebEngine + \ingroup modules + + \brief Provides functionality for rendering regions of dynamic web content. + + \e {Qt WebEngine} provides functionality for rendering regions of dynamic web content. + + The functionality in Qt WebEngine is divided into the following modules: + + \annotatedlist qtwebengine-modules + + For Qt Quick applications, Qt WebEngine provides the following QML modules: + + \annotatedlist qtwebengine-qmlmodules + + \section1 Getting Started + + To include the definitions of the Qt WebEngineCore and Qt WebEngineWidgets modules' classes, use + the following directives: + + \badcode + #include <QtWebEngineCore> + #include <QtWebEngineWidgets> + \endcode + + To import the Qt WebEngine module's QML types, add the following import statement to your .qml + file: + + \badcode + import QtWebEngine 1.2 + \endcode + + To link against the modules, add QT variables to your qmake .pro file: + + \badcode + QT += webengine webenginecore webenginewidgets + \endcode + + \section1 Articles and Guides + + \list + \li \l{Qt WebEngine Overview} + \li \l{Porting from Qt WebKit to Qt WebEngine} + \endlist + + \section1 Examples + + \list + \li \l{Qt WebEngine Examples} + \li \l{Qt WebEngine Widgets Examples} + \endlist + + \section1 API References + + \list + \li \l{Qt WebEngine Core C++ Classes} + \li \l{Qt WebEngine Widgets C++ Classes} + \li \l{Qt WebEngine QML Types} + \endlist +*/ diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc new file mode 100644 index 000000000..81ae5b737 --- /dev/null +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -0,0 +1,171 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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$ +** +****************************************************************************/ + +/*! + \page qtwebengine-overview.html + \title Qt WebEngine Overview + + The Qt WebEngine module provides a web browser engine that makes it easy to embed content from + the World Wide Web into your Qt application on platforms that do not have a native web engine. + The web engine is not intended to function as a \e {Web Runtime}; to display web content in a + QML application by using APIs native to the platform, use the \l{Qt WebView} module, instead. + + Qt WebEngine provides C++ classes and QML types for rendering HTML, XHTML, and SVG documents, + styled using Cascading Style Sheets (CSS) and scripted with JavaScript. HTML documents can be + made fully editable by the user through the use of the \c{contenteditable} attribute on HTML + elements. + + Qt WebEngine supercedes the \l{Qt WebKit Widgets}{Qt WebKit} module, which is based on the + WebKit project, but has not been actively synchronized with the upstream WebKit code since + Qt 5.2 and has been deprecated in Qt 5.5. For tips on how to change a Qt WebKit widgets + application to use Qt WebEngine widgets, see \l{Porting from Qt WebKit to Qt WebEngine}. For new + applications, we recommend using Qt Quick and the WebEngineView QML type. + + \section1 Qt WebEngine Architecture + + \image qtwebengine-architecture.png + + The functionality in Qt WebEngine is divided into the following modules: + + \list + \li \l{Qt WebEngine Widgets}, which provides a web browser engine and C++ classes to render + web content and to interact with it + \li \l{Qt WebEngine}, which provides QML types for rendering web content within a QML + application + \li \l{Qt WebEngine Core}, which provides common API used by Qt WebEngine and + Qt WebEngine Widgets + \endlist + + The Qt WebEngine core is based on the \l{http://www.chromium.org}{Chromium Project}. Chromium + provides its own network and painting engines and is developed tightly together with its + dependent modules, and therefore Qt WebEngine provides better and more reliable support for the + latest HTML5 specification than Qt WebKit. However, Qt WebEngine is thus heavier than Qt WebKit + and does not provide direct access to the network stack and the HTML document through C++ APIs. + + Chromium is tightly integrated to the \l{Qt Quick Scene Graph}{Qt Quick scene graph}, which is + based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. This provides you with one-pass + compositing of web content and all the Qt Quick UI. The integration to Chromium is transparent + to developers, who just work with Qt and JavaScript. + + To expose QObjects to JavaScript, developers can use the \l {Qt WebChannel} module. + + \section1 Embedding Web Content into Widget Based Applications + + Use the QWebEngineView class to display web pages in the simplest way. Because it is a widget, + you can embed QWebEngineView into your forms and use its convenience functions to download and + display web sites. + + \code + QWebEngineView *view = new QWebEngineView(parent); + view->load(QUrl("http://www.qt.io/")); + view->show(); + \endcode + + An instance of QWebEngineView has one QWebEnginePage. QWebEnginePage provides access to the + page's navigation history and the ability to run JavaScript code in the context of the page's + main frame and enables customization of handlers for specific events like showing custom + authentication dialogs. + + \section1 Embedding Web Content into Qt Quick Applications + + The WebEngineView QML type allows QML applications to render regions of dynamic web content. A + \e{WebEngineView} type may share the screen with other QML types or encompass the full screen + as specified within the QML application. + + An application can load pages into the WebEngineView, using either an URL or HTML string, and + navigate within session history. By default, links to different pages load within the same + WebEngineView object, but web sites may request them to be opened as a new tab, window, or + dialog. + + The following sample QML application loads a web page and responds to session history context: + + \code + import QtQuick 2.1 + import QtQuick.Controls 1.1 + import QtWebEngine 1.0 + + ApplicationWindow { + width: 1280 + height: 720 + visible: true + WebEngineView { + id: webview + url: "http://www.qt.io" + anchors.fill: parent + } + } + \endcode + + \section1 Using WebEngine Core + + Qt WebEngine Core provides an API shared by Qt WebEngine and Qt WebEngine Widgets. + + \section1 License Information + + Qt WebEngine module is a snapshot of the integration of Chromium into Qt. + + Qt Commercial Edition licensees that wish to distribute applications that + use the Qt WebEngine module need to be aware of their obligations under the + GNU Library General Public License (LGPLv2). + + Developers using the Open Source Edition can choose to redistribute + the module under the GNU LGPLv3 or GPLv2 and up. + + \legalese + + Chromium is licensed under the following license: + + Copyright (c) 2013 The Chromium Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + OWNER OR 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. + + \endlegalese +*/ diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc new file mode 100644 index 000000000..7104b7bd7 --- /dev/null +++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc @@ -0,0 +1,39 @@ +/* + Copyright (C) 2015 The Qt Company Ltd. + 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. +*/ + +/*! + \qmlmodule QtWebEngine 1.0 + \title Qt WebEngine QML Types + \brief Provides QML types for rendering web content within a QML application + \ingroup qtwebengine-qmlmodules + + The QML types can be imported into your application using the following import statements in + your .qml file: + + \code + import QtQuick 2.0 + import QtWebEngine 1.0 + \endcode +*/ diff --git a/src/webengine/doc/src/qtwebengine.qdoc b/src/webengine/doc/src/qtwebengine.qdoc deleted file mode 100644 index 8cd9b6367..000000000 --- a/src/webengine/doc/src/qtwebengine.qdoc +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2015 The Qt Company Ltd. - 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. -*/ - -/*! - \qmlmodule QtWebEngine 1.0 - \title Qt WebEngine QML Types - \brief Provides QML types for rendering web content within a QML application - - The QML types can be imported into your application using the following - import statement in your .qml file: - - \code - import QtQuick 2.0 - import QtWebEngine 1.0 - \endcode - - \sa {Qt WebEngine Examples} -*/ - -/*! - \group webengine-examples - \title Qt WebEngine Examples - \brief Examples demonstrating the Qt WebEngine usage - \ingroup all-examples - - These examples and demonstrations show a range of different uses for \l{Qt WebEngine}, - from displaying Web pages within a QML user interface to an implementation of - a basic function Web browser. - - \sa {Qt WebEngine QML Types} -*/ diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc new file mode 100644 index 000000000..5b816454c --- /dev/null +++ b/src/webengine/doc/src/webengineview.qdoc @@ -0,0 +1,525 @@ +/* + * Copyright (C) 2015 The Qt Company Ltd. + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (c) 2012 Hewlett-Packard Development Company, L.P. + * + * 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 program 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 program; 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. + +/*! + \qmltype WebEngineView + \instantiates QQuickWebEngineView + \inqmlmodule QtWebEngine 1.0 + \since QtWebEngine 1.0 + \brief A WebEngineView renders web content within a QML application. +*/ + +/*! + \qmlmethod void WebEngineView::goBack() + + Go backward within the browser's session history, if possible. + This function is equivalent to the \c{window.history.back()} DOM method. + + \sa WebEngineView::canGoBack +*/ + +/*! + \qmlmethod void WebEngineView::goForward() + + Go forward within the browser's session history, if possible. + This function is equivalent to the \c{window.history.forward()} DOM method. +*/ + +/*! + \qmlmethod void WebEngineView::stop() + + Stops loading the current page. +*/ + +/*! + \qmlmethod void WebEngineView::reload() + + Reloads the current page. This function is equivalent to the + \c{window.location.reload()} DOM method. +*/ + +/*! + \qmlproperty url WebEngineView::url + + The location of the currently displaying HTML page. This writable + property offers the main interface to load a page into a web view. + It functions the same as the \c{window.location} DOM property. + + \sa WebEngineView::loadHtml() +*/ + +/*! + \qmlproperty url WebEngineView::icon + \readonly + + This property holds the location of the currently displaying web site icon, + also known as favicon or shortcut icon. This read-only URL corresponds to + the image used within a mobile browser application to represent a + bookmarked page on the device's home screen. + + The following snippet uses the \c{icon} property to build an \c{Image} + component: + + \code + Image { + id: appIcon + source: webView.icon != "" ? webView.icon : "fallbackFavIcon.png"; + ... + } + \endcode +*/ + +/*! + \qmlproperty int WebEngineView::loadProgress + + This property holds the amount of the page that has been loaded, expressed + as an integer percentage in the range from \c{0} to \c{100}. +*/ + +/*! + \qmlproperty bool WebEngineView::canGoBack + + Returns \c{true} if there are prior session history entries, \c{false} + otherwise. +*/ + +/*! + \qmlproperty bool WebEngineView::canGoForward + + Returns \c{true} if there are subsequent session history entries, + \c{false} otherwise. +*/ + +/*! + \qmlproperty bool WebEngineView::loading + + Returns \c{true} if the HTML page is currently loading, \c{false} otherwise. +*/ + +/*! + \qmlproperty string WebEngineView::title + \readonly + + This property holds the title of the currently displaying HTML page, a + read-only value that reflects the contents of the \c{<title>} tag. +*/ + +/*! + \qmlproperty bool WebEngineView::isFullScreen + \since QtWebEngine 1.1 + \readonly + + Returns \c{true} if the web view is in fullscreen mode, \c{false} otherwise. + + \sa WebEngineView::fullScreenRequested(), WebEngineView::fullScreenCancelled() +*/ + +/*! + \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl) + \brief Loads the specified \a html as the content of the web view. + + This method offers a lower-level alternative to the \c{url} property, + which references HTML pages via URL. + + External objects such as stylesheets or images referenced in the HTML + document should be located relative to \a baseUrl. For example, if \a html + is retrieved from \c http://www.example.com/documents/overview.html, which + is the base url, then an image referenced with the relative url, \c diagram.png, + should be at \c{http://www.example.com/documents/diagram.png}. + + \sa WebEngineView::url +*/ + + +/*! + \qmlmethod void WebEngineView::runJavaScript(string script, variant callback) + \brief Runs the specified \a script in the content of the web view. + + In case a callback function is provided it will be invoked after the script + finished running. + + \code + runJavaScript("document.title", function(result) { console.log(result); }); + \endcode + +*/ + +/*! + \qmlmethod void WebEngineView::findText(string subString) + \since QtWebEngine 1.1 + Finds the specified string, \a subString, in the page. + + To clear the selection, just pass an empty string. +*/ + +/*! + \qmlmethod void WebEngineView::findText(string subString, FindFlags options) + \since QtWebEngine 1.1 + Finds the specified string, \a subString, in the page, using the given \a options. + + To clear the selection, just pass an empty string. + + \code + findText("Qt", WebEngineView.FindBackward | WebEngineView.FindCaseSensitively); + \endcode +*/ + +/*! + \qmlmethod void WebEngineView::findText(string subString, FindFlags options, variant resultCallback) + \since QtWebEngine 1.1 + Finds the specified string, \a subString, in the page, using the given \a options. + + To clear the selection, just pass an empty string. + + The \a resultCallback must take a boolean parameter. It will be called with + a value of true if the \a subString was found; otherwise the callback value + will be false. + + \code + findText("Qt", WebEngineView.FindCaseSensitively, function(success) { + if (success) + console.log("Qt was found!"); + }); + \endcode +*/ + +/*! + \qmlmethod void WebEngineView::grantFeaturePermission(url securityOrigin, WebEngineView::Feature feature, bool granted) + + Sets the permission for the web site identified by \a securityOrigin to use \a feature. + + \sa featurePermissionRequested() +*/ + +/*! + \qmlmethod void WebEngineView::fullScreenCancelled() + \since QtWebEngine 1.1 + + Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the + browser engine when the windowing system forces the application to leave fullscreen mode. + + \code + ApplicationWindow { + onVisibilityChanged: { + if (webEngineView.isFullScreen && visibility != Window.FullScreen) + webEngineView.fullScreenCancelled() + } + + WebEngineView { + id: webEngineView + ... + } + } + \endcode + + \sa WebEngineView::isFullScreen, WebEngineView::fullScreenRequested() +*/ + +/*! + \qmlsignal void WebEngineView::featurePermissionRequested(url securityOrigin, WebEngineView::Feature feature) + + This is signal is emitted when the web site identified by \a securityOrigin requests + to make use of the resource or device identified by \a feature. + + \sa grantFeaturePermission() +*/ + +/*! + \qmlsignal WebEngineView::loadingChanged(loadRequest) + + This signal is emitted when a page load begins, ends, or fails. + The corresponding handler is onLoadingChanged. + + When handling the signal with onLoadingChanged, various read-only + parameters are available on the \a loadRequest: + + \table + \header + \li Property + \li Description + \row + \li url + \li The location of the resource that is loading. + \row + \li status + \li Reflects one of four load states: + \c{WebEngineView::LoadStartedStatus}, \c{WebEngineView::LoadStoppedStatus}, + \c{WebEngineView::LoadSucceededStatus}, or \c{WebEngineView::LoadFailedStatus}. + See WebEngineLoadRequest::status and WebEngineView::LoadStatus. + \row + \li errorString + \li The description of load error. + \row + \li errorCode + \li The HTTP error code. + \row + \li errorDomain + \li The high-level error types, one of + \c{WebEngineView::ConnectionErrorDomain}, \c{WebEngineView::HttpErrorDomain}, \c{WebEngineView::InternalErrorDomain}, + \c{WebEngineView::DownloadErrorDomain}, or \c{WebEngineView::NoErrorDomain}. See + \l{WebEngineView::ErrorDomain} for the full list. + \endtable + + \sa WebEngineView::loading +*/ + +/*! + \qmlsignal WebEngineView::certificateError(error) + + This signal is emitted when an invalid certificate error is raised while loading a given request. + + The certificate error can be rejected by calling WebEngineCertificateError::rejectCertificate, + which will stop loading the request. + + The certificate error can be ignored by calling WebEngineCertificateError::ignoreCertificateError + which will resume loading the request. + + It is possible to defer the decision of rejecting the given certificate by calling + WebEngineCertificateError::defer, which is useful when waiting for user input. + By default the invalid certificate will be automatically rejected. + + The corresponding handler is onCertificateError. + + \sa WebEngineCertificateError +*/ + +/*! + \qmlsignal WebEngineView::linkHovered(hoveredUrl) + + Within a mouse-driven interface, this signal is emitted when a mouse + pointer passes over a link, corresponding to the \c{mouseover} DOM + event. This event may also occur in touch interfaces for \c{mouseover} + events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl} + provides the link's location. + + The corresponding handler is onLinkHovered. +*/ + +/*! + \qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, message, lineNumber, sourceID) + This signal is emitted when a JavaScript program tries to print a \a message to the web browser's console. + + For example in case of evaluation errors the source URL may be provided in \a sourceID as well as the \a lineNumber. + + \a level indicates the severity of the event that triggered the message, i.e. if it + was triggered by an error or a less severe event. + + The corresponding handler is onJavaScriptConsoleMessage. +*/ + +/*! + \qmlsignal WebEngineView::newViewRequested(request) + + This signal is emitted when a page load is requested to happen in a separate + WebEngineView. This can either be because the current page requested it explicitly + through a JavaScript call to window.open, or because the user clicked on a link + while holding Shift, Ctrl or a built-in combination that triggers the page to open + in a new window. + + If this signal isn't handled the requested load will fail. + + An example implementation: + + \snippet snippets/qtwebengine_webengineview_newviewrequested.qml 0 + + The corresponding handler is onNewViewRequested. + + \sa WebEngineNewViewRequest, WebEngineView::NewViewDestination, {WebEngine Quick Nano Browser} +*/ + +/*! + \qmlsignal WebEngineView::fullScreenRequested(request) + \since QtWebEngine 1.1 + + This signal is emitted when the web page requests fullscreen mode through the + JavaScript API. + + The corresponding handler is onFullScreenRequested. + + \sa WebEngineFullScreenRequest, WebEngineView::isFullScreen +*/ + +/*! + \qmlproperty enumeration WebEngineView::ErrorDomain + + This enumeration details various high-level error types. + + \value NoErrorDomain + \value WebEngineView::InternalErrorDomain + Content fails to be interpreted by Qt WebEngine. + \value WebEngineView::ConnectionErrorDomain + Error results from faulty network connection. + \value WebEngineView::CertificateErrorDomain + Error related to the SSL/TLS certficate. + \value WebEngineView::HttpErrorDomain + Error related to the HTTP connection. + \value WebEngineView::FtpErrorDomain + Error related to the FTP connection. + \value WebEngineView::DnsErrorDomain + Error related to the DNS connection. +*/ + +/*! + \qmlproperty enumeration WebEngineView::JavaScriptConsoleMessageLevel + + Indicates the severity of a JavaScript console message. + + \table + + \header + \li Constant + \li Description + + \row + \li InfoMessageLevel + \li Message is purely informative and should be safe to ignore. + + \row + \li WarningMessageLevel + \li Message indicates there might be a problem that may need attention. + + \row + \li ErrorMessageLevel + \li Message indicates there has been an error. + + \endtable +*/ + +/*! + \qmlproperty enumeration WebEngineView::LoadStatus + + Reflects a page's load status. + + \table + + \header + \li Constant + \li Description + + \row + \li LoadStartedStatus + \li Page is currently loading. + + \row + \li LoadSucceededStatus + \li Page has successfully loaded, and is not currently loading. + + \row + \li LoadFailedStatus + \li Page has failed to load, and is not currently loading. + + \endtable +*/ + +/*! + \qmlproperty enumeration WebEngineView::NewViewDestination + + This enumeration details the format in which a new view request should be opened. + + \value WebEngineView::NewViewInWindow + The page expects to be opened in a separate Window. + \value WebEngineView::NewViewInTab + The page expects to be opened in a tab of the same window. + \value WebEngineView::NewViewInDialog + The page expects to be opened in a Window without any tab, tool or URL bar. + \value WebEngineView::NewViewInBackgroundTab + The page expects to be opened in a tab of the same window, without hiding the currently visible WebEngineView. + + \sa WebEngineNewViewRequest::destination +*/ + +/*! + \qmlproperty enumeration WebEngineView::FindFlags + + 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. + + \sa WebEngineView::findText() +*/ + +/*! + \qmlproperty enumeration WebEngineView::Feature + + This enum describes the platform feature access categories that the user may be asked to grant or deny access to. + + \value Geolocation Access to location hardware or service + \value MediaAudioCapture Audio capture devices such a microphones + \value MediaVideoCapture Video devices, e.g. cameras + \value MediaAudioVideoCapture Both Audio and Video capture devices. + + \sa featurePermissionRequested(), grantFeaturePermission() + +*/ + +/*! + \qmltype WebEngineFullScreenRequest + \instantiates QQuickWebEngineFullScreenRequest + \inqmlmodule QtWebEngine 1.1 + \since QtWebEngine 1.1 + + \brief A utility class for the WebEngineView::fullScreenRequested signal. + + \sa WebEngineView::fullScreenRequested +*/ + +/*! + \qmlproperty bool WebEngineFullScreenRequest::toggleOn + \since QtWebEngine 1.1 + \readonly + + Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise. + + \sa WebEngineFullScreenRequest::accept() +*/ + +/*! + \qmlmethod void WebEngineFullScreenRequest::accept() + \since QtWebEngine 1.1 + + Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen + property to be equal to WebEngineFullScreenRequest::toggleOn. + + \code + ApplicationWindow { + id: window + WebEngineView { + onFullScreenRequested: { + if (request.toggleOn) + window.showFullScreen() + else + window.showNormal() + request.accept() + } + } + } + \endcode + + \sa WebEngineFullScreenRequest::toggleOn() +*/ diff --git a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf b/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf index ad1e46f1c..df01f449e 100644 --- a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf +++ b/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf @@ -32,8 +32,10 @@ tagfile = ../../../doc/qtwebenginewidgets/qtwebenginewidgets.tag depends += qtwebengine qtcore qtnetwork qtgui qtwidgets qtwebkit qtdoc headerdirs += ../api -sourcedirs += ../api -exampledirs += ../../../examples/webenginewidgets . +sourcedirs += ../api src + +exampledirs += ../../../examples/webenginewidgets \ + snippets navigation.landingpage = "Qt WebEngine Widgets" navigation.cppclassespage = "Qt WebEngine Widgets C++ Classes" diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc new file mode 100644 index 000000000..eff22be26 --- /dev/null +++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc @@ -0,0 +1,38 @@ +/* + Copyright (C) 2015 The Qt Company Ltd. + 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. +*/ + +/*! + \group webengine-widgetexamples + \title Qt WebEngine Widgets Examples + \brief Examples demonstrating the Qt WebEngine Widgets usage + \ingroup all-examples + + Qt provides an integrated Web browser component based on Chromium, the popular + open source browser engine. + + These examples and demonstrations show a range of different uses for Qt WebEngine, + from displaying Web pages within a Qt user interface to an implementation of + a basic function Web browser. +*/ diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc new file mode 100644 index 000000000..77596a370 --- /dev/null +++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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$ +** +****************************************************************************/ + +/*! + \page qtwebenginewidgets-index.html + \title Qt WebEngine Widgets + \ingroup modules + + \brief Provides a web browser engine as well as C++ classes to render web content and interact + with it. + + \section1 Getting Started + + To include the definitions of the module's classes, use the + following directive: + + \snippet qtwebengine_build_snippet.qdoc 1 + + To link against the module, add this line to your qmake project file: + + \snippet qtwebengine_build_snippet.qdoc 0 + + \section1 Articles and Guides + + \list + \li \l{Qt WebEngine Overview} + \li \l{Porting from Qt WebKit to Qt WebEngine} + \endlist + + \section1 Examples + + \list + \li \l {Qt WebEngine Widgets Examples} + \endlist + + \section1 API Reference + + \list + \li \l {Qt WebEngine Widgets C++ Classes} + \endlist + + \section1 License Information + + This is a snapshot of the integration of Chromium into Qt. + + Qt Commercial Edition licensees that wish to distribute applications that + use the Qt WebEngine module need to be aware of their obligations under the + GNU Library General Public License (LGPLv2). + + Developers using the Open Source Edition can choose to redistribute + the module under the GNU LGPLv3 or GPLv2 and up. + + \legalese + + Chromium is licensed under the following license: + + Copyright (c) 2013 The Chromium Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + OWNER OR 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. + + \endlegalese +*/ diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc new file mode 100644 index 000000000..6373389f3 --- /dev/null +++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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 QtWebEngineWidgets + \title Qt WebEngine Widgets C++ Classes + \brief Provides a web browser engine as well as C++ classes to render and + interact with web content + \ingroup qtwebengine-modules + + To include the definitions of the module's classes, use the + following directive: + + \snippet qtwebengine_build_snippet.qdoc 1 + + To link against the module, add the following to your qmake project file: + + \snippet qtwebengine_build_snippet.qdoc 0 +*/ diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc deleted file mode 100644 index 1e8cda065..000000000 --- a/src/webenginewidgets/doc/src/qtwebenginewidgets.qdoc +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/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 QtWebEngineWidgets - \title Qt WebEngine Widgets C++ Classes - \qtvariable webenginewidgets - \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 snippets/qtwebengine_build_snippet.qdoc 1 - - To link against the module, add this line to your \l qmake \c - .pro file: - - \snippet snippets/qtwebengine_build_snippet.qdoc 0 -*/ - -/*! - \page qtwebenginewidgets-index.html - \title Qt WebEngine Widgets - \ingroup modules - - \brief The Qt WebEngine Widgets module provides a web browser engine as - well as C++ classes to display and interact with web content. - - Qt WebEngine Widgets gives you a Web browser engine that you can use to - embed content easily from the World Wide Web into your Qt application. - - Qt WebEngine Widgets lets you display HyperText Markup Language version 5 - (HTML5), Extensible HyperText Markup Language (XHTML) and Scalable Vector - Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and - scripted with JavaScript. - - HTML and XHTML documents can also be made fully editable to the user by - using the \c{contenteditable} attribute on HTML elements. - - Qt WebEngine is based on the Chromium project. See the - \l{http://www.chromium.org}{Chromium Project} Web site for more information. - - \section1 Including In Your Project - - To include the definitions of the module's classes, use the - following directive: - - \snippet snippets/qtwebengine_build_snippet.qdoc 1 - - To link against the module, add this line to your \l qmake \c - .pro file: - - \snippet snippets/qtwebengine_build_snippet.qdoc 0 - - \section1 Architecture - - Use the QWebEngineView class to display web pages in the simplest way. - Because it's a widget, you can embed QWebEngineView into your forms and use - its convenience functions to download and display web sites. - - \snippet snippets/simple/main.cpp Using QWebEngineView - - An instance of QWebEngineView has one QWebEnginePage. QWebEnginePage - provides access to the page's navigation history, ability to run JavaScript - code in the context of the page's main frame, and enables customization of - handlers for specific events like showing custom authentication dialogs. - - \section1 Reference Documentation - - \list - \li \l {Qt WebEngine Widgets C++ Classes} - \endlist - - \section1 Examples - - \list - \li \l {Qt WebEngine Widgets Examples} - \endlist - - \section1 License Information - This is a snapshot of the integration of Chromium into Qt. - - Qt Commercial Edition licensees that wish to distribute applications that - use the Qt WebEngine module need to be aware of their obligations under the - GNU Library General Public License (LGPLv2). - - Developers using the Open Source Edition can choose to redistribute - the module under the GNU LGPLv3 or GPLv2 and up. - - \legalese - - Chromium is licensed under the following license: - - Copyright (c) 2013 The Chromium Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - OWNER OR 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. - - \endlegalese -*/ - -/*! - \group webengine-widgetexamples - \title Qt WebEngine Widgets Examples - \brief Examples demonstrating the Qt WebEngine Widgets usage - \ingroup all-examples - - Qt provides an integrated Web browser component based on Chromium, the popular - open source browser engine. - - These examples and demonstrations show a range of different uses for Qt WebEngine, - from displaying Web pages within a Qt user interface to an implementation of - a basic function Web browser. -*/ diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 676643387..e1990af73 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -351,7 +351,7 @@ was found; otherwise the callback value will be false. For example: - \snippet snippets/qtwebengine_qwebenginepage_snippet.cpp 0 + \snippet qtwebengine_qwebenginepage_snippet.cpp 0 */ /*! diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc index 163e9a28e..76878e077 100644 --- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc @@ -41,7 +41,7 @@ Qt widgets, the show() function must be invoked in order to display QWebEngineView. The snippet below illustrates this: - \snippet snippets/simple/main.cpp Using QWebEngineView + \snippet 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. @@ -170,7 +170,7 @@ It is equivalent to - \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 0 + \snippet qtwebengine_qwebengineview_snippet.cpp 0 */ /*! @@ -231,7 +231,7 @@ The following example triggers the copy action and therefore copies any selected text to the clipboard. - \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 2 + \snippet qtwebengine_qwebengineview_snippet.cpp 2 \sa pageAction() */ @@ -268,7 +268,7 @@ It is equivalent to - \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 3 + \snippet qtwebengine_qwebengineview_snippet.cpp 3 \sa reload(), pageAction(), loadFinished() */ @@ -280,7 +280,7 @@ It is equivalent to - \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 4 + \snippet qtwebengine_qwebengineview_snippet.cpp 4 \sa forward(), pageAction() */ @@ -292,7 +292,7 @@ It is equivalent to - \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 5 + \snippet qtwebengine_qwebengineview_snippet.cpp 5 \sa back(), pageAction() */ @@ -386,7 +386,7 @@ It is equivalent to - \snippet snippets/qtwebengine_qwebengineview_snippet.cpp 6 + \snippet qtwebengine_qwebengineview_snippet.cpp 6 \sa QWebEngineSettings::globalSettings() */ -- cgit v1.2.3