23#ifndef TDERESOURCES_MANAGERIMPL_H
24#define TDERESOURCES_MANAGERIMPL_H
30#include "manageriface.h"
31#include <tderesources/resource.h>
46class TDERESOURCES_EXPORT ManagerImpl :
virtual public ManagerIface
49 ManagerImpl( ManagerNotifier *,
const TQString &family );
55 void add( Resource *resource );
56 void remove( Resource *resource );
57 void change( Resource *resource );
62 void setActive( Resource *resource,
bool active );
64 Resource::List *resourceList();
66 TQPtrList<Resource> resources();
69 TQPtrList<Resource> resources(
bool active );
73 static TQString defaultConfigFile(
const TQString &family );
77 void dcopKResourceAdded( TQString managerId, TQString resourceId );
78 void dcopKResourceModified( TQString managerId, TQString resourceId );
79 void dcopKResourceDeleted( TQString managerId, TQString resourceId );
82 void createStandardConfig();
84 Resource *readResourceConfig(
const TQString& identifier,
bool checkActive );
85 void writeResourceConfig( Resource *resource,
bool checkActive );
87 void removeResource( Resource *resource );
88 Resource *getResource( Resource *resource );
89 Resource *getResource(
const TQString& identifier );
91 ManagerNotifier *mNotifier;
94 TDEConfig *mStdConfig;
97 Resource::List mResources;
101 class ManagerImplPrivate;
102 ManagerImplPrivate *d;
void writeConfig(TDEConfig *cfg=0)
Write configuration of Resource objects to configuration file.
void setActive(Resource *resource, bool active)
Set active state of resource.
TQStringList resourceNames() const
Returns a list of the names of the resources managed by the Manager for this family.
void readConfig(TDEConfig *cfg=0)
Recreate Resource objects from configuration file.
T * standardResource()
Return standard resource.
void setStandardResource(T *resource)
Set standard resource.
void change(T *resource)
Call this to notify manager about changes of the configuration of the given resource.
void add(Resource *resource)
Add resource to manager.
void remove(Resource *resource)
Remove resource from manager.