summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativetransition.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-02-10 22:35:31 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2011-02-10 22:35:31 (GMT)
commitca13ba801144763b1ca7c39b2ef8594de94e2d3e (patch)
tree7600e31df6ce715a5bc28c0c97983bac9484c7cb /src/declarative/util/qdeclarativetransition.cpp
parentab38731fe5dcfaa1a7a70bc290a8856b5b01524d (diff)
parentec20a6da3edea3031f1705c3b13e24dc2c7c6de5 (diff)
downloadQt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.zip
Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.tar.gz
Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.tar.bz2
Merge remote-tracking branch 'origin/4.7' into HEAD
Diffstat (limited to 'src/declarative/util/qdeclarativetransition.cpp')
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index e533a07..063ec3e 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -82,15 +82,7 @@ QT_BEGIN_NAMESPACE
To define multiple transitions, specify \l Item::transitions as a list:
- \qml
- Item {
- ...
- transitions: [
- Transition { to: "state1" ... },
- Transition { ... }
- ]
- }
- \endqml
+ \snippet doc/src/snippets/declarative/transitions-list.qml list of transitions
If multiple Transitions are specified, only a single (best-matching) Transition will be applied for any particular
state change. In the example above, when changing to \c state1, the first transition will be used, rather
@@ -222,13 +214,7 @@ void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &act
If the transition was changed to this:
- \qml
- transitions: Transition {
- to: "brighter"
- ColorAnimation { duration: 1000 }
- }
- }
- \endqml
+ \snippet doc/src/snippets/declarative/transition-from-to-modified.qml modified transition
The animation would only be applied when changing from the default state to
the "brighter" state (i.e. when the mouse is pressed, but not on release).
@@ -313,24 +299,12 @@ void QDeclarativeTransition::setToState(const QString &t)
This property holds a list of the animations to be run for this transition.
- \qml
- Transition {
- PropertyAnimation { ... }
- NumberAnimation { ... }
- }
- \endqml
+ \snippet examples/declarative/toys/dynamicscene/dynamicscene.qml top-level transitions
The top-level animations are run in parallel. To run them sequentially,
define them within a SequentialAnimation:
- \qml
- Transition {
- SequentialAnimation {
- PropertyAnimation { ... }
- NumberAnimation { ... }
- }
- }
- \endqml
+ \snippet doc/src/snippets/declarative/transition-reversible.qml sequential animations
*/
QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeTransition::animations()
{