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 | |
parent | 86dd690e4d33c152f031bcbf4b1cecd0e6369928 (diff) | |
download | Qt-49b496d9601af37de1627ef2014f011b501ceeed.zip Qt-49b496d9601af37de1627ef2014f011b501ceeed.tar.gz Qt-49b496d9601af37de1627ef2014f011b501ceeed.tar.bz2 |
more doc
-rw-r--r-- | doc/src/statemachine.qdoc | 12 | ||||
-rw-r--r-- | src/corelib/statemachine/qabstractstate.cpp | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 6 |
3 files changed, 12 insertions, 8 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!"); diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp index 1795bd6..c85fd09 100644 --- a/src/corelib/statemachine/qabstractstate.cpp +++ b/src/corelib/statemachine/qabstractstate.cpp @@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE set in the state and restore them later. - \sa setRestorePolicy(), restorePolicy() + \sa setRestorePolicy(), restorePolicy(), QAbstractState::assignProperty() */ /*! diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 90932f6..f1fc8a0 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -124,7 +124,7 @@ QT_BEGIN_NAMESPACE QStateMachine machine; QState *s1 = new QState(); - s1->setPropertyOnEntry(&button, "text", "Click me"); + s1->assignProperty(&button, "text", "Click me"); QFinalState *s2 = new QFinalState(); s1->addTransition(&button, SIGNAL(clicked()), s2); @@ -1921,6 +1921,8 @@ QSignalEventGenerator::QSignalEventGenerator( */ /*! + \internal + Constructs a new QSignalEvent object with the given \a sender, \a signalIndex and \a arguments. */ @@ -1984,6 +1986,8 @@ QSignalEvent::~QSignalEvent() */ /*! + \internal + Constructs a new QStateFinishedEvent object associated with the given \a state. */ QStateFinishedEvent::QStateFinishedEvent(QState *state) |