Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KABC::ResourceFactory Class Reference

#include <resourcefactory.h>

List of all members.

Public Methods

ResourceConfigWidgetconfigWidget (const QString &type, QWidget *parent=0)
Resource * resource (const QString &type, AddressBook *ab, const KConfig *config)
QStringList resources ()
ResourceInfo * info (const QString &type)

Static Public Methods

ResourceFactory * self ()


Detailed Description

Class for loading resource plugins.

Example:

 KABC::ResourceFactory *factory = KABC::ResourceFactory::self();

 QStringList list = factory->resources();
 QStringList::Iterator it;
 for ( it = list.begin(); it != list.end(); ++it ) {
   Resource *resource = factory->resource( (*it),
        KABC::StdAddressBook::self(), 0 );
   // do something with resource
 }
 

Definition at line 58 of file resourcefactory.h.


Member Function Documentation

ResourceConfigWidget* KABC::ResourceFactory::configWidget const QString &    type,
QWidget *    parent = 0
 

Returns the config widget for the given resource type, or a null pointer if resource type doesn't exist.

Parameters:
type  The type of the resource, returned by resources()
parent  The parent widget

ResourceInfo* KABC::ResourceFactory::info const QString &    type
 

Returns the info structure for a special type.

Resource* KABC::ResourceFactory::resource const QString &    type,
AddressBook   ab,
const KConfig   config
 

Returns a pointer to a resource object or a null pointer if resource type doesn't exist.

Parameters:
type  The type of the resource, returned by resources()
ab  The address book, the resource should belong to
config  The config object where the resource get it settings from

QStringList KABC::ResourceFactory::resources  
 

Returns a list of all available resource types.

ResourceFactory* KABC::ResourceFactory::self   [static]
 

Returns the global resource factory.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:31 2003 for kdelibs by doxygen1.2.18