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
00072 class KRESOURCES_EXPORT Factory
00073 {
00074 public:
00075
00079 static Factory *self( const QString &resourceFamily );
00080
00081 ~Factory();
00082
00090 ConfigWidget *configWidget( const QString &type, QWidget *parent = 0 );
00091
00100 Resource *resource( const QString &type, const KConfigGroup &group );
00101
00108 Resource *resource( const QString &type );
00109
00114 QStringList typeNames() const;
00115
00119 QString typeName( const QString &type ) const;
00120
00124 QString typeDescription( const QString &type ) const;
00125
00126 protected:
00127 Factory( const QString &resourceFamily );
00128
00129 private:
00130 class Private;
00131 Private *const d;
00132 };
00133
00134 }
00135 #endif