A signal is an object that, when emitted, invokes one or more slot functions. This setup allows a one-way messaging system that informs a number of functions whenever a certain event occours. A simple example with one signal functions:
Important: when all references to the slot returned by connect are destroyed, the slot will disconnect from the signal.
If you have a lot of slots that needs to stay connected for a longer duration, the clan::SlotContainer class may come in handy:
The first signal invoke will invoke both, slot_function1 and slot_function2. The second signal invoke will have no effect because the SlotContainer disconnects all slots contained in it when destroyed.