-rw-r--r-- | microkde/kresources/managerimpl.h | 19 | ||||
-rw-r--r-- | microkde/kresources/resource.cpp | 5 | ||||
-rw-r--r-- | microkde/kresources/resource.h | 25 |
3 files changed, 39 insertions, 10 deletions
diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h index a049bcc..0425279 100644 --- a/microkde/kresources/managerimpl.h +++ b/microkde/kresources/managerimpl.h @@ -23,2 +23,9 @@ +/* +Enhanced Version of the file for platform independent KDE tools. +Copyright (c) 2004 Ulf Schenk + +$Id$ +*/ + #ifndef KRESOURCES_MANAGERIMPL_H @@ -60,3 +67,3 @@ class ManagerImpl : public QObject public: - ManagerImpl( const QString &family ); + ManagerImpl( const QString &family, bool syncable); ~ManagerImpl(); @@ -85,2 +92,7 @@ class ManagerImpl : public QObject + /** + Return true, if the manager manages syncable resources. + */ + bool manageSyncable() const; + public slots: @@ -93,6 +105,6 @@ class ManagerImpl : public QObject void createStandardConfig(); - + Resource *readResourceConfig( const QString& identifier, bool checkActive ); void writeResourceConfig( Resource *resource, bool checkActive ); - + void removeResource( Resource *resource ); @@ -102,2 +114,3 @@ class ManagerImpl : public QObject QString mFamily; + bool mSyncable; KConfig *mConfig; diff --git a/microkde/kresources/resource.cpp b/microkde/kresources/resource.cpp index 991d53d..4f69540 100644 --- a/microkde/kresources/resource.cpp +++ b/microkde/kresources/resource.cpp @@ -53,3 +53,3 @@ Resource::Resource( const KConfig* config ) //US compiler claimed that const discards qualifier - KConfig* cfg = (KConfig*)config; + KConfig* cfg = (KConfig*)config; if ( cfg ) { @@ -84,3 +84,3 @@ void Resource::writeConfig( KConfig* config ) { - + @@ -193 +193,2 @@ void Resource::dump() const } + diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h index 64e7424..c9202c9 100644 --- a/microkde/kresources/resource.h +++ b/microkde/kresources/resource.h @@ -42,2 +42,3 @@ namespace KRES { class ConfigWidget; +class SyncWidget; @@ -322,2 +323,7 @@ class Resource : public QObject + + + virtual bool isSyncable() const = 0; + + /** @@ -340,2 +346,3 @@ class Resource : public QObject + protected: @@ -369,3 +376,3 @@ class PluginFactoryBase : public KLibFactory public: - virtual Resource *resource( const KConfig *config ) = 0; + virtual Resource *resource( const KConfig *config, bool syncable ) = 0; @@ -373,2 +380,4 @@ class PluginFactoryBase : public KLibFactory + virtual SyncWidget *syncWidget( QWidget *parent ) = 0; + protected: @@ -381,3 +390,3 @@ class PluginFactoryBase : public KLibFactory -template<class TR,class TC> +template<class TR,class TC, class TS> class PluginFactory : public PluginFactoryBase @@ -385,7 +394,7 @@ class PluginFactory : public PluginFactoryBase public: - Resource *resource( const KConfig *config ) + Resource *resource( const KConfig *config, bool syncable ) { - return new TR( config ); + return new TR( config, syncable ); } - + ConfigWidget *configWidget( QWidget *parent ) @@ -394,2 +403,8 @@ class PluginFactory : public PluginFactoryBase } + + virtual SyncWidget *syncWidget( QWidget *parent ) + { + return new TS( parent ); + } + }; |