src/corelib/statemachine/qstate.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/corelib/statemachine/qstate.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/corelib/statemachine/qstate.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -66,7 +66,8 @@
   states. QState is part of \l{The State Machine Framework}.
 
   The addTransition() function adds a transition. The removeTransition()
-  function removes a transition.
+  function removes a transition. The transitions() function returns the
+  state's outgoing transitions.
 
   The assignProperty() function is used for defining property assignments that
   should be performed when a state is entered.
@@ -408,6 +409,21 @@
 }
 
 /*!
+  \since 4.7
+
+  Returns this state's outgoing transitions (i.e. transitions where
+  this state is the \l{QAbstractTransition::sourceState()}{source
+  state}), or an empty list if this state has no outgoing transitions.
+
+  \sa addTransition()
+*/
+QList<QAbstractTransition*> QState::transitions() const
+{
+    Q_D(const QState);
+    return d->transitions();
+}
+
+/*!
   \reimp
 */
 void QState::onEntry(QEvent *event)