KDE PIM / Developers / API Docs / kontact

Kontact::Plugin Class Reference

Base class for all Plugins in Kontact. More...

#include <plugin.h>

Inherits QObject, and KXMLGUIClient.

Inherited by Akregator::Plugin, JournalPlugin, KAddressbookPlugin, KitchenSyncPlugin, KMailPlugin, KNodePlugin, KNotesPlugin, KOrganizerPlugin, KPilotPlugin, MultiSynkPlugin, NewsTickerPlugin, SpecialdatesPlugin, SummaryView, TodoPlugin, and WeatherPlugin.

List of all members.

Public Slots

Public Member Functions

Protected Member Functions


Detailed Description

Base class for all Plugins in Kontact.

Inherit from it to get a plugin. It can insert an icon into the sidepane, add widgets to the widgetstack and add menu items via XMLGUI.


Constructor & Destructor Documentation

Kontact::Plugin::Plugin Core core,
QObject *  parent,
const char *  name
 

Creates a new Plugin, note that name parameter name is required if you want your plugin to do dcop via it's own instance of.

See also:
DCOPClient by calling

dcopClient.

Note:
See also:
name MUST be the name of the application that provides the part! This is the name used for DCOP registration. It's ok to have several plugins using the same application name.

Member Function Documentation

void Kontact::Plugin::setIdentifier const QString &  identifier  ) 
 

Sets the identifier.

QString Kontact::Plugin::identifier  )  const
 

Returns the identifier.

It is used as argument for several methods of Kontacts core.

void Kontact::Plugin::setTitle const QString &  title  ) 
 

Sets the localized title.

QString Kontact::Plugin::title  )  const
 

Returns the localized title.

void Kontact::Plugin::setIcon const QString &  icon  ) 
 

Sets the icon name.

QString Kontact::Plugin::icon  )  const
 

Returns the icon name.

void Kontact::Plugin::setExecutableName const QString &  bin  ) 
 

Sets the name of executable (if existant).

QString Kontact::Plugin::executableName  )  const
 

Returns the name of the binary (if existant).

void Kontact::Plugin::setPartLibraryName const QCString &   ) 
 

Set name of library which contains the KPart used by this plugin.

virtual bool Kontact::Plugin::createDCOPInterface const QString &   )  [inline, virtual]
 

Create the DCOP interface for the given serviceType, if this plugin provides it.

Return false otherwise.

virtual bool Kontact::Plugin::isRunningStandalone  )  [inline, virtual]
 

Reimplement this method and return wether a standalone application is still running This is only required if your part is also available as standalone application.

virtual void Kontact::Plugin::bringToForeground  )  [virtual]
 

Reimplement this method if your application needs a different approach to be brought in the foreground.

The default behaviour is calling the binary. This is only required if your part is also available as standalone application.

virtual const KAboutData* Kontact::Plugin::aboutData  )  [virtual]
 

Reimplement this method if you want to add your credits to the Kontact about dialog.

KParts::ReadOnlyPart* Kontact::Plugin::part  ) 
 

You can use this method if you need to access the current part.

You can be sure that you always get the same pointer as long as the part has not been deleted.

virtual QString Kontact::Plugin::tipFile  )  const [virtual]
 

Reimplement this method and return the a path relative to "data" to the tips file.

virtual void Kontact::Plugin::select  )  [virtual]
 

This function is called when the plugin is selected by the user before the widget of the KPart belonging to the plugin is raised.

virtual void Kontact::Plugin::configUpdated  )  [virtual]
 

This function is called whenever the config dialog has been closed successfully.

virtual Summary* Kontact::Plugin::createSummaryWidget QWidget *   )  [inline, virtual]
 

Reimplement this method if you want to add a widget for your application to Kontact's summary page.

bool Kontact::Plugin::showInSideBar  )  const [virtual]
 

Returns wether the plugin provides a part that should be shown in the sidebar.

void Kontact::Plugin::setShowInSideBar bool  hasPart  ) 
 

Set if the plugin provides a part that should be shown in the sidebar.

virtual bool Kontact::Plugin::queryClose  )  const [inline, virtual]
 

Reimplement this method if you want to add checks before closing down the main kontact window.

Return true if it's OK to close the window. If any loaded plugin returns false from this method, then the main kontact window will not close.

DCOPClient* Kontact::Plugin::dcopClient  )  const
 

Retrieve the current DCOP Client for the plugin.

The clients name is taken from the name argument in the constructor.

Note:
: The DCOPClient object will only be created when this method is called for the first time. Make sure that the part has been loaded before calling this method, if it's the one that contains the DCOP interface that other parts might use.

virtual int Kontact::Plugin::weight  )  const [inline, virtual]
 

Return the weight of the plugin.

The higher the weight the lower it will be displayed in the sidebar. The default implementation returns 0.

void Kontact::Plugin::insertNewAction KAction *  action  ) 
 

Insert "New" action.

QPtrList<KAction>* Kontact::Plugin::newActions  )  const
 

FIXME: write API doc for Kontact::Plugin::newActions().

virtual QStringList Kontact::Plugin::invisibleToolbarActions  )  const [inline, virtual]
 

Returns a list of action name which shall be hidden in the main toolbar.

virtual bool Kontact::Plugin::canDecodeDrag QMimeSource *   )  [inline, virtual]
 

Return, if the plugin can handle the drag object of the given mime type.

virtual void Kontact::Plugin::processDropEvent QDropEvent *   )  [inline, virtual]
 

Process drop event.

void Kontact::Plugin::slotConfigUpdated  )  [slot]
 

internal usage

virtual KParts::ReadOnlyPart* Kontact::Plugin::createPart  )  [protected, pure virtual]
 

Reimplement and return the part here.

Reimplementing createPart() is mandatory!


The documentation for this class was generated from the following files: