سؤال

I am missing a list of transitions in QState API. :-(

It is possible to get start-state and target-state from QAbstractTransition, I wonder, why is there no possibility for obtaining the list of transitions leading from one state to another - the state internally knows its transitions anyway.

Obtaining transition list from state would give a possibility for reverse engineering Qt4 FSMs e.g. using graphviz.

P.S.: Are transitions children of QState object? Could they be safely obtained via children list?

Regards.

هل كانت مفيدة؟

المحلول

If it is possible for you, you could switch to Qt 4.7. They introduced a QState::transitions() method then, http://doc.troll.no/4.7/qstate.html#transitions

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top