• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Extension Interfaces Library
 

KDevelop Extension Interfaces Library

The TDevelop Extension Interfaces Library

This library contains extension interfaces used by TDevelop plugin architecture.Link with: -ltdevelop

Include path: -I$(kde_includes)/tdevelop/interfaces/extensions

What is the TDevelop extension

Extension is a TDevelop plugin which implements one of extension interfaces. Extension is usually not important enough to be returned by KDevApi and KDevPlugin methods. Therefore extension instance can be obtained by KDevPlugin::extension method.

Note: extension plugins can be either core, global and project plugins. They are loaded in the same way other plugins are. But extensions differ from usual plugins.

Note: many plugins implementing extension interface can be created but only one of those should be loaded at a time. This can be accomplished by:

  • using a shell plugin profile (as done in current generic shell implementation) - define different X-TDevelop-Properties for different extension implementations;
  • writing project manager which looks into the project file and loads the neccesary extension.

Creating and using an extension

  • Define a service, use following .desktop file:
    [Desktop Entry]
    Encoding=UTF-8
    Type=ServiceType
    X-TDE-ServiceType=TDevelop/MyExtension
    X-TDE-Derived=TDevelop/Plugin
    Name=My Extension Interface
    [PropertyDef::X-TDevelop-Version]
    Type=int
  • Define an abstract base class for an extension like:
    class KDevMyExtension: public KDevPlugin {
    public:
    KDevMyExtension(const KDevPluginInfo *info, QObject* parent, const char* name)
    :KDevPlugin(info, parent, name) {}
    virtual void doSomething() = 0;
    };
  • Create an usual plugin, but instead of setting service type to "TDevelop/Plugin", set:
    ServiceTypes=TDevelop/MyExtension
  • Use your extension:
    KDevMyExtension *myext = extension<KDevMyExtension>("TDevelop/MyExtension");
    if (sf) {
    // do something
    } else {
    // fail
    }

KDevelop Extension Interfaces Library

Skip menu "KDevelop Extension Interfaces Library"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop Extension Interfaces Library

Skip menu "KDevelop Extension Interfaces Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Extension Interfaces Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.