summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/factory.h
Side-by-side diff
Diffstat (limited to 'microkde/kresources/factory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/factory.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/microkde/kresources/factory.h b/microkde/kresources/factory.h
index f391bb3..ad67ab3 100644
--- a/microkde/kresources/factory.h
+++ b/microkde/kresources/factory.h
@@ -25,46 +25,56 @@
#define KRESOURCES_FACTORY_H
#include <qdict.h>
#include <qstring.h>
#include <kconfig.h>
#include "resource.h"
namespace KRES {
+//US
+struct PluginInfo
+{
+ QString library;
+ QString nameLabel;
+ QString descriptionLabel;
+};
+
+
/**
* Class for loading resource plugins.
* Do not use this class directly. Use ResourceManager instead
*
* Example:
*
* <pre>
* KABC::Factory<Calendar> *factory = KABC::Factory<Calendar>::self();
*
* 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
* }
* </pre>
*/
class Factory
{
public:
+
/**
* Returns the global resource factory.
*/
static Factory *self( const QString& resourceFamily );
~Factory();
/**
* Returns the config widget for the given resource type,
* or a null pointer if resource type doesn't exist.
*
* @param type The type of the resource, returned by @ref resources()
@@ -97,17 +107,18 @@ class Factory
* Returns the description for a special type.
*/
QString typeDescription( const QString &type ) const;
protected:
Factory( const QString& resourceFamily );
private:
static QDict<Factory> *mSelves;
QString mResourceFamily;
//US QMap<QString, KService::Ptr> mTypeMap;
- QMap<QString, PluginFactoryBase*> mTypeMap;
+//US lets store the pluginfo struct as value instead of a KService
+ QMap<QString, PluginInfo*> mTypeMap;
};
}
#endif