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

interfaces

KDevelop::IPluginController

KDevelop::IPluginController Class Reference

#include <iplugincontroller.h>

Inheritance diagram for KDevelop::IPluginController:

Inheritance graph
[legend]

List of all members.


Detailed Description

The KDevelop plugin controller.

The Plugin controller is responsible for querying, loading and unloading available plugins.

Definition at line 49 of file iplugincontroller.h.


Public Types

enum  PluginType { Global = 0, Project }

Signals

void loadingPlugin (const QString &)
void pluginLoaded (KDevelop::IPlugin *)
void pluginUnloaded (KDevelop::IPlugin *)
void profileChanged ()

Public Member Functions

virtual QList< IPlugin * > allPluginsForExtension (const QString &extension, const QStringList &constraints=QStringList())=0
virtual QString changeProfile (const QString &newProfile)=0
virtual QString currentProfile () const =0
virtual ProfileEngine & engine () const =0
template<class Extension>
Extension * extensionForPlugin (const QString &extension, const QString &pluginname="")
virtual QExtensionManager * extensionManager ()=0
 IPluginController (QObject *parent=0)
virtual QList< IPlugin * > loadedPlugins () const =0
virtual IPlugin * loadPlugin (const QString &pluginName)=0
virtual void loadPlugins (PluginType offer)=0
virtual IPlugin * pluginForExtension (const QString &extension, const QString &pluginname="")=0
virtual KPluginInfo pluginInfo (const IPlugin *) const =0
virtual QList
< ContextMenuExtension > 
queryPluginsForContextMenuExtensions (KDevelop::Context *context) const =0
virtual void unloadPlugin (const QString &plugin)=0
virtual void unloadPlugins (PluginType offer)=0

Static Public Member Functions

static QStringList argumentsFromService (const KService::Ptr &service)
static KPluginInfo::List query (const QString &serviceType, const QString &constraint)
static KPluginInfo::List queryPlugins (const QString &constraint)

Member Function Documentation

template<class Extension>
Extension* KDevelop::IPluginController::extensionForPlugin ( const QString &  extension,
const QString &  pluginname = "" 
) [inline]

Queries for the plugin which supports given extension interface and returns a pointer to the extension interface.

This is the difference between this method and pluginForExtension, what returns the plugin itself. All already loaded plugins will be queried and the first one to support the extension interface will be returned. Any plugin can be an extension, only "ServiceTypes=..." entry is required in .desktop file for that plugin.

Parameters:
extension The extension interface
pluginname The name of the plugin to load if multiple plugins for the extension exist, corresponds to the X-KDE-PluginInfo-Name
Returns:
Pointer to the extension interface or 0 if no plugin supports it

Definition at line 113 of file iplugincontroller.h.

virtual QList<IPlugin*> KDevelop::IPluginController::loadedPlugins (  )  const [pure virtual]

Get a list of currently loaded plugins.

virtual IPlugin* KDevelop::IPluginController::loadPlugin ( const QString &  pluginName  )  [pure virtual]

Loads the plugin specified by pluginname.

Parameters:
pluginName the name of the plugin, as given in the X-KDE-PluginInfo-Name property
Returns:
a pointer to the plugin instance or 0

virtual IPlugin* KDevelop::IPluginController::pluginForExtension ( const QString &  extension,
const QString &  pluginname = "" 
) [pure virtual]

Queries for the plugin which supports given extension interface.

All already loaded plugins will be queried and the first one to support the extension interface will be returned. Any plugin can be an extension, only "ServiceTypes=..." entry is required in .desktop file for that plugin.

Parameters:
extension The extension interface
pluginname The name of the plugin to load if multiple plugins for the extension exist, corresponds to the X-KDE-PluginInfo-Name
Returns:
A KDevelop extension plugin for given service type or 0 if no plugin supports it

virtual KPluginInfo KDevelop::IPluginController::pluginInfo ( const IPlugin *   )  const [pure virtual]

Get the plugin info for a loaded plugin.

void KDevelop::IPluginController::profileChanged (  )  [signal]

Emitted when a plugin profile was changed (reloaded, other profile opened, etc.

). Should work only on shells with plugin profiles support.

KPluginInfo::List KDevelop::IPluginController::query ( const QString &  serviceType,
const QString &  constraint 
) [static]

Queries KDevelop services.

Version is checked automatically by adding proper X-KDevelop-Version=N statement into the query.

Parameters:
serviceType The service type to query, for example "KDevelop/Plugin" or "KDevelop/SourceFormatter."
constraint A constraint for the service. Do not include plugin version number - it is done automatically.
Returns:
The list of plugin offers.

Definition at line 44 of file iplugincontroller.cpp.

KPluginInfo::List KDevelop::IPluginController::queryPlugins ( const QString &  constraint  )  [static]

Queries KDevelop plugins.

Works like KDevPluginController::query with serviceType set to "KDevelop/Plugin".

Parameters:
constraint A constraint for the service. Do not include plugin version number - it is done automatically.
Returns:
The list of plugin offers.

Definition at line 56 of file iplugincontroller.cpp.

virtual void KDevelop::IPluginController::unloadPlugin ( const QString &  plugin  )  [pure virtual]

Unloads the plugin specified by plugin.

Parameters:
plugin The name of the plugin as specified by the X-KDE-PluginInfo-Name key of the .desktop file for the plugin


The documentation for this class was generated from the following files:
  • iplugincontroller.h
  • iplugincontroller.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