summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativestateoperations.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-06-08 00:50:07 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-06-09 23:36:31 (GMT)
commitce8a3100868e2c545d0af3332e9b801c1fd0bc3f (patch)
tree3b463fa3262410ad0e3fb9a20d9f1af947502990 /src/declarative/util/qdeclarativestateoperations.cpp
parentc85bf4b51331496fcfb8befb4cdcc56d2fa0a213 (diff)
downloadQt-ce8a3100868e2c545d0af3332e9b801c1fd0bc3f.zip
Qt-ce8a3100868e2c545d0af3332e9b801c1fd0bc3f.tar.gz
Qt-ce8a3100868e2c545d0af3332e9b801c1fd0bc3f.tar.bz2
Move some example code into snippets/ and add other doc fixes
Diffstat (limited to 'src/declarative/util/qdeclarativestateoperations.cpp')
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 99f163e..2d55931 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -583,9 +583,9 @@ public:
\qmlclass StateChangeScript QDeclarativeStateChangeScript
\brief The StateChangeScript element allows you to run a script in a state.
- StateChangeScripts are run when entering the state. You can use
- ScriptAction to specify at which point in the transition
- you want the StateChangeScript to be run.
+ A StateChangeScript is run upon entering a state. You can optionally use
+ ScriptAction to specify the point in the transition at which
+ the StateChangeScript should to be run.
\qml
State {
@@ -687,22 +687,16 @@ QString QDeclarativeStateChangeScript::typeName() const
\qmlclass AnchorChanges QDeclarativeAnchorChanges
\brief The AnchorChanges element allows you to change the anchors of an item in a state.
- In the following example we change the top and bottom anchors of an item:
- \qml
- State {
- name: "reanchored"
- AnchorChanges {
- target: content;
- anchors.top: window.top;
- anchors.bottom: window.bottom
- }
- PropertyChanges {
- target: content;
- anchors.topMargin: 3
- anchors.bottomMargin: 3;
- }
- }
- \endqml
+ The AnchorChanges element is used to modify the anchors of an item in a \l State.
+
+ AnchorChanges cannot be used to modify the margins on an item. For this, use
+ PropertyChanges intead.
+
+ In the following example we change the top and bottom anchors of an item
+ using AnchorChanges, and the top and bottom anchor margins using
+ PropertyChanges:
+
+ \snippet doc/src/snippets/declarative/anchorchanges.qml 0
AnchorChanges can be animated using AnchorAnimation.
\qml