Commit 9bc8e964 authored by Martin Schultz's avatar Martin Schultz
Browse files

added example code for QueuedCrossPluginInterface

parent 2827e283
...@@ -134,6 +134,47 @@ void ExamplePlugin::pluginsInitialized() ...@@ -134,6 +134,47 @@ void ExamplePlugin::pluginsInitialized()
} }
\endcode \endcode
The next example shows how to use a queued connection between two plugins:
class ExamplePlugin: public QObject, BaseInterface, PluginConnectionInterface, [...]
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();
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 by emitting the connected signal
emit dataControlGroupObjects(ids, "fancy group name");
To use the ScriptInterface: To use the ScriptInterface:
<ul> <ul>
<li> include PluginConnectionInterface.hh in your plugins header file <li> include PluginConnectionInterface.hh in your plugins header file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment