KockpitIface Class Reference

Plugin Interface. More...

#include <kockpitifaces.h>

Inheritance diagram for KockpitIface:
Inheritance graph
[legend]

Public Member Functions

virtual ~KockpitIface ()
 Destructor.
virtual QWidget * getUserWidget ()=0
 Get Widget.
virtual QWidget * getGroupWidget ()=0
 Get Widget.
virtual QString getName ()=0
 Get name.
virtual void showAttributes (KockpitUser *kuser)=0
 Show attributes.
virtual void assignAttributes (KockpitUser *kuser)=0
 Assign attributes.
virtual void showAttributes (KockpitGroup *kgrp)=0
 Show attributes.
virtual void assignAttributes (KockpitGroup *kgrp)=0
 Assign attributes.
virtual void deleteEntry (KockpitUser *kuser)=0
 Delete attributes.
virtual void deleteEntry (KockpitGroup *kgrp)=0
 Delete attributes.
virtual void init (const QList< KockpitUnitMap * > *kumap, const QList< KockpitUnitMap * > *kgmap, KockpitValidator *val)=0
 Initialize.
virtual void update (const QList< KockpitUnitMap * > *kumap, const QList< KockpitUnitMap * > *kgmap)=0
 Refresh.
virtual void writeAdditional (QList< KockpitGroup * > &kgrpl, wraddmod mod)=0
 Write additional.
virtual void writeAdditional (QList< KockpitUser * > &kusrl, wraddmod mod)=0
 Write additional.

Detailed Description

Plugin Interface.

This interface has to be implemented by a kockpit plugin.


Constructor & Destructor Documentation

virtual KockpitIface::~KockpitIface (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void KockpitIface::assignAttributes ( KockpitGroup kgrp  )  [pure virtual]

Assign attributes.

This function is called by the main application. It should be used to assign values which are entered by the user in the formular to the current KockpitGroup object.

Parameters:
kgrp The actual group chosen by the user

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::assignAttributes ( KockpitUser kuser  )  [pure virtual]

Assign attributes.

This function is called by the main application. It should be used to assign values which are entered by the user in the formular to the current KockpitUser object.

Parameters:
kuser The actual user chosen by the user

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::deleteEntry ( KockpitGroup kgrp  )  [pure virtual]

Delete attributes.

This function is called by the main application. It should be used to delete entries. This approach only make sense if the plugin has an own datasource (f.e. a relational database).

Parameters:
kgrp The actual group chosen by the user

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::deleteEntry ( KockpitUser kuser  )  [pure virtual]

Delete attributes.

This function is called by the main application. It should be used to delete entries. This approach only make sense if the plugin has an own datasource (f.e. a relational database).

Parameters:
kuser The actual user chosen by the user

Implemented in Samba, Posix, Contact, and Postgres.

virtual QWidget* KockpitIface::getGroupWidget (  )  [pure virtual]

Get Widget.

This function must return a pointer to a widget which will be displayed as a tab subordinated to the group main tab.

Returns:
QWidget* A poinger to the group tab.

Implemented in Samba, Posix, Contact, and Postgres.

virtual QString KockpitIface::getName (  )  [pure virtual]

Get name.

This function must return the name of the plugin and will be used as tab label.

Implemented in Samba, Posix, Contact, and Postgres.

virtual QWidget* KockpitIface::getUserWidget (  )  [pure virtual]

Get Widget.

This function must return a pointer to a widget which will be displayed as a Tab subordinated to the user main tab.

Returns:
QWidget* A pointer to the user tab.

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::init ( const QList< KockpitUnitMap * > *  kumap,
const QList< KockpitUnitMap * > *  kgmap,
KockpitValidator val 
) [pure virtual]

Initialize.

This function is the first function which is called to initialize the plugin. If a plugin need to manage a user or group list by itself it can access these lists via the giben pointers. A pointer to the validator is already handed to the plugin to make it possible to validate the values changed from the plugin.

Parameters:
kumap Pointer to user (in KockpitUnitMap encapsulated KockpitUser) list from the main application.
kgmap Pointer to group (in KockpitUnitMap encapsulated KockpitGroup) list from the main application.
val Pointer to validator from the main application.

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::showAttributes ( KockpitGroup kgrp  )  [pure virtual]

Show attributes.

This function is called by the main application. It should be used to diplay attributes in the formular.

Parameters:
kgrp The actual group chosen by the user

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::showAttributes ( KockpitUser kuser  )  [pure virtual]

Show attributes.

This function is called by the main application. It should be used to diplay attributes in the formular.

Parameters:
kuser The actual user chosen by the user

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::update ( const QList< KockpitUnitMap * > *  kumap,
const QList< KockpitUnitMap * > *  kgmap 
) [pure virtual]

Refresh.

This function is called from the main application in order to refresh the user or group list. If the plugin need to react to this action, this function has to be implemented.

Parameters:
kumap Pointer to user (in KockpitUnitMap encapsulated KockpitUser) list from the main application.
kgmap Pointer to group (in KockpitUnitMap encapsulated KockpitGroup) list from the main application.

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::writeAdditional ( QList< KockpitUser * > &  kusrl,
wraddmod  mod 
) [pure virtual]

Write additional.

This function has a very special task. Sometimes it is necessarry to change user attributes after group attributes has been changed. For this use case this function has to bee implemented. This Function is called after writing an entry into the LDAP Backend and before deleting an entry.

Parameters:
kusrl Refernce to group list from the main application.
mod This Variable is needed to determine the intension of the additional writing.

Implemented in Samba, Posix, Contact, and Postgres.

virtual void KockpitIface::writeAdditional ( QList< KockpitGroup * > &  kgrpl,
wraddmod  mod 
) [pure virtual]

Write additional.

This function has a very special task. Sometimes it is necessarry to change group attributes after user attributes has been changed. For this use case this function has to bee implemented. This Function is called after writing an entry into the LDAP Backend and before deleting an entry.

Parameters:
kgrpl Refernce to group list from the main application.
mod This Variable is needed to determine the intension of the additional writing.

Implemented in Samba, Posix, Contact, and Postgres.


The documentation for this class was generated from the following file:
Generated on Wed Mar 24 09:58:14 2010 for kockpit by  doxygen 1.6.3