Diffstat (limited to 'microkde/kresources/manager.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/manager.h | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h index b5e97fc..7e9e19a 100644 --- a/microkde/kresources/manager.h +++ b/microkde/kresources/manager.h @@ -6,2 +6,3 @@ Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> + Copyright (c) 2004 Ulf Schenk @@ -23,2 +24,9 @@ +/* +Enhanced Version of the file for platform independent KDE tools. +Copyright (c) 2004 Ulf Schenk + +$Id$ +*/ + #ifndef KRESOURCES_MANAGER_H @@ -50,3 +58,3 @@ class ManagerListener // -// The manager should also keep track of which (or at least +// The manager should also keep track of which (or at least // how many) applications hve opened a resource, so that it @@ -73,3 +81,3 @@ class Manager : private ManagerImplListener - private: + private: Resource::List::Iterator mIt; @@ -83,3 +91,3 @@ class Manager : private ManagerImplListener } - + Iterator end() @@ -161,3 +169,8 @@ class Manager : private ManagerImplListener - Manager( const QString &family ) + /** + Return true, if the manager manages syncable resources. + */ + bool manageSyncable() { return mImpl->manageSyncable(); } + + Manager( const QString &family, bool syncable ) { @@ -166,5 +179,5 @@ class Manager : private ManagerImplListener // because of the Factory::self() pattern - mImpl = new ManagerImpl( family ); + mImpl = new ManagerImpl( family, syncable ); mImpl->setListener( this ); - + mListeners = new QPtrList<ManagerListener<T> >; @@ -173,3 +186,3 @@ class Manager : private ManagerImplListener virtual ~Manager() - { + { mImpl->setListener( 0 ); @@ -241,4 +254,4 @@ class Manager : private ManagerImplListener /** - Creates a new resource of type @param type, with default - settings. The resource is + 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. @@ -246,5 +259,6 @@ class Manager : private ManagerImplListener if resource type doesn't exist. - - @param type The type of the resource, one of those returned + + @param type The type of the resource, one of those returned by @ref resourceTypeNames() + * @param syncable If the resource should support syncing capabilities. */ @@ -252,3 +266,3 @@ class Manager : private ManagerImplListener { - return (T *)( mFactory->resource( type, 0 ) ); + return (T *)( mFactory->resource( type, 0, mImpl->manageSyncable() ) ); } @@ -280,4 +294,4 @@ class Manager : private ManagerImplListener void resourceChanged( T *resource ) - { - mImpl->resourceChanged( resource ); + { + mImpl->resourceChanged( resource ); } @@ -311,3 +325,3 @@ class Manager : private ManagerImplListener } - + virtual void resourceDeleted( Resource *res ) |