22 #ifndef TDERESOURCES_RESOURCE_H
23 #define TDERESOURCES_RESOURCE_H
26 #include <tqvaluelist.h>
29 #include <klibloader.h>
255 class TDERESOURCES_EXPORT
Resource :
public TQObject
258 friend class ManagerImpl;
262 typedef TQValueList<Resource *> List;
269 Resource(
const TDEConfig *config );
282 virtual void writeConfig( TDEConfig *config );
314 TQString identifier()
const;
319 TQString type()
const;
325 virtual void setReadOnly(
bool value );
330 virtual bool readOnly()
const;
336 virtual void setResourceName(
const TQString &name );
341 virtual TQString resourceName()
const;
346 void setActive(
bool active );
351 bool isActive()
const;
356 virtual void dump()
const;
376 void setIdentifier(
const TQString &identifier );
377 void setType(
const TQString &type );
380 class ResourcePrivate;
384 class TDERESOURCES_EXPORT PluginFactoryBase :
public KLibFactory
387 virtual Resource *resource(
const TDEConfig *config ) = 0;
389 virtual ConfigWidget *configWidget( TQWidget *parent ) = 0;
392 virtual TQObject* createObject( TQObject *parent,
const char *name,
const char *className,
393 const TQStringList & args)
403 template<
class TR,
class TC>
404 class PluginFactory :
public PluginFactoryBase
407 Resource *resource(
const TDEConfig *config )
409 return new TR( config );
412 ConfigWidget *configWidget( TQWidget *parent )
414 return new TC( parent );
Class for loading resource plugins.
This class provides a resource which is managed in a general way.
virtual void doClose()
Close this resource.
virtual bool doOpen()
Open this resource.