KABC::ResourceFactory Class Reference
Class for loading resource plugins. More...
#include <resourcefactory.h>
Public Member Functions | |
ResourceConfigWidget * | 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. | |
Resource * | 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. | |
QStringList | resources () |
Returns a list of all available resource types. | |
ResourceInfo * | info (const QString &type) |
Returns the info structure for a special type. | |
Static Public Member Functions | |
ResourceFactory * | self () |
Returns the global resource factory. |
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
|
Returns the global resource factory.
Definition at line 37 of file resourcefactory.cpp. |
|
Returns the config widget for the given resource type, or a null pointer if resource type doesn't exist.
Definition at line 97 of file resourcefactory.cpp. References QString::isEmpty(), and KLibrary::symbol(). |
|
Returns a pointer to a resource object or a null pointer if resource type doesn't exist.
Definition at line 133 of file resourcefactory.cpp. References QString::isEmpty(), resource(), and KLibrary::symbol(). Referenced by resource(). |
|
Returns a list of all available resource types.
Definition at line 82 of file resourcefactory.cpp. References QDictIterator::current(), and QDictIterator::currentKey(). |
|
Returns the info structure for a special type.
Definition at line 125 of file resourcefactory.cpp. References QString::isEmpty(). |
The documentation for this class was generated from the following files: