summaryrefslogtreecommitdiffabout
path: root/microkde/kresources
Unidiff
Diffstat (limited to 'microkde/kresources') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/managerimpl.h19
-rw-r--r--microkde/kresources/resource.cpp5
-rw-r--r--microkde/kresources/resource.h25
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 @@
23 23
24/*
25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk
27
28$Id$
29*/
30
24#ifndef KRESOURCES_MANAGERIMPL_H 31#ifndef KRESOURCES_MANAGERIMPL_H
@@ -60,3 +67,3 @@ class ManagerImpl : public QObject
60 public: 67 public:
61 ManagerImpl( const QString &family ); 68 ManagerImpl( const QString &family, bool syncable);
62 ~ManagerImpl(); 69 ~ManagerImpl();
@@ -85,2 +92,7 @@ class ManagerImpl : public QObject
85 92
93 /**
94 Return true, if the manager manages syncable resources.
95 */
96 bool manageSyncable() const;
97
86 public slots: 98 public slots:
@@ -93,6 +105,6 @@ class ManagerImpl : public QObject
93 void createStandardConfig(); 105 void createStandardConfig();
94 106
95 Resource *readResourceConfig( const QString& identifier, bool checkActive ); 107 Resource *readResourceConfig( const QString& identifier, bool checkActive );
96 void writeResourceConfig( Resource *resource, bool checkActive ); 108 void writeResourceConfig( Resource *resource, bool checkActive );
97 109
98 void removeResource( Resource *resource ); 110 void removeResource( Resource *resource );
@@ -102,2 +114,3 @@ class ManagerImpl : public QObject
102 QString mFamily; 114 QString mFamily;
115 bool mSyncable;
103 KConfig *mConfig; 116 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 )
53 //US compiler claimed that const discards qualifier 53 //US compiler claimed that const discards qualifier
54 KConfig* cfg = (KConfig*)config; 54 KConfig* cfg = (KConfig*)config;
55 if ( cfg ) { 55 if ( cfg ) {
@@ -84,3 +84,3 @@ void Resource::writeConfig( KConfig* config )
84{ 84{
85 85
86 86
@@ -193 +193,2 @@ void Resource::dump() const
193} 193}
194
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 {
42class ConfigWidget; 42class ConfigWidget;
43class SyncWidget;
43 44
@@ -322,2 +323,7 @@ class Resource : public QObject
322 323
324
325
326 virtual bool isSyncable() const = 0;
327
328
323 /** 329 /**
@@ -340,2 +346,3 @@ class Resource : public QObject
340 346
347
341 protected: 348 protected:
@@ -369,3 +376,3 @@ class PluginFactoryBase : public KLibFactory
369 public: 376 public:
370 virtual Resource *resource( const KConfig *config ) = 0; 377 virtual Resource *resource( const KConfig *config, bool syncable ) = 0;
371 378
@@ -373,2 +380,4 @@ class PluginFactoryBase : public KLibFactory
373 380
381 virtual SyncWidget *syncWidget( QWidget *parent ) = 0;
382
374 protected: 383 protected:
@@ -381,3 +390,3 @@ class PluginFactoryBase : public KLibFactory
381 390
382template<class TR,class TC> 391template<class TR,class TC, class TS>
383class PluginFactory : public PluginFactoryBase 392class PluginFactory : public PluginFactoryBase
@@ -385,7 +394,7 @@ class PluginFactory : public PluginFactoryBase
385 public: 394 public:
386 Resource *resource( const KConfig *config ) 395 Resource *resource( const KConfig *config, bool syncable )
387 { 396 {
388 return new TR( config ); 397 return new TR( config, syncable );
389 } 398 }
390 399
391 ConfigWidget *configWidget( QWidget *parent ) 400 ConfigWidget *configWidget( QWidget *parent )
@@ -394,2 +403,8 @@ class PluginFactory : public PluginFactoryBase
394 } 403 }
404
405 virtual SyncWidget *syncWidget( QWidget *parent )
406 {
407 return new TS( parent );
408 }
409
395}; 410};