.TH "KABC::ResourceFactory" 3 "28 Jan 2004" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::ResourceFactory \- Class for loading resource plugins.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <resourcefactory.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBResourceConfigWidget\fP * \fBconfigWidget\fP (const  \fBQString\fP &type, \fBQWidget\fP *parent=0)"
.br
.RI "\fIReturns the config widget for the given resource type, or a null pointer if resource type doesn't exist. \fP"
.ti -1c
.RI "Resource * \fBresource\fP (const  \fBQString\fP &type, \fBAddressBook\fP *ab, const  \fBKConfig\fP *config)"
.br
.RI "\fIReturns a pointer to a resource object or a null pointer if resource type doesn't exist. \fP"
.ti -1c
.RI "\fBQStringList\fP \fBresources\fP ()"
.br
.RI "\fIReturns a list of all available resource types. \fP"
.ti -1c
.RI "ResourceInfo * \fBinfo\fP (const  \fBQString\fP &type)"
.br
.RI "\fIReturns the info structure for a special type. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBResourceFactory\fP * \fBself\fP ()"
.br
.RI "\fIReturns the global resource factory. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Class for loading resource plugins. 

Example:
.PP
.PP
.nf

 KABC::ResourceFactory *factory = \fBKABC::ResourceFactory::self()\fP;
.PP
.PP
.PP
.nf
 \fBQStringList\fP list = factory->\fBresources()\fP;
 QStringList::Iterator it;
 for ( it = list.begin(); it != list.end(); ++it ) {
   Resource *resource = factory->resource( (*it),
        \fBKABC::StdAddressBook::self()\fP, 0 );
   // do something with resource
 }
 
.PP
 
.PP
Definition at line 58 of file resourcefactory.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBResourceFactory\fP * ResourceFactory::self ()\fC [static]\fP"
.PP
Returns the global resource factory. Definition at line 37 of file resourcefactory.cpp.
.SS "\fBResourceConfigWidget\fP * ResourceFactory::configWidget (const \fBQString\fP & type, \fBQWidget\fP * parent = 0)"
.PP
Returns the config widget for the given resource type, or a null pointer if resource type doesn't exist. \fBParameters:\fP
.RS 4
\fItype\fP The type of the resource, returned by \fBresources\fP() 
.br
\fIparent\fP The parent widget 
.RE
.PP
Definition at line 97 of file resourcefactory.cpp.
.PP
References QString::isEmpty(), and KLibrary::symbol().
.SS "Resource * ResourceFactory::resource (const \fBQString\fP & type, \fBAddressBook\fP * ab, const \fBKConfig\fP * config)"
.PP
Returns a pointer to a resource object or a null pointer if resource type doesn't exist. \fBParameters:\fP
.RS 4
\fItype\fP The type of the resource, returned by \fBresources\fP() 
.br
\fIab\fP The address book, the resource should belong to 
.br
\fIconfig\fP The config object where the resource get it settings from 
.RE
.PP
Definition at line 133 of file resourcefactory.cpp.
.PP
References QString::isEmpty(), resource(), and KLibrary::symbol().
.PP
Referenced by resource().
.SS "\fBQStringList\fP ResourceFactory::resources ()"
.PP
Returns a list of all available resource types. Definition at line 82 of file resourcefactory.cpp.
.PP
References QDictIterator::current(), and QDictIterator::currentKey().
.SS "ResourceInfo * ResourceFactory::info (const \fBQString\fP & type)"
.PP
Returns the info structure for a special type. Definition at line 125 of file resourcefactory.cpp.
.PP
References QString::isEmpty().

.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
