aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJani Heikkinen <jani.heikkinen@digia.com>2014-04-23 12:44:13 +0300
committerJani Heikkinen <jani.heikkinen@digia.com>2014-04-23 12:44:14 +0300
commit7d16c2f40a2995c6bdff3a1999a7cb6100fdf301 (patch)
treefda2e8a1b363caae655ba1369e54ec0257c7d067 /examples
parentaedcd57c84ac9d6b74816c13bdf3fde31e1132b5 (diff)
parent937fdde5d3b26291d417f856ee05ba479a6ba730 (diff)
Merge remote-tracking branch 'origin/release' into stable
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/demos/calqlatr/doc/src/calqlatr.qdoc13
-rw-r--r--examples/quick/demos/clocks/clocks.pro14
-rw-r--r--examples/quick/demos/clocks/clocks.qml6
-rw-r--r--examples/quick/demos/clocks/clocks.qrc15
-rw-r--r--examples/quick/demos/clocks/doc/src/clocks.qdoc12
-rw-r--r--examples/quick/demos/clocks/main.cpp41
-rw-r--r--examples/quick/demos/demos.pro2
-rw-r--r--examples/quick/demos/maroon/doc/src/maroon.qdoc10
-rw-r--r--examples/quick/demos/photosurface/doc/src/photosurface.qdoc10
-rw-r--r--examples/quick/demos/photoviewer/doc/src/photoviewer.qdoc12
-rw-r--r--examples/quick/demos/rssnews/doc/src/rssnews.qdoc12
-rw-r--r--examples/quick/demos/samegame/doc/src/samegame.qdoc12
-rw-r--r--examples/quick/demos/stocqt/doc/src/stocqt.qdoc10
-rw-r--r--examples/quick/demos/tweetsearch/doc/src/tweetsearch.qdoc18
14 files changed, 152 insertions, 35 deletions
diff --git a/examples/quick/demos/calqlatr/doc/src/calqlatr.qdoc b/examples/quick/demos/calqlatr/doc/src/calqlatr.qdoc
index 533ba99f7a..ff8061e2ea 100644
--- a/examples/quick/demos/calqlatr/doc/src/calqlatr.qdoc
+++ b/examples/quick/demos/calqlatr/doc/src/calqlatr.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -29,9 +29,14 @@
\title Qt Quick Demo - Calqlatr
\ingroup qtquickdemos
\example demos/calqlatr
- \brief A simple calculator app, designed for portrait devices.
+ \brief A simple QML calculator app, designed for portrait devices.
\image qtquick-demo-calqlatr.png
- This app has the logic implemented in JavaScript and the appearance implemented in QML.
-*/
+ \e{Calqlatr} demonstrates various QML and \l{Qt Quick} features such as
+ displaying custom components. The logic is implemented in JavaScript and the
+ appearance implemented in QML.
+
+ \include examples-run.qdocinc
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/clocks/clocks.pro b/examples/quick/demos/clocks/clocks.pro
new file mode 100644
index 0000000000..21d3f7f971
--- /dev/null
+++ b/examples/quick/demos/clocks/clocks.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+
+QT += qml quick
+
+SOURCES += main.cpp
+RESOURCES += clocks.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/clocks
+INSTALLS += target
+
+OTHER_FILES += \
+ clocks.qml \
+ content/Clock.qml \
+ content/*.png
diff --git a/examples/quick/demos/clocks/clocks.qml b/examples/quick/demos/clocks/clocks.qml
index ddf9e42ea2..d16e3c5442 100644
--- a/examples/quick/demos/clocks/clocks.qml
+++ b/examples/quick/demos/clocks/clocks.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import "content"
+import "content" as Content
Rectangle {
id: root
@@ -54,7 +54,7 @@ Rectangle {
snapMode: ListView.SnapOneItem
highlightRangeMode: ListView.ApplyRange
- delegate: Clock { city: cityName; shift: timeShift }
+ delegate: Content.Clock { city: cityName; shift: timeShift }
model: ListModel {
ListElement { cityName: "New York"; timeShift: -4 }
ListElement { cityName: "London"; timeShift: 0 }
diff --git a/examples/quick/demos/clocks/clocks.qrc b/examples/quick/demos/clocks/clocks.qrc
new file mode 100644
index 0000000000..eaff4729ae
--- /dev/null
+++ b/examples/quick/demos/clocks/clocks.qrc
@@ -0,0 +1,15 @@
+<RCC>
+ <qresource prefix="/demos/clocks">
+ <file>clocks.qml</file>
+ <file>content/arrow.png</file>
+ <file>content/background.png</file>
+ <file>content/center.png</file>
+ <file>content/clock-night.png</file>
+ <file>content/clock.png</file>
+ <file>content/Clock.qml</file>
+ <file>content/hour.png</file>
+ <file>content/minute.png</file>
+ <file>content/quit.png</file>
+ <file>content/second.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/demos/clocks/doc/src/clocks.qdoc b/examples/quick/demos/clocks/doc/src/clocks.qdoc
index b34f844cc6..b57894c5d3 100644
--- a/examples/quick/demos/clocks/doc/src/clocks.qdoc
+++ b/examples/quick/demos/clocks/doc/src/clocks.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -29,7 +29,13 @@
\title Qt Quick Demo - Clocks
\ingroup qtquickdemos
\example demos/clocks
- \brief An app that shows the current time in different cities.
+ \brief A QML application that shows the current time in different cities.
\image qtquick-demo-clocks-small.png
-*/
+ \e Clocks demonstrates various QML and \l{Qt Quick} features such as
+ displaying custom components.
+
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/clocks/main.cpp b/examples/quick/demos/clocks/main.cpp
new file mode 100644
index 0000000000..f6b7f87d38
--- /dev/null
+++ b/examples/quick/demos/clocks/main.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 Digia Plc and its Subsidiary(-ies) 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(demos/clocks/clocks)
diff --git a/examples/quick/demos/demos.pro b/examples/quick/demos/demos.pro
index 867dfa5a07..ac15cc3c1f 100644
--- a/examples/quick/demos/demos.pro
+++ b/examples/quick/demos/demos.pro
@@ -1,12 +1,12 @@
TEMPLATE = subdirs
SUBDIRS = samegame \
calqlatr \
+ clocks \
tweetsearch \
maroon \
photosurface \
stocqt
EXAMPLE_FILES = \
- clocks \
photoviewer \
rssnews
diff --git a/examples/quick/demos/maroon/doc/src/maroon.qdoc b/examples/quick/demos/maroon/doc/src/maroon.qdoc
index c18b6bc874..59f6397dcf 100644
--- a/examples/quick/demos/maroon/doc/src/maroon.qdoc
+++ b/examples/quick/demos/maroon/doc/src/maroon.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -32,5 +32,11 @@
\brief A cute game designed for touchscreens.
\image qtquick-demo-maroon-med-1.png
\image qtquick-demo-maroon-med-2.png
-*/
+ \e{Maroon in Trouble} demonstrates various QML and \l{Qt Quick} features
+ such as displaying custom components and playing sound effects.
+
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/photosurface/doc/src/photosurface.qdoc b/examples/quick/demos/photosurface/doc/src/photosurface.qdoc
index 48f8e8a14b..d56b34365d 100644
--- a/examples/quick/demos/photosurface/doc/src/photosurface.qdoc
+++ b/examples/quick/demos/photosurface/doc/src/photosurface.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -32,6 +32,10 @@
\brief A touch-based app for shuffling photos around a virtual surface.
\image qtquick-demo-photosurface-small.png
- This example demonstrates how to handle dragging, rotation and
- pinch zooming within the same item using a PinchArea containing a MouseArea.
+ \e{Photo Surface} demonstrates how to handle dragging, rotation and pinch
+ zooming within the same item using a \l PinchArea containing a \l MouseArea.
+
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
*/
diff --git a/examples/quick/demos/photoviewer/doc/src/photoviewer.qdoc b/examples/quick/demos/photoviewer/doc/src/photoviewer.qdoc
index b0f1368a1c..29c432be3c 100644
--- a/examples/quick/demos/photoviewer/doc/src/photoviewer.qdoc
+++ b/examples/quick/demos/photoviewer/doc/src/photoviewer.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -29,7 +29,13 @@
\title Qt Quick Demo - Photo Viewer
\ingroup qtquickdemos
\example demos/photoviewer
- \brief An online photo viewer that displays Flickr feeds.
+ \brief A photo viewer that displays Flickr feeds.
\image qtquick-demo-photoviewer-small.png
-*/
+ \e{Photo Viewer} demonstrates various QML and \l{Qt Quick} features such as
+ displaying custom components.
+
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/rssnews/doc/src/rssnews.qdoc b/examples/quick/demos/rssnews/doc/src/rssnews.qdoc
index 019b54d609..12c7c0d19b 100644
--- a/examples/quick/demos/rssnews/doc/src/rssnews.qdoc
+++ b/examples/quick/demos/rssnews/doc/src/rssnews.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -29,7 +29,13 @@
\title Qt Quick Demo - RSS News
\ingroup qtquickdemos
\example demos/rssnews
- \brief An RSS news reader.
+ \brief A QML RSS news reader.
\image qtquick-demo-rssnews-small.png
-*/
+ \e{RSS News} demonstrates various QML and \l{Qt Quick} features such as
+ loading XML data and displaying custom components.
+
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/samegame/doc/src/samegame.qdoc b/examples/quick/demos/samegame/doc/src/samegame.qdoc
index 70042d73f0..acae8d728f 100644
--- a/examples/quick/demos/samegame/doc/src/samegame.qdoc
+++ b/examples/quick/demos/samegame/doc/src/samegame.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -30,7 +30,15 @@
\ingroup qtquickdemos
\example demos/samegame
\brief A QML implementation of the popular puzzle game by Kuniaki Moribe.
+
+ \e{Same Game} demonstrates a QML game with custom types and logic written in
+ JavaScript. The game uses various \l{Qt Quick} features such as
+ particles, animation, and loading images.
+
\image qtquick-demo-samegame-med-1.png
\image qtquick-demo-samegame-med-2.png
-*/
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/stocqt/doc/src/stocqt.qdoc b/examples/quick/demos/stocqt/doc/src/stocqt.qdoc
index 7001bfb395..5f090e84f9 100644
--- a/examples/quick/demos/stocqt/doc/src/stocqt.qdoc
+++ b/examples/quick/demos/stocqt/doc/src/stocqt.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -31,5 +31,11 @@
\example demos/stocqt
\brief A configurable stock chart for the NASDAQ-100.
\image qtquick-demo-stocqt.png
-*/
+ \e{StocQt} demonstrates various QML and \l{Qt Quick} features such as
+ displaying custom components and downloading data from the internet.
+
+ \include examples-run.qdocinc
+
+ \sa {QML Applications}
+*/
diff --git a/examples/quick/demos/tweetsearch/doc/src/tweetsearch.qdoc b/examples/quick/demos/tweetsearch/doc/src/tweetsearch.qdoc
index a56ed0d7e9..41c6c09dea 100644
--- a/examples/quick/demos/tweetsearch/doc/src/tweetsearch.qdoc
+++ b/examples/quick/demos/tweetsearch/doc/src/tweetsearch.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -33,22 +33,20 @@
\image qtquick-demo-tweetsearch-med-1.png
\image qtquick-demo-tweetsearch-med-2.png
- \section1 Demo Introduction
-
- The Tweet Search demo searches items posted to Twitter service
- using a number of query parameters. Search can be done for tweets
- from a specified user, a hashtag or a search phrase.
+ \e{Tweet Search} is a QML application that searches items posted to Twitter
+ service using a number of query parameters. Search can be done for tweets
+ from a specified user, a hashtag, or a search phrase.
The search result is a list of items showing the contents of the
tweet as well as the name and image of the user who posted it.
Hashtags, names and links in the content are clickable. Clicking
on the image will flip the item to reveal more information.
- \section1 Running the Demo
+ \include examples-run.qdocinc
Tweet Search uses Twitter API v1.1 for running seaches.
- \section2 Authentication
+ \section1 Request Authentication
Each request must be authenticated on behalf of the application.
For demonstration purposes, the application uses a hard-coded
@@ -67,7 +65,7 @@
Rebuild and run the demo.
- \section2 JSON Parsing
+ \section1 JSON Parsing
Search results are returned in JSON (JavaScript Object Notation)
format. \c TweetsModel uses an \l XMLHTTPRequest object to send
@@ -76,4 +74,6 @@
representing a tweet is then added to a \l ListModel:
\snippet demos/tweetsearch/content/TweetsModel.qml requesting
+
+ \sa {QML Applications}
*/