开发者

Qt4 FSM: Is it possible to get transitions from QState?

开发者 https://www.devze.com 2023-01-31 15:40 出处:网络
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 tran

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 f开发者_如何学运维rom 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

0

精彩评论

暂无评论...
验证码 换一张
取 消