diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-04-28 12:05:15 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-04-29 06:29:47 (GMT) |
commit | 2c22f8748f62db3cd4c2782abcd19c273f4a4426 (patch) | |
tree | 7042ed9d22fc694aca7651d938496a16c369a58e /src/corelib/statemachine/qabstractstate.cpp | |
parent | 6293521a6e5ee0ce010180a40e6fda3ef3a8b245 (diff) | |
download | Qt-2c22f8748f62db3cd4c2782abcd19c273f4a4426.zip Qt-2c22f8748f62db3cd4c2782abcd19c273f4a4426.tar.gz Qt-2c22f8748f62db3cd4c2782abcd19c273f4a4426.tar.bz2 |
say hello (again) to QAbstract{State,Transition}::machine()
It's useful and it's simple for us to expose, so let's.
Diffstat (limited to 'src/corelib/statemachine/qabstractstate.cpp')
-rw-r--r-- | src/corelib/statemachine/qabstractstate.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp index 12f14d7..cc6f0f9 100644 --- a/src/corelib/statemachine/qabstractstate.cpp +++ b/src/corelib/statemachine/qabstractstate.cpp @@ -63,7 +63,8 @@ QT_BEGIN_NAMESPACE The entered() signal is emitted when the state has been entered. The exited() signal is emitted when the state has been exited. - The parentState() function returns the state's parent state. + The parentState() function returns the state's parent state. The machine() + function returns the state machine that the state is part of. \section1 Subclassing @@ -179,6 +180,16 @@ QState *QAbstractState::parentState() const } /*! + Returns the state machine that this state is part of, or 0 if the state is + not part of a state machine. +*/ +QStateMachine *QAbstractState::machine() const +{ + Q_D(const QAbstractState); + return d->machine(); +} + +/*! \fn QAbstractState::onExit() This function is called when the state is exited. Reimplement this function |