Qt4 FSM:是否可以从 QState 获取转换?
我缺少 QState API 中的转换列表。 :-(
可以从 QAbstractTransition 获取开始状态和目标状态,我想知道为什么不可能获取从一种状态到另一种状态的转换列表 - 无论如何,状态内部都知道它的转换。
获取转换列表from state 将提供逆向工程 Qt4 FSM 的可能性,例如使用 graphviz
子对象吗?
PS:它们是 QState 对象的
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果可能的话,您可以切换到 Qt 4.7。他们引入了一个
QState::transitions()
方法,http: //doc.troll.no/4.7/qstate.html#transitionsIf 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