Diffstat (limited to 'microkde/kresources/manager.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/manager.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h index 7e9e19a..0e6f838 100644 --- a/microkde/kresources/manager.h +++ b/microkde/kresources/manager.h @@ -138,75 +138,70 @@ class Manager : private ManagerImplListener */ bool checkActive() { if ( !mList || mIt == mList->end() ) return false; return !(*mIt)->isActive(); } Resource::List::Iterator mIt; Resource::List *mList; }; ActiveIterator activeBegin() { ActiveIterator it; it.mIt = mImpl->resourceList()->begin(); it.mList = mImpl->resourceList(); if ( it.mIt != mImpl->resourceList()->end() ) { if ( !(*it)->isActive() ) it++; } return it; } ActiveIterator activeEnd() { ActiveIterator it; it.mIt = mImpl->resourceList()->end(); it.mList = mImpl->resourceList(); return it; } bool isEmpty() const { return mImpl->resourceList()->isEmpty(); } - /** - Return true, if the manager manages syncable resources. - */ - bool manageSyncable() { return mImpl->manageSyncable(); } - - Manager( const QString &family, bool syncable ) + Manager( const QString &family ) { mFactory = Factory::self( family ); // The managerimpl will use the same Factory object as the manager // because of the Factory::self() pattern - mImpl = new ManagerImpl( family, syncable ); + mImpl = new ManagerImpl( family ); mImpl->setListener( this ); mListeners = new QPtrList<ManagerListener<T> >; } virtual ~Manager() { mImpl->setListener( 0 ); delete mListeners; delete mImpl; } /** Recreate Resource objects from configuration file. If cfg is 0, read standard configuration file. */ void readConfig( KConfig *cfg = 0 ) { mImpl->readConfig( cfg ); } /** Write configuration of Resource objects to configuration file. If cfg is 0, write to standard configuration file. */ void writeConfig( KConfig *cfg = 0 ) { mImpl->writeConfig( cfg ); } /** Add resource to manager. This passes ownership of the Resource object @@ -231,69 +226,68 @@ class Manager : private ManagerImplListener { if ( resource ) mImpl->setStandardResource( resource ); } void setActive( Resource *resource, bool active ) { if ( resource ) mImpl->setActive( resource, active ); } /** Returns a list of the names of the reources managed by the Manager for this family. */ QStringList resourceNames() const { return mImpl->resourceNames(); } ConfigWidget *configWidget( const QString& type, QWidget *parent = 0 ) { return mFactory->resourceConfigWidget( type, parent ); } /** Creates a new resource of type @param type, with default settings. The resource is not added to the manager, the application has to do that. Returns a pointer to a resource object or a null pointer if resource type doesn't exist. @param type The type of the resource, one of those returned by @ref resourceTypeNames() - * @param syncable If the resource should support syncing capabilities. */ T *createResource( const QString& type ) { - return (T *)( mFactory->resource( type, 0, mImpl->manageSyncable() ) ); + return (T *)( mFactory->resource( type, 0 ) ); } /** Returns a list of the names of all available resource types. */ QStringList resourceTypeNames() const { return mFactory->typeNames(); } QStringList resourceTypeDescriptions() const { QStringList typeDescs; QStringList types = mFactory->typeNames(); for ( QStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) { QString desc = mFactory->typeName( *it ); if ( !mFactory->typeDescription( *it ).isEmpty() ) desc += " (" + mFactory->typeDescription( *it ) + ")"; typeDescs.append( desc ); } return typeDescs; } void resourceChanged( T *resource ) { mImpl->resourceChanged( resource ); } void addListener( ManagerListener<T> *listener ) |