diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-04-17 19:37:40 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-04-17 19:37:40 (GMT) |
commit | 49b496d9601af37de1627ef2014f011b501ceeed (patch) | |
tree | 64128930e904eea3dd07cdff02400a09d30234be /doc | |
parent | 86dd690e4d33c152f031bcbf4b1cecd0e6369928 (diff) | |
download | Qt-49b496d9601af37de1627ef2014f011b501ceeed.zip Qt-49b496d9601af37de1627ef2014f011b501ceeed.tar.gz Qt-49b496d9601af37de1627ef2014f011b501ceeed.tar.bz2 |
more doc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/statemachine.qdoc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/statemachine.qdoc b/doc/src/statemachine.qdoc index c79839f..3051d19 100644 --- a/doc/src/statemachine.qdoc +++ b/doc/src/statemachine.qdoc @@ -77,21 +77,21 @@ The above state machine is perfectly fine, but it doesn't \e do anything; it merely transitions from one state to another. The - QState::setPropertyOnEntry() function can be used to have a state set a + 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: \code - s1->setPropertyOnEntry(label, "text", "In state s1"); - s2->setPropertyOnEntry(label, "text", "In state s2"); - s3->setPropertyOnEntry(label, "text", "In state s3"); + s1->assignProperty(label, "text", "In state s1"); + s2->assignProperty(label, "text", "In state s2"); + s3->assignProperty(label, "text", "In state s3"); \endcode When any of the states is entered, the label's text will be changed accordingly. - The QState::invokeMethodOnEntry() function can be used to have a state + 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 following snippet, the button's showMaximized() slot will be called when state \c s3 is entered: @@ -204,7 +204,7 @@ QHistoryState *s1h = s1->addHistoryState(); QState *s3 = new QState(); - s3->setPropertyOnEntry(label, "text", "In s3"); + s3->assignProperty(label, "text", "In s3"); QMessageBox mbox; mbox.addButton(QMessageBox::Ok); mbox.setText("Interrupted!"); |