Interface used to communicate with plugins. More...
#include <IPlugin.h>
Public Types | |
enum | PluginState { Functional = 0, IncompatibleState = 1, ErrorState = 2, InActive = 4 } |
The possible states in which a plugin can be. More... |
Public Member Functions | |
void | addErrorMessage (const QString &error_string) |
Adds a error message to list of error associated with the plugin. | |
void | addErrorMessages (const QStringList &error_strings) |
Adds error messages to list of error associated with the plugin. | |
void | addPluginState (PluginState state) |
Adds a PluginState the PluginStateFlags of the plugin. | |
QStringList | errorMessages () const |
Gets the error messages associated with the plugin. | |
virtual void | finalize () |
This function is called before a plugin is unloaded in the system. | |
bool | hasErrors () const |
Indicates if there are errors messages associated with this plugin. | |
virtual bool | initialize (const QStringList &arguments, QStringList *error_strings)=0 |
This function is called when the plugin is loaded. | |
virtual bool | initializeDependencies (QStringList *error_strings)=0 |
This function is called when all the plugins in the system were loaded and initialized. | |
virtual QtilitiesCategory | pluginCategory () const =0 |
The category of the plugin. | |
virtual QString | pluginCopyright () const =0 |
The copyright information of the plugin. | |
virtual QString | pluginDescription () const =0 |
A description for the plugin. | |
QString | pluginFileName () const |
Gets the plugin file name. | |
virtual QString | pluginLicense () const =0 |
The licensing details of the plugin. | |
virtual QString | pluginName () const =0 |
The name of the plugin. | |
virtual QString | pluginPublisher () const =0 |
The name of the plugin's publisher. | |
virtual QString | pluginPublisherContact () const =0 |
The contact details (in the form of an email address) of the plugin's publisher. | |
virtual QString | pluginPublisherWebsite () const =0 |
The website of the plugin's publisher. | |
PluginStateFlags | pluginState () const |
Gets the plugin state. | |
QString | pluginStateString () const |
Function which returns a string associated with a the plugin's state. | |
virtual VersionInformation | pluginVersionInformation () const =0 |
The version information of the plugin. | |
void | setPluginFileName (const QString &file_name) |
Sets the plugin file name. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase | |
virtual QObject * | objectBase ()=0 |
Returns the QObject* base of the interface. | |
virtual const QObject * | objectBase () const =0 |
Returns a const QObject* base of the interface. | |
QString | objectOriginID () const |
Allows interfaces to provide some sort of source identification. | |
void | setObjectOriginID (const QString &object_origin_id) |
Allows setting of the object source ID of this interface implementation. |
Interface used to communicate with plugins.
The possible states in which a plugin can be.
|
inlinevirtual |
This function is called before a plugin is unloaded in the system.
If your plugin needs to do something before it is unloaded (save settings for example), do it in here.
Reimplemented in Qtilities::Plugins::Template::PluginTemplate, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Help::HelpPlugin, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Debug::DebugPlugin, and Qtilities::Plugins::SessionLog::SessionLogPlugin.
|
pure virtual |
This function is called when the plugin is loaded.
Use this implementation to register objects in the global object pool. Typically one plugin will look for objects in other plugins which implements a specific interface. These objects, the ones implementing the interfaces, must be added to the global object pool in this function.
arguments | A list of possible arguments to be sent to the plugin during initialization. |
error_strings | Plugins can add error/warning strings to this list when they detect errors. |
Implemented in Qtilities::Plugins::Template::PluginTemplate, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Help::HelpPlugin, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Debug::DebugPlugin, and Qtilities::Plugins::SessionLog::SessionLogPlugin.
|
pure virtual |
This function is called when all the plugins in the system were loaded and initialized.
If you have an object which looks for specific interfaces in the global object pool, do the search here.
error_strings | Plugins can add error/warning strings to this list when they detect errors. |
Implemented in Qtilities::Plugins::Template::PluginTemplate, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Help::HelpPlugin, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Debug::DebugPlugin, and Qtilities::Plugins::SessionLog::SessionLogPlugin.
|
pure virtual |
The version information of the plugin.
If your plugin does not depend on the application it is used in, you can return an empty list of supported versions (this is the default) to let the extension system know not to check the compatibility of your plugin.
Here is an example implementation of this function:
Implemented in Qtilities::Plugins::Template::PluginTemplate, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Help::HelpPlugin, Qtilities::Plugins::ProjectManagement::ProjectManagementPlugin, Qtilities::Plugins::Debug::DebugPlugin, and Qtilities::Plugins::SessionLog::SessionLogPlugin.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|