kresources
factory.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00033 #ifndef KRESOURCES_FACTORY_H
00034 #define KRESOURCES_FACTORY_H
00035
00036 #include <QtCore/QMap>
00037 #include <QtCore/QString>
00038
00039 #include <kconfig.h>
00040 #include <kservice.h>
00041
00042 #include "resource.h"
00043 #include "configwidget.h"
00044
00045 namespace KRES {
00046
00073 class KRESOURCES_EXPORT Factory
00074 {
00075 public:
00076
00080 static Factory *self( const QString &resourceFamily );
00081
00082 ~Factory();
00083
00091 ConfigWidget *configWidget( const QString &type, QWidget *parent = 0 );
00092
00098 void reloadConfig();
00099
00108 Resource *resource( const QString &type, const KConfigGroup &group );
00109
00116 Resource *resource( const QString &type );
00117
00122 QStringList typeNames() const;
00123
00127 QString typeName( const QString &type ) const;
00128
00132 QString typeDescription( const QString &type ) const;
00133
00134 protected:
00135 Factory( const QString &resourceFamily );
00136
00137 private:
00138 class Private;
00139 Private *const d;
00140 };
00141
00142 }
00143 #endif