interfaces
KDevelop::IPlugin Class Reference
#include <iplugin.h>
Inheritance diagram for KDevelop::IPlugin:

Detailed Description
The base class for all KDevelop plugins.Plugin is a component which is loaded into KDevelop shell at startup or by request. Each plugin should have corresponding .desktop file with a description. The .desktop file template looks like:
[Desktop Entry] Encoding=UTF-8 Type=Service Name= GenericName= Comment= Icon= X-KDevelop-Plugin-Version= X-KDevelop-Plugin-Homepage= X-KDevelop-Plugin-BugsEmailAddress= X-KDevelop-Plugin-Copyright= X-KDE-Library= X-KDevelop-Version= X-KDevelop-Category= X-KDevelop-Properties= X-KDevelop-Args=
- Name is a non-translatable name of a plugin, it is used in KTrader queries to search for a plugin (required);
- GenericName is a translatable name of a plugin, it is used to show plugin names in GUI (required);
- Comment is a short description about the plugin (optional);
- Icon is a plugin icon (preferred);
- X-KDevelop-Plugin-Version is a version of a plugin (optional);
- X-KDevelop-Interfaces is a list of extension interfaces that this plugin implements (optional);
- X-KDevelop-IRequired is a list of extension interfaces that this plugin depends on (optional);
- X-KDevelop-IOptional is a list of extension interfaces that this plugin will use if they are available (optional);
- X-KDevelop-Plugin-Homepage is a home page of a plugin (optional);
- X-KDevelop-Plugin-License is a license (optional). can be: GPL, LGPL, BSD, Artistic, QPL or Custom. If this property is not set, license is considered as unknown;
- X-KDevelop-Plugin-BugsEmailAddress is an email address for bug reports (optional);
- X-KDevelop-Plugin-Copyright is a copyright statement (optional);
- X-KDE-Library is a name of library which contains the plugin (required);
- X-KDevelop-Version is a version of KDevelop interfaces which is supported by the plugin (required);
- X-KDevelop-Category is a scope of a plugin (see below for explanation) (required);
- X-KDevelop-Args is a list of additional arguments passed to plugins constructor (optional);
- X-KDevelop-Properties is a list of properties which this plugin supports, see the Profile documentation for an explanation (required to work with shells that support profiles).
Plugin scope can be either:
- Global
- Project
Core plugins are global plugins which offer some important "core" functionality and thus are not selectable by user in plugin configuration pages.
Project plugins require a project to be loaded and are usually loaded/unloaded along with the project. If your plugin uses the Project interface and/or operates on project-related information then this is a project plugin.
- See also:
- Core class documentation for an information about features which are available to plugins from shell applications.
Definition at line 133 of file iplugin.h.
Public Slots | |
| void | newIconLoader () const |
Public Member Functions | |
| virtual ContextMenuExtension | contextMenuExtension (KDevelop::Context *context) |
| Q_SCRIPTABLE ICore * | core () const |
| template<class Extension> | |
| Extension * | extension () |
| Q_SCRIPTABLE QStringList | extensions () const |
| Q_SCRIPTABLE KIconLoader * | iconLoader () const |
| IPlugin (const KComponentData &instance, QObject *parent) | |
| Q_SCRIPTABLE void | registerExtensions () |
| virtual Q_SCRIPTABLE void | unload () |
| Q_SCRIPTABLE void | unregisterExtensions () |
| virtual | ~IPlugin () |
Protected Member Functions | |
| void | addExtension (const QString &) |
| virtual void | initializeGuiState () |
Constructor & Destructor Documentation
| KDevelop::IPlugin::IPlugin | ( | const KComponentData & | instance, | |
| QObject * | parent | |||
| ) |
Constructs a plugin.
- Parameters:
-
instance The instance for this plugin. parent The parent object for the plugin.
Definition at line 109 of file iplugin.cpp.
| KDevelop::IPlugin::~IPlugin | ( | ) | [virtual] |
Member Function Documentation
| KDevelop::ContextMenuExtension KDevelop::IPlugin::contextMenuExtension | ( | KDevelop::Context * | context | ) | [virtual] |
ask the plugin for a ContextActionContainer, which contains actions that will be merged into the context menu.
- Parameters:
-
context the context describing where the context menu was requested
- Returns:
- a container descriping which actions to merge into which context menu part
Definition at line 216 of file iplugin.cpp.
| KIconLoader * KDevelop::IPlugin::iconLoader | ( | ) | const |
Provides access to the global icon loader.
- Returns:
- the plugin's icon loader
Definition at line 150 of file iplugin.cpp.
| void KDevelop::IPlugin::initializeGuiState | ( | ) | [protected, virtual] |
| void KDevelop::IPlugin::newIconLoader | ( | ) | const [slot] |
| void KDevelop::IPlugin::unload | ( | ) | [virtual] |
Signal the plugin that it should cleanup since it will be unloaded soon.
Definition at line 145 of file iplugin.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference