Feature queued cross plugin connect
Adds the functionality to create queued cross plugin connections.
implements and closes https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free/issues/109
as Plugins can use crossPluginConnectQueued to connect a signal from their plugin directly with datacontrol plugin, with reduced boilerplate code.
e.g.
ExamplePlugin.hh:
class ExamplePlugin: public QObject, BaseInterface, PluginConnectionInterface, [...]
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
Q_INTERFACES(PluginConnectionInterface)
[...]
signals:
void crossPluginConnectQueued( QString, const char*, QString, const char*);
/// example signal which can be used to group objects in datacontrol
void void dataControlGroupObjects(IdList, QString);
[...]
void exampleFunction();
}
ExamplePlugin.cc:
[...]
void ExamplePlugin::pluginsInitialized()
{
[...]
emit crossPluginConnectQueued("exampleplugin",SIGNAL(dataControlGroupObjects(IdList, QString)),"datacontrol",SLOT(groupObjects(IdList, QString)));
}
void ExamplePlugin::exampleFunction()
{
//do whatever you want, especially use the signals you want, but don't create loops
// e.g. emit a bazillion addEmptObject signals
[...]
// finally group them with by emitting the connected signal
emit dataControlGroupObjects(ids, "fancy group name");
}
@lim as soon as this mr is merged, you can update your OpenFlipper submodule and use the above example to group objects.
Edited by Martin Schultz