summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/statemachine/qstate.cpp')
-rw-r--r--src/corelib/statemachine/qstate.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index b6b3281..69cca06 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -66,7 +66,8 @@ QT_BEGIN_NAMESPACE
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 @@ void QState::removeTransition(QAbstractTransition *transition)
}
/*!
+ \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)