My Setup: I have one class that only emits signals called class Conn.
All of my QObject classes (A, B, and C) exist in isolation and I don't want them to know about each other at all. However, if class A wants to send some information outside of itself, it must send a signal to the Conn object.
Class B and C both have the access to the Conn object and can themselves decided on whether or not they want to listen to one of Conn's signal.
My Problem: Let's say class A wants to emit the signal in the Conn object called sig_updateFoo(int) whenever it updates foo. Now, let's say class A also wants to connect the sig_updateFoo(int) signal to its slot called slot_FooUpdated(int) because it also wants to listen for when someone else emits the Conn object's signal.
A logical error occurs when when Class A has the Conn object emit a signal which is also connected to one of its slots.
I need to know if the original emitter was Class A (in which case I will disregard the call), or if it was a different class, which is ok).
Ideas I have tried: If I use QObject::sender() in Class A's slot, I only get a reference the Conn object, not Class A.
Any ideas?