summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-06-30 04:32:34 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-06-30 04:35:29 (GMT)
commit08c422315d52a9377ebf0912adbe4d17370173af (patch)
tree9693d0d74d9b45272207847c589f65f488e060c5 /doc/src
parent93ab98ae693c3a1d0b3b96c33543469f520145dd (diff)
downloadQt-08c422315d52a9377ebf0912adbe4d17370173af.zip
Qt-08c422315d52a9377ebf0912adbe4d17370173af.tar.gz
Qt-08c422315d52a9377ebf0912adbe4d17370173af.tar.bz2
Docs - add more links to relevant examples
Task-number: QTBUG-11754
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/animation.qdoc16
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc4
-rw-r--r--doc/src/declarative/focus.qdoc4
-rw-r--r--doc/src/declarative/globalobject.qdoc4
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc3
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc4
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc3
-rw-r--r--doc/src/declarative/tutorial.qdoc2
8 files changed, 35 insertions, 5 deletions
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 13202ee..c5333df 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -71,13 +71,15 @@ to explicitly set the \c target and \c property to animate.
Animations can be joined into a group using SequentialAnimation and ParallelAnimation.
+See the \l {declarative/animation/basics}{Animation basics example} for a demonstration of creating and combining multiple animations in QML.
+
\target state-transitions
\section1 Transitions
-QML transitions describe animations to perform when \l{qmlstates}{state} changes occur. A transition
+\l Transition elements describe the animations to perform when \l{qmlstates}{state} changes occur. A transition
can only be triggered by a state change.
-For example, a transition could describe how an item moves from its initial position to its new position:
+For example, a \l Transition could describe how an item moves from its initial position to its new position:
\snippet doc/src/snippets/declarative/animation.qml transitions-1
@@ -108,9 +110,13 @@ making use of both sequential and parallel animations:
\snippet doc/src/snippets/declarative/animation.qml transitions-3
+
+See \l {declarative/animation/states}{States and Transitions example} for a simple example of how transitions can be applied.
+
+
\section1 Property Behaviors
-A \l{Behavior}{property behavior} specifies a default animation to run whenever the property's value changes, regardless
+A property \l {Behavior}{behavior} specifies a default animation to run whenever the property's value changes, regardless
of what caused the change. The \c enabled property can be used to force a \l Behavior
to only apply under certain circumstances.
@@ -119,7 +125,7 @@ whenever it changes. The animation will last 300 milliseconds and use an \l{Prop
\snippet doc/src/snippets/declarative/animation.qml behavior
-Like using an animation as a value source, when used in a Behavior and animation does not need to specify
+Like using an animation as a value source, when used in a \l Behavior and animation does not need to specify
a \c target or \c property.
To trigger this behavior, we could enter a state that changes \c x:
@@ -149,4 +155,6 @@ If \c x were bound to another property, triggering the binding would also trigge
If a state change has a transition animation matching a property with a \l Behavior, the transition animation
will override the \l Behavior for that state change.
+The \l {declarative/animation/behaviors}{Behaviors example} shows how behaviors can be used to provide animations.
+
*/
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index de65a12..a5e53a9 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -39,8 +39,12 @@ QML also supports the dynamic creation of objects from within JavaScript
code. This is useful if the existing QML elements do not fit the needs of your
application, and there are no C++ components involved.
+See the {declarative/toys/dynamicscene}{Dynamic Scene example} for a demonstration
+of the concepts discussed on this page.
+
\section1 Creating Objects Dynamically
+
There are two ways to create objects dynamically from JavaScript. You can either call
\l {QML:Qt::createComponent()}{Qt.createComponent()} to create
a component which instantiates items, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 699ebcb..cc546c0 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -266,6 +266,10 @@ When a QML item explicitly relinquishes focus (by setting its
does not automatically select another element to receive focus. That is, it
is possible for there to be no currently \e {active focus}.
+See the {declarative/keyinteraction/focus}{Keyboard Focus example} for a
+demonstration of moving keyboard focus between multiple areas using FocusScope
+elements.
+
\section1 Advanced uses of Focus Scopes
Focus scopes allow focus to allocation to be easily partitioned. Several
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index ecbaa9e..40fc3eb 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -114,6 +114,8 @@ browser. The following objects and properties are supported by the QML implemen
\endtable
+\sa {declarative/xml/xmlhttprequest}{XMLHttpRequest example}
+
\section1 Offline Storage API
\section2 Database API
@@ -132,6 +134,8 @@ The API can be used from JavaScript functions in your QML:
The API conforms to the Synchronous API of the HTML5 Web Database API,
\link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink.
+\sa {declarative/sqllocalstorage}{SQL Local Storage example}
+
\section3 db = openDatabaseSync(identifier, version, description, estimated_size, callback(db))
Returns the database identified by \e identifier. If the database does not already exist, it
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index c16dea3..40f7919 100644
--- a/doc/src/declarative/qdeclarativei18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -78,4 +78,7 @@ Finally, we can test the translation:
\code
qml -translation hello.qm hello.qml
\endcode
+
+
+You can see a complete example and source code in the {declarative/i18n}{QML Internationalization example}.
*/
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index bb17896..7671eb3 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -279,6 +279,8 @@ ListView {
\endcode
\endtable
+The complete example is available in \l {declarative/modelviews/stringlistmodel}.
+
\note There is no way for the view to know that the contents of a QStringList
have changed. If the QStringList is changed, it will be necessary to reset
the model by calling QDeclarativeContext::setContextProperty() again.
@@ -329,6 +331,8 @@ ListView {
}
\endcode
+The complete example is available in \l {declarative/modelviews/objectlistmodel}.
+
Note the use of the fully qualified access to the \c color property.
The properties of the object are not replicated in the \c model
object, since they are easily available via the modelData
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index ef5bf98..6461925 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -82,4 +82,7 @@ Other things you can do in a state change:
\o Run some script with StateChangeScript
\endlist
+
+The {declarative/animation/states}{States and Transitions example} demonstrates how to declare a basic set of states and then apply animated transitions between them.
+
*/
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 252c11e..c884486 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -222,5 +222,5 @@ This is equivalent to writing the two transitions separately.
The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time.
We could also run them one after the other by using \l SequentialAnimation instead.
-For more details on states and transitions, see \l {QML States}.
+For more details on states and transitions, see \l {QML States} and the {declarative/animation/states}{states and transitions example}.
*/