summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qabstracttransition.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-04-28 12:05:15 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-04-29 06:29:47 (GMT)
commit2c22f8748f62db3cd4c2782abcd19c273f4a4426 (patch)
tree7042ed9d22fc694aca7651d938496a16c369a58e /src/corelib/statemachine/qabstracttransition.cpp
parent6293521a6e5ee0ce010180a40e6fda3ef3a8b245 (diff)
downloadQt-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/qabstracttransition.cpp')
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp
index dfce310..731871c 100644
--- a/src/corelib/statemachine/qabstracttransition.cpp
+++ b/src/corelib/statemachine/qabstracttransition.cpp
@@ -61,7 +61,8 @@ QT_BEGIN_NAMESPACE
Framework}.
The sourceState() function returns the source of the transition. The
- targetStates() function returns the targets of the transition.
+ targetStates() function returns the targets of the transition. The machine()
+ function returns the state machine that the transition is part of.
Transitions can cause animations to be played. Use the addAnimation()
function to add an animation to the transition.
@@ -286,6 +287,16 @@ void QAbstractTransition::setTargetStates(const QList<QAbstractState*> &targets)
d->targetStates = targets;
}
+/*!
+ Returns the state machine that this transition is part of, or 0 if the
+ transition is not part of a state machine.
+*/
+QStateMachine *QAbstractTransition::machine() const
+{
+ Q_D(const QAbstractTransition);
+ return d->machine();
+}
+
#ifndef QT_NO_ANIMATION
/*!