summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/manager.h
Unidiff
Diffstat (limited to 'microkde/kresources/manager.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kresources/manager.h20
1 files changed, 17 insertions, 3 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
@@ -4,6 +4,7 @@
4 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> 4 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
5 Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> 5 Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
6 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 6 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
7 Copyright (c) 2004 Ulf Schenk
7 8
8 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
@@ -21,6 +22,13 @@
21 Boston, MA 02111-1307, USA. 22 Boston, MA 02111-1307, USA.
22*/ 23*/
23 24
25/*
26Enhanced Version of the file for platform independent KDE tools.
27Copyright (c) 2004 Ulf Schenk
28
29$Id$
30*/
31
24#ifndef KRESOURCES_MANAGER_H 32#ifndef KRESOURCES_MANAGER_H
25#define KRESOURCES_MANAGER_H 33#define KRESOURCES_MANAGER_H
26 34
@@ -159,12 +167,17 @@ class Manager : private ManagerImplListener
159 167
160 bool isEmpty() const { return mImpl->resourceList()->isEmpty(); } 168 bool isEmpty() const { return mImpl->resourceList()->isEmpty(); }
161 169
162 Manager( const QString &family ) 170 /**
171 Return true, if the manager manages syncable resources.
172 */
173 bool manageSyncable() { return mImpl->manageSyncable(); }
174
175 Manager( const QString &family, bool syncable )
163 { 176 {
164 mFactory = Factory::self( family ); 177 mFactory = Factory::self( family );
165 // The managerimpl will use the same Factory object as the manager 178 // The managerimpl will use the same Factory object as the manager
166 // because of the Factory::self() pattern 179 // because of the Factory::self() pattern
167 mImpl = new ManagerImpl( family ); 180 mImpl = new ManagerImpl( family, syncable );
168 mImpl->setListener( this ); 181 mImpl->setListener( this );
169 182
170 mListeners = new QPtrList<ManagerListener<T> >; 183 mListeners = new QPtrList<ManagerListener<T> >;
@@ -247,10 +260,11 @@ class Manager : private ManagerImplListener
247 260
248 @param type The type of the resource, one of those returned 261 @param type The type of the resource, one of those returned
249 by @ref resourceTypeNames() 262 by @ref resourceTypeNames()
263 * @param syncable If the resource should support syncing capabilities.
250 */ 264 */
251 T *createResource( const QString& type ) 265 T *createResource( const QString& type )
252 { 266 {
253 return (T *)( mFactory->resource( type, 0 ) ); 267 return (T *)( mFactory->resource( type, 0, mImpl->manageSyncable() ) );
254 } 268 }
255 269
256 /** 270 /**