Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genenerate a list or a diagram of signal-slot connections, can Gammaray help here? #660

Open
cdwijs opened this issue Dec 22, 2021 · 0 comments

Comments

@cdwijs
Copy link

cdwijs commented Dec 22, 2021

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:
image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant