diff options
author | Andras Becsi <andras.becsi@digia.com> | 2012-12-11 01:30:36 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-11 14:38:41 +0100 |
commit | d3b7d01b72768e829bca4a8c26257c7bfe54fe5e (patch) | |
tree | e4f0cd727c869e5c9cb86bdc5141ab8f92c17eb7 | |
parent | 7d814e288b512f24b33000d3696f457dc7b32f76 (diff) | |
download | qtwebkit-examples-d3b7d01b72768e829bca4a8c26257c7bfe54fe5e.tar.gz |
Add brief documentation for flickrview and youtubeview
Change-Id: I69a01221019fa62215d1d3ec1e312c6ba138fd79
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r-- | doc/qtwebkitexamples.qdocconf | 8 | ||||
-rw-r--r-- | examples/webkitqml/flickrview/doc/images/flickrview-example.png | bin | 0 -> 206697 bytes | |||
-rw-r--r-- | examples/webkitqml/flickrview/doc/src/flickrview.qdoc | 47 | ||||
-rw-r--r-- | examples/webkitqml/youtubeview/doc/images/youtubeview-example-preset.png | bin | 0 -> 12218 bytes | |||
-rw-r--r-- | examples/webkitqml/youtubeview/doc/images/youtubeview-example.png | bin | 0 -> 128129 bytes | |||
-rw-r--r-- | examples/webkitqml/youtubeview/doc/src/youtubeview.qdoc | 54 |
6 files changed, 104 insertions, 5 deletions
diff --git a/doc/qtwebkitexamples.qdocconf b/doc/qtwebkitexamples.qdocconf index 2307f9f..69567d9 100644 --- a/doc/qtwebkitexamples.qdocconf +++ b/doc/qtwebkitexamples.qdocconf @@ -22,9 +22,7 @@ qhp.QtQml.customFilters.Qt.filterAttributes = qtwebkit-examples 5.0.0 outputdir = $QT_INSTALL_DOCS/qtwebkitexamples -depends += qtcore qtwidgets qtgui qtscript qtdoc qtprintsupport qtxml qtwebkitwidgets +depends += qtcore qtwidgets qtquick qtgui qtscript qtdoc qtxml qtwebkitwidgets qtwebkit -exampledirs = ../examples/webkit -# No documentation for the browser atm, we might want to revive this -# and add it to the exampledirs -# ../examples/browser +exampledirs = ../examples/webkitwidgets + ../examples/webkitqml diff --git a/examples/webkitqml/flickrview/doc/images/flickrview-example.png b/examples/webkitqml/flickrview/doc/images/flickrview-example.png Binary files differnew file mode 100644 index 0000000..4e444dc --- /dev/null +++ b/examples/webkitqml/flickrview/doc/images/flickrview-example.png diff --git a/examples/webkitqml/flickrview/doc/src/flickrview.qdoc b/examples/webkitqml/flickrview/doc/src/flickrview.qdoc new file mode 100644 index 0000000..0321d0c --- /dev/null +++ b/examples/webkitqml/flickrview/doc/src/flickrview.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2012 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$ +** +****************************************************************************/ + +/*! + \example flickrview + \title Flickr View Example + + \brief The Flickr View Example shows how to embed a \l{WebView} into a QtQuick application + to browse the images from the \l{http://flickr.com}{Flickr} public RSS feed. + + \image flickrview-example.png + + FlickrView is an example that retrieves the \l{http://www.flickr.com/services/feeds/docs/photos_public}{flickr.com RSS feed of public photos} + utilizing an \l{XmlListModel} and shows the thumbnails in a \l{ListView}. + When clicking on a thumbnail in the list at the bottom, the full size + image is loaded in a \l{WebView} using the corresponding Flickr link for it. + It is also possible to browse the profile of Flickr users in the WebView like in a + normal browser. This demonstrates how navigaton can be restricted to a specific + domain in the \c{onNavigationRequested} signal. + The feed can be updated using pull-to-refresh at the end of the thumbnail list. + + This example uses the QtWebKit QML API that utilizes the WebKit2 split-process architecture. +*/ diff --git a/examples/webkitqml/youtubeview/doc/images/youtubeview-example-preset.png b/examples/webkitqml/youtubeview/doc/images/youtubeview-example-preset.png Binary files differnew file mode 100644 index 0000000..ba93e4d --- /dev/null +++ b/examples/webkitqml/youtubeview/doc/images/youtubeview-example-preset.png diff --git a/examples/webkitqml/youtubeview/doc/images/youtubeview-example.png b/examples/webkitqml/youtubeview/doc/images/youtubeview-example.png Binary files differnew file mode 100644 index 0000000..1b561ed --- /dev/null +++ b/examples/webkitqml/youtubeview/doc/images/youtubeview-example.png diff --git a/examples/webkitqml/youtubeview/doc/src/youtubeview.qdoc b/examples/webkitqml/youtubeview/doc/src/youtubeview.qdoc new file mode 100644 index 0000000..0501ba6 --- /dev/null +++ b/examples/webkitqml/youtubeview/doc/src/youtubeview.qdoc @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2012 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$ +** +****************************************************************************/ + +/*! + \example youtubeview + \title YouTube View Example + + \brief The YouTube View \l{Qt QML}{QML} example shows how to embed a \l{WebView} into + a \l{Qt Quick} application and play \l{http://www.youtube.com/html5}{HTML5 video clips from YouTube}. + + \image youtubeview-example.png + + The applicaiton makes use of an \l{XmlListModel} to query the \l{https://developers.google.com/youtube}{YouTube API} + for HTML5 video clips and lists thumbnails of the clips in a \l{ListView} at the top. The \l{WebView} loads a local \c player.html file that + embeds a YouTube HTML5 video player using the \l{https://developers.google.com/youtube/iframe_api_reference}{IFrame player API}, + which allows to control the YouTube player using JavaScript. + + When clicking on a thumbnail, the corresponding clip is loaded in the WebView by passing the video ID as a query string to \c player.html. + When the video is started, the thumbnail list is hidden with an animated fade-out, when the video is stopped the list is showed again. + The specific states of the player change the title of the WebView using \e{document.title} in JavaScript. The application + is acting on these title changes in the \c{onTitleChanged} slot of the WebView item and thus switches between specific states. + By default the application loads a list of movie trailers. + + When clicking on the button below the thumbnail list, the application switches to search mode, which allows to search for videos + using keywords. Additionally it is also possible to choose from a number of preset movie trailer streams. + + \image youtubeview-example-preset.png + + This example uses the QtWebKit QML API that utilizes the WebKit2 split-process architecture. +*/ |