\section{KABC::Resource\-Factory Class Reference}
\label{classKABC_1_1ResourceFactory}\index{KABC::ResourceFactory@{KABC::ResourceFactory}}
Class for loading resource plugins.  


{\tt \#include $<$resourcefactory.h$>$}

Collaboration diagram for KABC::Resource\-Factory:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{classKABC_1_1ResourceFactory__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Resource\-Config\-Widget} $\ast$ {\bf config\-Widget} (const  {\bf QString} \&type, {\bf QWidget} $\ast$parent=0)
\begin{CompactList}\small\item\em Returns the config widget for the given resource type, or a null pointer if resource type doesn't exist. \item\end{CompactList}\item 
Resource $\ast$ {\bf resource} (const  {\bf QString} \&type, {\bf Address\-Book} $\ast$ab, const  {\bf KConfig} $\ast$config)
\begin{CompactList}\small\item\em Returns a pointer to a resource object or a null pointer if resource type doesn't exist. \item\end{CompactList}\item 
{\bf QString\-List} {\bf resources} ()
\begin{CompactList}\small\item\em Returns a list of all available resource types. \item\end{CompactList}\item 
Resource\-Info $\ast$ {\bf info} (const  {\bf QString} \&type)
\begin{CompactList}\small\item\em Returns the info structure for a special type. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Resource\-Factory} $\ast$ {\bf self} ()
\begin{CompactList}\small\item\em Returns the global resource factory. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Class for loading resource plugins. 

Example:

\small\begin{alltt}
 KABC::ResourceFactory *factory = {\bf KABC::ResourceFactory::self()}{\rm (p.\,\pageref{classKABC_1_1ResourceFactory_e0})};\end{alltt}\normalsize 


\small\begin{alltt} {\bf QStringList} list = factory-$>${\bf resources()}{\rm (p.\,\pageref{classKABC_1_1ResourceFactory_a2})};
 QStringList::Iterator it;
 for ( it = list.begin(); it != list.end(); ++it ) \{
   Resource *resource = factory-$>$resource( (*it),
        {\bf KABC::StdAddressBook::self()}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e0})}, 0 );
   // do something with resource
 \}
 \end{alltt}\normalsize 
 



Definition at line 58 of file resourcefactory.h.

\subsection{Member Function Documentation}
\index{KABC::ResourceFactory@{KABC::Resource\-Factory}!self@{self}}
\index{self@{self}!KABC::ResourceFactory@{KABC::Resource\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Resource\-Factory} $\ast$ Resource\-Factory::self ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1ResourceFactory_e0}


Returns the global resource factory. 



Definition at line 37 of file resourcefactory.cpp.\index{KABC::ResourceFactory@{KABC::Resource\-Factory}!configWidget@{configWidget}}
\index{configWidget@{configWidget}!KABC::ResourceFactory@{KABC::Resource\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Resource\-Config\-Widget} $\ast$ Resource\-Factory::config\-Widget (const {\bf QString} \& {\em type}, {\bf QWidget} $\ast$ {\em parent} = 0)}\label{classKABC_1_1ResourceFactory_a0}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]The type of the resource, returned by {\bf resources}{\rm (p.\,\pageref{classKABC_1_1ResourceFactory_a2})}() \item[{\em parent}]The parent widget \end{description}
\end{Desc}


Definition at line 97 of file resourcefactory.cpp.

References QString::is\-Empty(), and KLibrary::symbol().\index{KABC::ResourceFactory@{KABC::Resource\-Factory}!resource@{resource}}
\index{resource@{resource}!KABC::ResourceFactory@{KABC::Resource\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Resource $\ast$ Resource\-Factory::resource (const {\bf QString} \& {\em type}, {\bf Address\-Book} $\ast$ {\em ab}, const {\bf KConfig} $\ast$ {\em config})}\label{classKABC_1_1ResourceFactory_a1}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]The type of the resource, returned by {\bf resources}{\rm (p.\,\pageref{classKABC_1_1ResourceFactory_a2})}() \item[{\em ab}]The address book, the resource should belong to \item[{\em config}]The config object where the resource get it settings from \end{description}
\end{Desc}


Definition at line 133 of file resourcefactory.cpp.

References QString::is\-Empty(), resource(), and KLibrary::symbol().

Referenced by resource().\index{KABC::ResourceFactory@{KABC::Resource\-Factory}!resources@{resources}}
\index{resources@{resources}!KABC::ResourceFactory@{KABC::Resource\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} Resource\-Factory::resources ()}\label{classKABC_1_1ResourceFactory_a2}


Returns a list of all available resource types. 



Definition at line 82 of file resourcefactory.cpp.

References QDict\-Iterator::current(), and QDict\-Iterator::current\-Key().\index{KABC::ResourceFactory@{KABC::Resource\-Factory}!info@{info}}
\index{info@{info}!KABC::ResourceFactory@{KABC::Resource\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Resource\-Info $\ast$ Resource\-Factory::info (const {\bf QString} \& {\em type})}\label{classKABC_1_1ResourceFactory_a3}


Returns the info structure for a special type. 



Definition at line 125 of file resourcefactory.cpp.

References QString::is\-Empty().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
resourcefactory.h\item 
resourcefactory.cpp\end{CompactItemize}
