dRonin
adbada4
dRonin GCS
|
Base class for all plugins. More...
#include <iplugin.h>
Public Member Functions | |
IPlugin () | |
virtual | ~IPlugin () |
virtual bool | initialize (const QStringList &arguments, QString *errorString)=0 |
virtual void | extensionsInitialized ()=0 |
virtual void | shutdown () |
PluginSpec * | pluginSpec () const |
void | addObject (QObject *obj) |
void | addAutoReleasedObject (QObject *obj) |
void | removeObject (QObject *obj) |
Friends | |
class | Internal::PluginSpecPrivate |
Base class for all plugins.
The IPlugin class is an abstract class that must be implemented once for each plugin. A plugin consists of two parts: A description file, and a library that at least contains the IPlugin implementation.
IPlugin::IPlugin | ( | ) |
Definition at line 256 of file iplugin.cpp.
|
virtual |
Definition at line 265 of file iplugin.cpp.
void IPlugin::addAutoReleasedObject | ( | QObject * | obj | ) |
Convenience method for registering obj in the plugin manager's plugin pool. Usually, registered objects must be removed from the object pool and deleted by hand. Objects added to the pool via addAutoReleasedObject are automatically removed and deleted in reverse order of registration when the IPlugin instance is destroyed.
Definition at line 306 of file iplugin.cpp.
void IPlugin::addObject | ( | QObject * | obj | ) |
Convenience method that registers obj in the plugin manager's plugin pool by just calling PluginManager::addObject().
Definition at line 291 of file iplugin.cpp.
|
pure virtual |
Called after the IPlugin::initialize() method has been called, and after both the IPlugin::initialize() and IPlugin::extensionsInitialized() methods of plugins that depend on this plugin have been called. In this method, the plugin can assume that plugins that depend on this plugin are fully 'up and running'. It is a good place to look in the plugin manager's object pool for objects that have been provided by dependent plugins.
Implemented in MyPlugin::MyPluginImpl, Plugin1::MyPlugin1, Plugin2::MyPlugin2, Plugin3::MyPlugin3, Plugin1::MyPlugin1, Plugin2::MyPlugin2, Plugin3::MyPlugin3, Plugin1::MyPlugin1, Plugin2::MyPlugin2, and Plugin3::MyPlugin3.
|
pure virtual |
Called after the plugin has been loaded and the IPlugin instance has been created. The initialize methods of plugins that depend on this plugin are called after the initialize method of this plugin has been called. Plugins should initialize their internal state in this method. Returns if initialization of successful. If it wasn't successful, the errorString should be set to a user-readable message describing the reason.
Implemented in MyPlugin::MyPluginImpl, Plugin1::MyPlugin1, Plugin2::MyPlugin2, Plugin3::MyPlugin3, Plugin1::MyPlugin1, Plugin2::MyPlugin2, Plugin3::MyPlugin3, Plugin1::MyPlugin1, Plugin2::MyPlugin2, and Plugin3::MyPlugin3.
PluginSpec * IPlugin::pluginSpec | ( | ) | const |
Returns the PluginSpec corresponding to this plugin. This is not available in the constructor.
Definition at line 281 of file iplugin.cpp.
void IPlugin::removeObject | ( | QObject * | obj | ) |
Convenience method that unregisters obj from the plugin manager's plugin pool by just calling PluginManager::removeObject().
Definition at line 317 of file iplugin.cpp.
|
inlinevirtual |
Called during a shutdown sequence in the same order as initialization before the plugins get deleted in reverse order. This method can be used to optimize the shutdown down, e.g. to disconnect from the PluginManager::aboutToRemoveObject() signal if getting the signal (and probably doing lots of stuff to update the internal and visible state) doesn't make sense during shutdown.
|
friend |