• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

interfaces

KDevelop::IPlugin

KDevelop::IPlugin Class Reference

#include <iplugin.h>

Inheritance diagram for KDevelop::IPlugin:

Inheritance graph
[legend]

List of all members.


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=
Description of parameters in .desktop file:
  • 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
Global plugins are plugins which require only the shell to be loaded and do not operate on the Project interface and/or do not use project wide information.
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]

Destructs a plugin.

Definition at line 140 of file iplugin.cpp.


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]

Initialize the XML Gui State.

Definition at line 222 of file iplugin.cpp.

void KDevelop::IPlugin::newIconLoader (  )  const [slot]

Re-initialize the global icon loader.

Definition at line 162 of file iplugin.cpp.

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:
  • iplugin.h
  • iplugin.cpp

interfaces

Skip menu "interfaces"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal