src/corelib/statemachine/qstate.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
    64 
    64 
    65   QState objects can have child states, and can have transitions to other
    65   QState objects can have child states, and can have transitions to other
    66   states. QState is part of \l{The State Machine Framework}.
    66   states. QState is part of \l{The State Machine Framework}.
    67 
    67 
    68   The addTransition() function adds a transition. The removeTransition()
    68   The addTransition() function adds a transition. The removeTransition()
    69   function removes a transition.
    69   function removes a transition. The transitions() function returns the
       
    70   state's outgoing transitions.
    70 
    71 
    71   The assignProperty() function is used for defining property assignments that
    72   The assignProperty() function is used for defining property assignments that
    72   should be performed when a state is entered.
    73   should be performed when a state is entered.
    73 
    74 
    74   Top-level states must be passed a QStateMachine object as their parent
    75   Top-level states must be passed a QStateMachine object as their parent
   406         mach->unregisterTransition(transition);
   407         mach->unregisterTransition(transition);
   407     transition->setParent(0);
   408     transition->setParent(0);
   408 }
   409 }
   409 
   410 
   410 /*!
   411 /*!
       
   412   \since 4.7
       
   413 
       
   414   Returns this state's outgoing transitions (i.e. transitions where
       
   415   this state is the \l{QAbstractTransition::sourceState()}{source
       
   416   state}), or an empty list if this state has no outgoing transitions.
       
   417 
       
   418   \sa addTransition()
       
   419 */
       
   420 QList<QAbstractTransition*> QState::transitions() const
       
   421 {
       
   422     Q_D(const QState);
       
   423     return d->transitions();
       
   424 }
       
   425 
       
   426 /*!
   411   \reimp
   427   \reimp
   412 */
   428 */
   413 void QState::onEntry(QEvent *event)
   429 void QState::onEntry(QEvent *event)
   414 {
   430 {
   415     Q_UNUSED(event);
   431     Q_UNUSED(event);