resourcefactory.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KPIM_RESOURCEFACTORY_H
00023 #define KPIM_RESOURCEFACTORY_H
00024
00025 #include <qdict.h>
00026 #include <qstring.h>
00027
00028 #include <kconfig.h>
00029 #include <klibloader.h>
00030
00031 #include "resource.h"
00032 #include "resourceconfigwidget.h"
00033
00034 namespace KPIM {
00035
00036 struct ResourceInfo {
00037 QString library;
00038 QString nameLabel;
00039 QString descriptionLabel;
00040 };
00041
00059 class ResourceFactory
00060 {
00061 public:
00062
00066 static ResourceFactory *self( QString resourceType );
00067
00075 ResourceConfigWidget *configWidget( const QString& type, QWidget *parent = 0 );
00076
00085 Resource *resource( const QString& type, const KConfig *config );
00086
00090 QStringList resources();
00091
00095 ResourceInfo *info( const QString &type );
00096
00097 protected:
00098 ResourceFactory( QString resourceType );
00099 ~ResourceFactory();
00100
00101 QString mResourceType;
00102
00103 private:
00104 KLibrary *openLibrary( const QString& libName );
00105
00106 static ResourceFactory *mSelf;
00107
00108 QDict<ResourceInfo> mResourceList;
00109 };
00110
00111 }
00112 #endif
This file is part of the documentation for kdelibs Version 3.1.5.