LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Base class for signal-slot relays in plugin APIs. More...
#include "basehookinterconnector.h"
Public Member Functions | |
BaseHookInterconnector (QObject *parent=0) | |
Creates the interconnector with the given parent. More... | |
virtual | ~BaseHookInterconnector () |
Virtual destructor. More... | |
virtual void | AddPlugin (QObject *plugin) |
Adds a subplugin to this interconnector. More... | |
void | RegisterHookable (QObject *hookable) |
Adds a hookable object from the root plugin. More... | |
Protected Attributes | |
QList< QObject * > | Plugins_ |
Base class for signal-slot relays in plugin APIs.
This class is typically used by plugins that support other plugins to relay signals from the internals of the root plugin to the subplugins.
The interconnector automatically connects its signals with the matching slots (that is, with the same name and parameters) of subplugins added to it via AddPlugin(), and connects signals of the objects added via RegisterHookable() to its own matching signals.
The usage is as follows:
Please note that second and third steps can be done in arbitrary order and even be interleaved.
Definition at line 57 of file basehookinterconnector.h.
LC::Util::BaseHookInterconnector::BaseHookInterconnector | ( | QObject * | parent = 0 | ) |
Creates the interconnector with the given parent.
[in] | parent | The parent object of this interconnector. |
Definition at line 29 of file basehookinterconnector.cpp.
|
virtual |
Virtual destructor.
Definition at line 34 of file basehookinterconnector.cpp.
|
virtual |
Adds a subplugin to this interconnector.
This function is used to add a subplugin whose slots should be connected to the signals of this plugin.
Every signal of this object with the name and parameters list matching a slot of plugin will be automatically connected to it.
[in] | plugin | The subplugin to add to this interconnector. |
Definition at line 170 of file basehookinterconnector.cpp.
void LC::Util::BaseHookInterconnector::RegisterHookable | ( | QObject * | hookable | ) |
Adds a hookable object from the root plugin.
This function is used to add an object whose signals need to be exposed to subplugins.
Every signal of hookable with the name and parameters list matching a signal of this object will be automatically connected to it.
[in] | hookable | The hookable object from the root plugin to add. |
Definition at line 177 of file basehookinterconnector.cpp.
|
protected |
Definition at line 67 of file basehookinterconnector.h.