开发者

Any UML-like modeling tool for QT signals and slots?

Is it any uml-like modeling tool available that can design (draw) classes and can visually represent QT 开发者_如何转开发signals and slots, they connections?


The signal/slog mechanism is essentially a mechanism for registering callbacks. So your question could be paraphrased as: "How do I model callbacks in UML". I'm not sure if there is a good answer since callbacks are not really an object oriented construction. Conceptually the observer pattern would be closest.


You can try Enterprise Architect as it supports UML 2.1 and allow to create user defined diagrams.


These connections are dynamic, so I'm not sure it's even possible to represent them in a static way (as in a diagram).

Also, most often, they are tightly bound in time and code (i.e. you create two objects and then connect them). From the code, it should be pretty obvious what happens and why, making any extra documentation dangerous (since the best it could do was to document the current state and it would always be in danger to be out of date unless it was generated from the source, or rather from data gathered during the runtime of the application).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜