kontact

#include <plugin.h>

Inherits TQObject, and KXMLGUIClient.

Inherited by Akregator::AkregatorPlugin, JournalPlugin, KAddressbookPlugin, KMailPlugin, KNodePlugin, KNotesPlugin, KOrganizerPlugin, KPilotPlugin, KarmPlugin, NewsTickerPlugin, SpecialdatesPlugin, SummaryView, TodoPlugin, and WeatherPlugin.

Public Slots

void slotConfigUpdated ()
 

Public Member Functions

 Plugin (Core *core, TQObject *parent, const char *name)
 
void setIdentifier (const TQString &identifier)
 
TQString identifier () const
 
void setTitle (const TQString &title)
 
TQString title () const
 
void setIcon (const TQString &icon)
 
TQString icon () const
 
void setExecutableName (const TQString &bin)
 
TQString executableName () const
 
void setPartLibraryName (const TQCString &)
 
virtual bool createDCOPInterface (const TQString &)
 
virtual bool isRunningStandalone ()
 
virtual void bringToForeground ()
 
virtual const TDEAboutData * aboutData ()
 
KParts::ReadOnlyPart * part ()
 
virtual TQString tipFile () const
 
virtual void select ()
 
virtual void configUpdated ()
 
virtual SummarycreateSummaryWidget (TQWidget *)
 
virtual bool showInSideBar () const
 
void setShowInSideBar (bool hasPart)
 
virtual bool queryClose () const
 
DCOPClient * dcopClient () const
 
virtual int weight () const
 
void insertNewAction (TDEAction *action)
 
void insertSyncAction (TDEAction *action)
 
TQPtrList< TDEAction > * newActions () const
 
TQPtrList< TDEAction > * syncActions () const
 
virtual TQStringList invisibleToolbarActions () const
 
virtual bool canDecodeDrag (TQMimeSource *)
 
virtual void processDropEvent (TQDropEvent *)
 
virtual void loadProfile (const TQString &directoryPath)
 
virtual void saveToProfile (const TQString &directoryPath) const
 
virtual void readProperties (TDEConfig *)
 
virtual void saveProperties (TDEConfig *)
 
Corecore () const
 
bool disabled () const
 
void setDisabled (bool v)
 

Protected Member Functions

virtual KParts::ReadOnlyPart * createPart ()=0
 
KParts::ReadOnlyPart * loadPart ()
 
virtual void virtual_hook (int id, void *data)
 

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.

Definition at line 58 of file plugin.h.

Constructor & Destructor Documentation

◆ Plugin()

Plugin::Plugin ( Kontact::Core core,
TQObject *  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 DCOPClient by calling dcopClient.

Note
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.

Definition at line 56 of file plugin.cpp.

Member Function Documentation

◆ aboutData()

const TDEAboutData * Plugin::aboutData ( )
virtual

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

Definition at line 129 of file plugin.cpp.

◆ bringToForeground()

void 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.

Definition at line 219 of file plugin.cpp.

◆ canDecodeDrag()

virtual bool Kontact::Plugin::canDecodeDrag ( TQMimeSource *  )
inlinevirtual

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

Definition at line 238 of file plugin.h.

◆ configUpdated()

void Plugin::configUpdated ( )
virtual

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

Definition at line 205 of file plugin.cpp.

◆ createDCOPInterface()

virtual bool Kontact::Plugin::createDCOPInterface ( const TQString &  )
inlinevirtual

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

Return false otherwise.

Definition at line 125 of file plugin.h.

◆ createPart()

virtual KParts::ReadOnlyPart* Kontact::Plugin::createPart ( )
protectedpure virtual

Reimplement and return the part here.

Reimplementing createPart() is mandatory!

◆ createSummaryWidget()

virtual Summary* Kontact::Plugin::createSummaryWidget ( TQWidget *  )
inlinevirtual

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

Definition at line 174 of file plugin.h.

◆ dcopClient()

DCOPClient * 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.

Definition at line 163 of file plugin.cpp.

◆ executableName()

TQString Plugin::executableName ( ) const

Returns the name of the binary (if existant).

Definition at line 114 of file plugin.cpp.

◆ icon()

TQString Plugin::icon ( ) const

Returns the icon name.

Definition at line 104 of file plugin.cpp.

◆ identifier()

TQString Plugin::identifier ( ) const

Returns the identifier.

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

Definition at line 84 of file plugin.cpp.

◆ insertNewAction()

void Plugin::insertNewAction ( TDEAction *  action)

Insert "New" action.

Definition at line 176 of file plugin.cpp.

◆ insertSyncAction()

void Plugin::insertSyncAction ( TDEAction *  action)

Insert "Sync" action.

Definition at line 181 of file plugin.cpp.

◆ invisibleToolbarActions()

virtual TQStringList Kontact::Plugin::invisibleToolbarActions ( ) const
inlinevirtual

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

Definition at line 233 of file plugin.h.

◆ isRunningStandalone()

virtual bool Kontact::Plugin::isRunningStandalone ( )
inlinevirtual

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

Definition at line 131 of file plugin.h.

◆ newActions()

TQPtrList< TDEAction > * Plugin::newActions ( ) const

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

Definition at line 186 of file plugin.cpp.

◆ part()

KParts::ReadOnlyPart * 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.

Definition at line 145 of file plugin.cpp.

◆ processDropEvent()

virtual void Kontact::Plugin::processDropEvent ( TQDropEvent *  )
inlinevirtual

Process drop event.

Definition at line 243 of file plugin.h.

◆ queryClose()

virtual bool Kontact::Plugin::queryClose ( ) const
inlinevirtual

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.

Definition at line 191 of file plugin.h.

◆ readProperties()

virtual void Kontact::Plugin::readProperties ( TDEConfig *  )
inlinevirtual

Session management: read properties.

Definition at line 252 of file plugin.h.

◆ saveProperties()

virtual void Kontact::Plugin::saveProperties ( TDEConfig *  )
inlinevirtual

Session management: save properties.

Definition at line 257 of file plugin.h.

◆ select()

void 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.

Definition at line 201 of file plugin.cpp.

◆ setExecutableName()

void Plugin::setExecutableName ( const TQString &  bin)

Sets the name of executable (if existant).

Definition at line 109 of file plugin.cpp.

◆ setIcon()

void Plugin::setIcon ( const TQString &  icon)

Sets the icon name.

Definition at line 99 of file plugin.cpp.

◆ setIdentifier()

void Plugin::setIdentifier ( const TQString &  identifier)

Sets the identifier.

Definition at line 79 of file plugin.cpp.

◆ setPartLibraryName()

void Plugin::setPartLibraryName ( const TQCString &  libName)

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

Definition at line 119 of file plugin.cpp.

◆ setShowInSideBar()

void Kontact::Plugin::setShowInSideBar ( bool  hasPart)

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

Definition at line 230 of file plugin.cpp.

◆ setTitle()

void Plugin::setTitle ( const TQString &  title)

Sets the localized title.

Definition at line 89 of file plugin.cpp.

◆ showInSideBar()

bool Kontact::Plugin::showInSideBar ( ) const
virtual

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

Definition at line 225 of file plugin.cpp.

◆ slotConfigUpdated

void Plugin::slotConfigUpdated ( )
slot

internal usage

Definition at line 214 of file plugin.cpp.

◆ syncActions()

TQPtrList< TDEAction > * Plugin::syncActions ( ) const

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

Definition at line 191 of file plugin.cpp.

◆ tipFile()

TQString Plugin::tipFile ( ) const
virtual

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

Definition at line 157 of file plugin.cpp.

◆ title()

TQString Plugin::title ( ) const

Returns the localized title.

Definition at line 94 of file plugin.cpp.

◆ weight()

virtual int Kontact::Plugin::weight ( ) const
inlinevirtual

Return the weight of the plugin.

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

Definition at line 208 of file plugin.h.


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