Genenerate a list or a diagram of signal-slot connections, can Gammaray help here? #660
Description
Hi All,
I have made a Qt program that uses signals and slots to exchange messages between the different modules.
Now I would like to run the program, and then use Gammaray to generate a diagram of the current signals and slot connections, like this:
This is the sourcecode of the above diagram:
digraph structure { node [shape=record] rankdir=LR ObjectA [label = "ObjectA | <slotA> slotA | <slotB> slotB | <slotC> slotC | <sigA>sigA" ] ObjectB [label = "ObjectB | <slotA> slotA | <slotB> slotB | <slotC> slotC | <sigA>sigA" ] ObjectC [label = "ObjectC | <slotA> slotA | <slotB> slotB | <slotC> slotC | <sigA>sigA" ] ObjectA:sigA -> ObjectB:slotC ObjectB:sigA -> ObjectC:slotC ObjectC:sigA -> ObjectA:slotA }
In the Object browser, I select an instance of QTimer, and then select the tab "Connections". Then I can see the inbound and the outbound connections. This is all the information that is needed to generate the above diagram, as the diagram only needs to know the following:
- Per object it needs to know the signals and the slots, so it can draw the boxes
- Per signal/slot connection it needs to know the sender (and signal) and the receiver (and signal), so it can draw the arrows
Is it possible to export a list of all the signal and slot connections, so this can then be processed into the form that Graphwiz can render in a diagram like above?
See also my question on the Qt forum:
https://forum.qt.io/topic/132991/auto-generate-a-map-of-all-signal-slot-connections/
PS, Does Gammaray have a mailing list or forum? I think the bug tracker is not the optimal place to ask these kind of questions