Tidy up examples documentation
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 20 Mar 2012 07:57:07 +0000 (17:57 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Mar 2012 03:49:28 +0000 (05:49 +0200)
Add missing doc images, move documentation into examples directory, and
update example doc references to the new locations (quick/qml instead of
declarative or qtquick).

Change-Id: I67a9302f2b451b8bf30f4ca6b625f54b240da429
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>

26 files changed:
doc/src/examples/example-textballoons.qdoc
doc/src/examples/examples-toys.qdoc
doc/src/examples/examples.qdoc
doc/src/images/qml-canvas-example.png [new file with mode: 0644]
doc/src/images/qml-draganddrop-example.png [new file with mode: 0644]
doc/src/images/qml-keyinteraction-example.png [new file with mode: 0644]
doc/src/images/qml-mousearea-example.png [new file with mode: 0644]
doc/src/images/qml-positioners-example.png
doc/src/images/qml-righttoleft-example.png [new file with mode: 0644]
doc/src/images/qml-threading-example.png [new file with mode: 0644]
examples/demos/calculator/calculator.qdoc
examples/demos/clocks/clocks.qdoc [new file with mode: 0644]
examples/localstorage/localstorage.qml
examples/qml/dynamicscene/dynamicscene.qml
examples/qml/i18n/i18n.qml
examples/quick/accessibility/accessibility.qml
examples/quick/animation/animation.qml
examples/quick/canvas/canvas.qml
examples/quick/draganddrop/draganddrop.qml
examples/quick/imageelements/imageelements.qml
examples/quick/positioners/positioners-transitions.qml
examples/quick/righttoleft/righttoleft.qml
examples/quick/shadereffects/shadereffects.qml
examples/quick/text/text.qml
examples/quick/threading/threading.qml
examples/quick/touchinteraction/touchinteraction.qml

index be004f5..299ceeb 100644 (file)
@@ -28,7 +28,7 @@
 
 /*!
     \title Scenegraph Painted Item Example
-    \example declarative/painteditem/textballoons
+    \example quick/painteditem/textballoons
 
     The Painted Item example shows how to use the QML Scene Graph framework to
     implement custom scenegraph items using QPainter.
index 7414579..87d2ad5 100644 (file)
     \image qml-corkboards-example.png
 */
 
-/*!
-    \title QML Example - Dynamic Scene
-    \example declarative/toys/dynamicscene
-    \brief This example demonstrates creating components dynamically.
-    \image qml-dynamicscene-example.png
-*/
-
-/*!
-    \title QML Example - Clocks
-    \example declarative/toys/clocks
-    \brief This example demonstrates creating components and using them multiple times.
-    \image qml-clocks-example.png
-*/
index a99dc8c..b5cd036 100644 (file)
@@ -51,39 +51,39 @@ This set of code samples are part of the collection of \l{Qt Examples}.
     Qt Quick Applications
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/calculator}{Calculator}
+        \l{demos/calculator}{Calculator}
         \image qml-calculator-example-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/flickr}{Flickr Mobile}
+        \l{demos/flickr}{Flickr Mobile}
         \image qml-flickr-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/minehunt}{Minehunt}
+        \l{demos/minehunt}{Minehunt}
         \image qml-minehunt-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/photoviewer}{Photo Viewer}
+        \l{demos/photoviewer}{Photo Viewer}
         \image qml-photoviewer-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/rssnews}{RSS News Reader}
+        \l{demos/rssnews}{RSS News Reader}
         \image qml-rssnews-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/samegame}{Same Game}
+        \l{demos/samegame}{Same Game}
         \image qml-samegame-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/snake}{Snake}
+        \l{demos/snake}{Snake}
         \image qml-snake-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/twitter}{Twitter}
+        \l{demos/twitter}{Twitter}
         \image qml-twitter-demo-small.png
     \enddiv
     \div {class="threecolumn_piece"}
-        \l{demos/declarative/webbrowser}{Web Browser}
+        \l{demos/webbrowser}{Web Browser}
         \image qml-webbrowser-demo-small.png
     \enddiv
 \enddiv
@@ -93,132 +93,19 @@ This set of code samples are part of the collection of \l{Qt Examples}.
     \enddiv
     Code samples demonstrate a general use for QML features. Some showcase
     how elements or properties can be used in an application.
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        QML Features
-        \enddiv
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Mouse and Keyboard Input
-        \enddiv
-        \list
-        \li \l{declarative/text/fonts}{Fonts}
-        \li \l{declarative/text/textselection}{Text Selection}
-        \li \l{declarative/keyinteraction/focus}{Keyboard Focus}
-        \li \l{declarative/touchinteraction/mousearea}{MouseArea}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        States and Transitions
-        \enddiv
-        \list
-        \li \l{declarative/animation/states}{States}
-        \li \l{declarative/animation/basics}{Animation Essentials}
-        \li \l{declarative/animation/behaviors}{Behaviors}
-        \li \l{declarative/animation/easing}{Easing}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        UI Components
-        \enddiv
-        \list
-        \li \l{declarative/ui-components/dialcontrol}{Dial Control}
-        \li \l{declarative/ui-components/flipable}{Flipable}
-        \li \l{declarative/ui-components/progressbar}{Progress Bar}
-        \li \l{declarative/ui-components/scrollbar}{Scroll Bar}
-        \li \l{declarative/ui-components/searchbox}{Search Box}
-        \li \l{declarative/ui-components/slideswitch}{Slide Switch}
-        \li \l{declarative/ui-components/spinner}{Spinner}
-        \li \l{declarative/ui-components/tabwidget}{Tab Widget}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Positioners and Layout
-        \enddiv
-        \list
-        \li \l{declarative/positioners}{Row and Column}
-        \li \l{declarative/righttoleft/layoutmirroring}{Layout Mirroring}
-        \li \l{declarative/righttoleft/layoutdirection}{Layout Direction}
-        \li \l{declarative/righttoleft/textalignment}{Text Alignment}
-        \li \l{declarative/screenorientation}{Screen Orientation}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Data with Models and Views
-        \enddiv
-        \list
-        \li \l{declarative/modelviews/gridview}{GridView}
-        \li \l{declarative/modelviews/listview}{ListView}
-        \li \l{declarative/modelviews/pathview}{PathView}
-        \li \l{declarative/modelviews/package}{Package}
-        \li \l{declarative/modelviews/visualitemmodel}{VisualItemModel}
-        \li \l{declarative/modelviews/stringlistmodel}{String ListModel}
-        \li \l{declarative/modelviews/objectlistmodel}{Object ListModel}
-        \li \l{declarative/modelviews/abstractitemmodel}{AbstractItemModel}
-        \li \l{declarative/modelviews/webview}{WebView}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Advance UI Components
-        \enddiv
-        \list
-        \li \l{declarative/modelviews/parallax}{Parallax}
-        \li \l{declarative/toys/clocks}{Clocks}
-        \li \l{declarative/toys/corkboards}{Corkboards}
-        \li \l{declarative/toys/dynamicscene}{Dynamic Scene}
-        \li \l{declarative/toys/tic-tac-toe}{Tic Tac Toe}
-        \li \l{declarative/toys/tvtennis}{TV Tennis}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Image Elements
-        \enddiv
-        \list
-        \li \l{declarative/imageelements/borderimage}{BorderImage}
-        \li \l{declarative/imageelements/image}{Image}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Loading Resources
-        \enddiv
-        \list
-        \li \l{declarative/sqllocalstorage}{SQL Local Storage}
-        \li \l{declarative/xml/xmlhttprequest}{XmlHttpRequest}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Localization
-        \enddiv
-        \list
-        \li \l{declarative/i18n}{Translation}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Threading
-        \enddiv
-        \list
-        \li \l{declarative/threading/threadedlistmodel}{Threaded ListModel}
-        \li \l{declarative/threading/workerscript}{WorkerScript Element}
-        \endlist
-    \enddiv
-    \div {class="threecolumn_piece"}
-        \div {class="heading"}
-        Graphical Effects
-        \enddiv
-        \list
-        \li \l{declarative/shadereffects}{Shader Effects}
-        \endlist
-    \enddiv
+    \li \l{quick/keyinteraction}{Keyboard Focus}
+    \li \l{quick/mousearea}{MouseArea}
+    \li \l{quick/animation}{Animations}
+    \li \l{quick/positioners}{Positioners}
+    \li \l{quick/righttoleft}{Right to Left}
+    \li \l{quick/modelviews}{Model Views}
+    \li \l{quick/imageelements}{Image Elements}
+    \li \l{localstorage}{SQL Local Storage}
+    \li \l{qml/xmlhttprequest}{XmlHttpRequest}
+    \li \l{qml/i18n}{Translation}
+    \li \l{quick/threading}{Threading}
+    \li \l{quick/shadereffects}{Shader Effects}
+    \endlist
 \enddiv
 \div {class="threecolumn_area"}
     \div {class="heading"}
@@ -231,16 +118,16 @@ This set of code samples are part of the collection of \l{Qt Examples}.
         From Qt C++ to QML
         \enddiv
         \list
-        \li \l {declarative/cppextensions/referenceexamples/adding}{Exporting C++ Classes}
-        \li \l {declarative/cppextensions/referenceexamples/properties}{Exporting Qt C++ Properties}
-        \li \l {declarative/cppextensions/referenceexamples/coercion}{C++ Inheritance and Coercion}
-        \li \l {declarative/cppextensions/referenceexamples/default}{Default Property}
-        \li \l {declarative/cppextensions/referenceexamples/grouped}{Grouped Properties}
-        \li \l {declarative/cppextensions/referenceexamples/attached}{Attached Properties}
-        \li \l {declarative/cppextensions/referenceexamples/signal}{Signal Support}
-        \li \l {declarative/cppextensions/referenceexamples/methods}{Methods Support}
-        \li \l {declarative/cppextensions/referenceexamples/valuesource}{Property Value Source}
-        \li \l {declarative/cppextensions/referenceexamples/binding}{Binding}
+        \li \l {qml/cppextensions/referenceexamples/adding}{Exporting C++ Classes}
+        \li \l {qml/cppextensions/referenceexamples/properties}{Exporting Qt C++ Properties}
+        \li \l {qml/cppextensions/referenceexamples/coercion}{C++ Inheritance and Coercion}
+        \li \l {qml/cppextensions/referenceexamples/default}{Default Property}
+        \li \l {qml/cppextensions/referenceexamples/grouped}{Grouped Properties}
+        \li \l {qml/cppextensions/referenceexamples/attached}{Attached Properties}
+        \li \l {qml/cppextensions/referenceexamples/signal}{Signal Support}
+        \li \l {qml/cppextensions/referenceexamples/methods}{Methods Support}
+        \li \l {qml/cppextensions/referenceexamples/valuesource}{Property Value Source}
+        \li \l {qml/cppextensions/referenceexamples/binding}{Binding}
         \endlist
     \enddiv
     \div {class="threecolumn_piece"}
@@ -248,9 +135,9 @@ This set of code samples are part of the collection of \l{Qt Examples}.
         Plugins and Resources
         \enddiv
         \list
-        \li \l{declarative/cppextensions/plugins}{Plugins}
-        \li \l{declarative/cppextensions/imageprovider}{Image Provider}
-        \li \l{declarative/cppextensions/networkaccessmanagerfactory}{Network Access Manager}
+        \li \l{qml/cppextensions/plugins}{Plugins}
+        \li \l{qml/cppextensions/imageprovider}{Image Provider}
+        \li \l{qml/cppextensions/networkaccessmanagerfactory}{Network Access Manager}
         \li \l{src/imports/folderlistmodel}{Folder List Model} - a C++ model plugin
         \endlist
     \enddiv
@@ -259,8 +146,23 @@ This set of code samples are part of the collection of \l{Qt Examples}.
         Qt UI and QML Integration
         \enddiv
         \list
-        \li \l{declarative-cppextensions-qgraphicslayouts.html}{QGraphicsLayouts}
-        \li \l{declarative/cppextensions/qwidgets}{QWidgets}
+        \li \l{qml-cppextensions-qgraphicslayouts.html}{QGraphicsLayouts}
+        \li \l{qml/cppextensions/qwidgets}{QWidgets}
+        \endlist
+    \enddiv
+    \div {class="threecolumn_piece"}
+        \div {class="heading"}
+        UI Components
+        \enddiv
+        \list
+        \li \l{tutorials/ui-components/dialcontrol}{Dial Control}
+        \li \l{tutorials/ui-components/flipable}{Flipable}
+        \li \l{tutorials/ui-components/progressbar}{Progress Bar}
+        \li \l{tutorials/ui-components/scrollbar}{Scroll Bar}
+        \li \l{tutorials/ui-components/searchbox}{Search Box}
+        \li \l{tutorials/ui-components/slideswitch}{Slide Switch}
+        \li \l{tutorials/ui-components/spinner}{Spinner}
+        \li \l{tutorials/ui-components/tabwidget}{Tab Widget}
         \endlist
     \enddiv
 \enddiv
diff --git a/doc/src/images/qml-canvas-example.png b/doc/src/images/qml-canvas-example.png
new file mode 100644 (file)
index 0000000..2651ad6
Binary files /dev/null and b/doc/src/images/qml-canvas-example.png differ
diff --git a/doc/src/images/qml-draganddrop-example.png b/doc/src/images/qml-draganddrop-example.png
new file mode 100644 (file)
index 0000000..b64f4d6
Binary files /dev/null and b/doc/src/images/qml-draganddrop-example.png differ
diff --git a/doc/src/images/qml-keyinteraction-example.png b/doc/src/images/qml-keyinteraction-example.png
new file mode 100644 (file)
index 0000000..7f4dd77
Binary files /dev/null and b/doc/src/images/qml-keyinteraction-example.png differ
diff --git a/doc/src/images/qml-mousearea-example.png b/doc/src/images/qml-mousearea-example.png
new file mode 100644 (file)
index 0000000..d93dc92
Binary files /dev/null and b/doc/src/images/qml-mousearea-example.png differ
index 90d70ff..0c02f4a 100644 (file)
Binary files a/doc/src/images/qml-positioners-example.png and b/doc/src/images/qml-positioners-example.png differ
diff --git a/doc/src/images/qml-righttoleft-example.png b/doc/src/images/qml-righttoleft-example.png
new file mode 100644 (file)
index 0000000..03c3c48
Binary files /dev/null and b/doc/src/images/qml-righttoleft-example.png differ
diff --git a/doc/src/images/qml-threading-example.png b/doc/src/images/qml-threading-example.png
new file mode 100644 (file)
index 0000000..6ed79ab
Binary files /dev/null and b/doc/src/images/qml-threading-example.png differ
index e94bdb4..7939487 100644 (file)
@@ -27,9 +27,9 @@
 
 /*!
     \title QML Demo - Calculator
-    \example declarative/calculator
+    \example demos/calculator
     \brief This is an example calculator application written in QML.
-    \image qml-calculator-demo-small.png
+    \image qml-calculator-example-small.png
 
     The Calculator demo implements a simple calculator in QML. It is written for desktop and portrait devices,
     although on device it supports orientation changes.
diff --git a/examples/demos/clocks/clocks.qdoc b/examples/demos/clocks/clocks.qdoc
new file mode 100644 (file)
index 0000000..54479ba
--- /dev/null
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+    \title QML Demo - Clocks
+    \example demos/clocks
+    \brief This example demonstrates creating components and using them multiple times.
+    \image qml-clocks-example.png
+
+    This demo give a simple world clock application, containing multiple clocks from around the world.
+
+    In doing this, it reuses a signle Clock component with some slight changes to the parameters.
+*/
index f967518..714774c 100644 (file)
@@ -43,7 +43,7 @@ import "../shared" as Examples
 
 /*!
     \title QtQuick Examples - Local Storage
-    \example qtquick/localstorage
+    \example localstorage
     \brief This is a collection of QML local storage examples
     \image qml-localstorage-example.png
 
@@ -63,4 +63,4 @@ Item {
             addExample("Hello World", "Simple SQL operations with local storage API",  Qt.resolvedUrl("hello.qml"));
         }
     }
-}
\ No newline at end of file
+}
index 66521b8..4771742 100644 (file)
 **
 ****************************************************************************/
 
+/*!
+    \title QML Example - Dynamic Scene
+    \example qml/dynamicscene
+    \brief This example demonstrates creating components dynamically.
+    \image qml-dynamicscene-example.png
+*/
+
 import QtQuick 2.0
 import QtQuick.Particles 2.0
 import "content"
index f8bf30d..2ffdd19 100644 (file)
 
 import QtQuick 2.0
 
-//
-// The QML runtime automatically loads a translation from the i18n subdirectory of the root
-// QML file, based on the system language.
-//
-// The files are created/updated by running:
-//
-//   lupdate i18n.qml -ts i18n/base.ts
-//
-// Translations for new languages are created by copying i18n/base.ts to i18n/qml_<lang>.ts
-// The .ts files can then be edited with Linguist:
-//
-//   linguist i18n/qml_fr.ts
-//
-// The run-time translation files are then generated by running:
-//
-//   lrelease i18n/*.ts
-//
+/*!
+    \title QML Examples - Internationalization
+    \example qml/i18n
+    \image qml-i18n-example.png
+    \brief This is an internationalization example
+
+ The QML runtime automatically loads a translation from the i18n subdirectory of the root
+ QML file, based on the system language.
+
+ The files are created/updated by running:
+
+   lupdate i18n.qml -ts i18n/base.ts
+
+ Translations for new languages are created by copying i18n/base.ts to i18n/qml_<lang>.ts
+ The .ts files can then be edited with Linguist:
+
+   linguist i18n/qml_fr.ts
+
+ The run-time translation files are then generated by running:
+
+   lrelease i18n/*.ts
+*/
+
 
 Rectangle {
     width: 640; height: 480
index e987561..5e4b0f8 100644 (file)
@@ -44,7 +44,7 @@ import "content"
 
 /*!
     \title QtQuick Examples - Accessibility
-    \example qtquick/accessibility
+    \example quick/accessibility
     \brief This example has accessible buttons.
 
 */
index bca6845..f478cb7 100644 (file)
@@ -43,7 +43,7 @@ import "../../shared" as Examples
 
 /*!
     \title QtQuick Examples - Animation
-    \example qtquick/animation
+    \example quick/animation
     \brief This is a collection of QML Animation examples.
     \image qml-animations-example.png
 
index bdb58f4..cf3c37a 100644 (file)
@@ -45,6 +45,7 @@ import "../../shared" as Examples
     \title QtQuick Examples - Canvas
     \example quick/canvas
     \brief This is a collection of QML Canvas examples.
+    \image qml-canvas-example.png
 
     This is a collection of small QML examples relating to Canvas item. Each example is
     a small QML file emphasizing a particular element or feature.
index 88e6d5e..9f56177 100644 (file)
@@ -43,7 +43,7 @@ import "../../shared" as Examples
 
 /*!
     \title QtQuick Examples - Drag and Drop
-    \example qtquick/draganddrop
+    \example quick/draganddrop
     \brief This is a collection of QML drag and drop examples
     \image qml-draganddrop-example.png
 
index bb23ef6..adfa43a 100644 (file)
@@ -43,7 +43,7 @@ import "../../shared"
 
 /*!
     \title QML Examples - Image Elements
-    \example declarative/imageelements
+    \example quick/imageelements
     \brief This is a collection of QML examples
     \image qml-imageelements-example.png
 
index 6081c9f..f1b61c1 100644 (file)
@@ -43,12 +43,12 @@ import QtQuick 2.0
 Rectangle {
     id: page
     width: 320; height: 480
-    property int effectiveOpacity: 1.0
+    property real effectiveOpacity: 1.0
     Timer {
         interval: 2000
         running: true
         repeat: true
-        onTriggered: effectiveOpacity = (effectiveOpacity == 1.0 ? 0.0 : 1.0)
+        onTriggered: effectiveOpacity = (effectiveOpacity == 1.0 ? 0.0 : 1.0);
     }
 
     Column {
index 6561595..b95f671 100644 (file)
@@ -43,7 +43,7 @@ import "../../shared" as Examples
 
 /*!
     \title QtQuick Examples - Right to Left
-    \example qtquick/Right to Left
+    \example quick/righttoleft
     \brief This is a collection of QML Right to Left examples.
     \image qml-righttoleft-example.png
 
index 25efa5f..4b3bb2a 100644 (file)
@@ -48,7 +48,7 @@ Rectangle {
     height: 480
 /*!
     \title QML Examples - Shader Effects
-    \example declarative/shadereffects
+    \example quick/shadereffects
     \image qml-shadereffects-example.png
     \brief This is a shader effects example
 
index e9c4077..e8be93c 100644 (file)
@@ -42,7 +42,7 @@ import QtQuick 2.0
 import "../../shared"
 /*!
     \title QML Examples - Text
-    \example declarative/text
+    \example quick/text
     \brief This is a collection of QML examples
     \image qml-text-example.png
 
index 7ba8b8f..b96c697 100644 (file)
@@ -43,7 +43,7 @@ import "../../shared" as Examples
 
 /*!
     \title QtQuick Examples - Threading
-    \example qtquick/threading
+    \example quick/threading
     \brief This is a collection of QML Multithreading examples.
     \image qml-threading-example.png
 
index 0be625a..e64c145 100644 (file)
@@ -43,7 +43,7 @@ import "../../shared"
 
 /*!
     \title QtQuick Examples - Touch Interaction
-    \example qtquick/touchinteraction
+    \example quick/touchinteraction
     \brief This is a collection of QML Touch Interaction examples.
     \image qml-touchinteraction-example.png