kresources
22 #ifndef KRESOURCES_RESOURCE_H
23 #define KRESOURCES_RESOURCE_H
25 #include "kresources_export.h"
27 #include <kpluginfactory.h>
29 #include <QtCore/QMutex>
93 explicit Resource(
const KConfigGroup &group );
106 virtual void writeConfig( KConfigGroup &group );
135 void setIdentifier(
const QString &identifier );
148 void setType(
const QString &type );
159 virtual void setReadOnly(
bool value );
164 virtual bool readOnly()
const;
170 virtual void setResourceName(
const QString &name );
175 virtual QString resourceName()
const;
180 void setActive(
bool active );
185 bool isActive()
const;
190 virtual void dump()
const;
202 virtual bool doOpen();
208 virtual void doClose();
211 class ResourcePrivate;
212 ResourcePrivate *
const d;
215 class KRESOURCES_DEPRECATED_EXPORT PluginFactoryBase :
public KPluginFactory
218 explicit PluginFactoryBase(
const char *componentName=0,
219 const char *catalogName=0,
QObject *parent=0 )
220 : KPluginFactory( componentName, catalogName, parent ) {}
221 explicit PluginFactoryBase(
const KAboutData &aboutData,
QObject *parent = 0 )
222 : KPluginFactory( aboutData, parent ) {}
224 virtual Resource *resource(
const KConfigGroup &group ) = 0;
225 virtual Resource *resource() = 0;
227 virtual ConfigWidget *configWidget(
QWidget *parent ) = 0;
230 virtual QObject *createObject(
QObject *parent,
const char *className,
234 template<
class TR,
class TC>
235 class PluginFactory :
public PluginFactoryBase
238 explicit PluginFactory(
const char *componentName=0,
239 const char *catalogName=0,
QObject *parent=0 )
240 : PluginFactoryBase( componentName, catalogName, parent ) {}
241 explicit PluginFactory(
const KAboutData &aboutData,
QObject *parent = 0 )
242 : PluginFactoryBase( aboutData, parent ) {}
244 virtual Resource *resource(
const KConfigGroup &group )
246 return new TR( group );
248 virtual Resource *resource()
253 ConfigWidget *configWidget(
QWidget *parent )
255 return new TC( parent );
This class provides a resource which is managed in a general way.
A class for loading resource plugins.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:52 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.