summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-07 23:41:10 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-07 23:41:10 (GMT)
commitf3164b608e83a3e2c54643aea984095edc275346 (patch)
tree14b532e90e2a15b8d2ac5d46738971b0bedc561e /doc
parentb7ac7f5b4d4c8e08b4ded43c9720c712a3663810 (diff)
parent90057dabcb99759bcb42c1c21db7151c69d98706 (diff)
downloadQt-f3164b608e83a3e2c54643aea984095edc275346.zip
Qt-f3164b608e83a3e2c54643aea984095edc275346.tar.gz
Qt-f3164b608e83a3e2c54643aea984095edc275346.tar.bz2
Merge branch 'kinetic-animations' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/corelib/animation/qabstractanimation.cpp src/corelib/animation/qabstractanimation_p.h src/corelib/animation/qpropertyanimation.cpp
Diffstat (limited to 'doc')
-rw-r--r--doc/src/statemachine.qdoc27
1 files changed, 12 insertions, 15 deletions
diff --git a/doc/src/statemachine.qdoc b/doc/src/statemachine.qdoc
index 3051d19..60ae815 100644
--- a/doc/src/statemachine.qdoc
+++ b/doc/src/statemachine.qdoc
@@ -76,11 +76,10 @@
becomes part of your application's event loop.
The above state machine is perfectly fine, but it doesn't \e do anything; it
- merely transitions from one state to another. The
- QAbstractState::assignProperty() function can be used to have a state set a
- property of a QObject when the state is entered. In the following snippet,
- the value that should be assigned to a QLabel's text property is specified
- for each state:
+ merely transitions from one state to another. The QState::assignProperty()
+ function can be used to have a state set a property of a QObject when the
+ state is entered. In the following snippet, the value that should be
+ assigned to a QLabel's text property is specified for each state:
\code
s1->assignProperty(label, "text", "In state s1");
@@ -91,13 +90,12 @@
When any of the states is entered, the label's text will be changed
accordingly.
- The QActionState::invokeMethodOnEntry() function can be used to have a state
- invoke a method (a slot) of a QObject when the state is entered. In the
+ The QActionState::entered() signal is emitted when the state is entered. In the
following snippet, the button's showMaximized() slot will be called when
state \c s3 is entered:
\code
- s2->invokeMethodOnEntry(button, "showMaximized");
+ QObject::connect(s3, SIGNAL(entered()), button, SLOT(showMaximized()));
\endcode
\section1 Sharing Transitions By Grouping States
@@ -209,7 +207,7 @@
mbox.addButton(QMessageBox::Ok);
mbox.setText("Interrupted!");
mbox.setIcon(QMessageBox::Information);
- s3->invokeMethodOnEntry(&mbox, "exec");
+ QObject::connect(s3, SIGNAL(entered()), &mbox, SLOT(exec()));
s3->addTransition(s1h);
machine.addState(s3);
@@ -243,11 +241,11 @@
\caption This is a caption
\endomit
- To create a parallel state group, pass QState::ParallelStateGroup to the
- QState constructor.
+ To create a parallel state group, pass QState::ParallelStates to the QState
+ constructor.
\code
- QState *s1 = new QState(QState::ParallelStateGroup);
+ QState *s1 = new QState(QState::ParallelStates);
// s11 and s12 will be entered in parallel
QState *s11 = new QState(s1);
QState *s12 = new QState(s1);
@@ -255,9 +253,8 @@
\section1 Detecting that a Composite State has Finished
- A child state can be final; when a final child state is entered, a
- QStateFinishedEvent is generated for the parent state. You can use the
- QStateFinishedTransition class to trigger a transition based on this event.
+ A child state can be final; when a final child state is entered, the parent
+ state emits the QState::finished() signal.
\img statemachine-finished.png
\omit