summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/manager.h
Side-by-side diff
Diffstat (limited to 'microkde/kresources/manager.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kresources/manager.h12
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
@@ -146,59 +146,54 @@ class Manager : private ManagerImplListener
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.
@@ -239,53 +234,52 @@ class Manager : private ManagerImplListener
/**
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;