[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kresources
From: Tobias Koenig <tokoe () kde ! org>
Date: 2003-08-19 11:52:46
[Download RAW message or body]
CVS commit by tokoe:
Fixed docu
M +18 -14 factory.h 1.9
--- kdelibs/kresources/factory.h #1.8:1.9
@@ -39,18 +39,23 @@ namespace KRES {
/**
* Class for loading resource plugins.
- * Do not use this class directly. Use ResourceManager instead
+ * Use this class if you need resources with special
+ * settings, otherwise use KRES::Manager::createResource()
+ * to get resources with the default settings.
*
* Example:
*
* \code
- * KABC::Factory<Calendar> *factory = KABC::Factory<Calendar>::self();
+ * KABC::Factory *factory = KABC::Factory::self( "contact" );
+ *
+ * // to allow a transparent configuration of resources, we have
+ * // to use a kconfig object.
+ * KConfig config( "tst" );
+ * config.writeEntry( "FileName", "/home/foobar/test.vcf" ); // resource \
dependend + * config.writeEntry( "FileFormat", "vcard" ); // \
resource dependend + *
+ * KABC::Resource *res = factory->resource( "file", &config );
*
- * QStringList list = factory->resources();
- * QStringList::Iterator it;
- * for ( it = list.begin(); it != list.end(); ++it ) {
- * Resource<Calendar> *resource = factory->resource( (*it),
- * KABC::StdAddressBook::self(), 0 );
* // do something with resource
- * }
+ *
* \endcode
*/
@@ -70,6 +75,5 @@ class Factory
* or a null pointer if resource type doesn't exist.
*
- * @param type The type of the resource, returned by resources()
- * @param resource The resource to be editted.
+ * @param type The type of the resource, returned by typeNames()
* @param parent The parent widget
*/
@@ -80,7 +84,7 @@ class Factory
* if resource type doesn't exist.
*
- * @param type The type of the resource, returned by resources()
- * @param ab The address book, the resource should belong to
- * @param config The config object where the resource get it settings from, or 0 \
if a new resource should be created. + * @param type The type of the resource, \
returned by typeNames() + * @param config The config object where the resource \
get it settings from, + * or 0 if a resource with default values \
should be created.
*/
Resource *resource( const QString& type, const KConfig *config );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic