summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/resource.h
authorulf69 <ulf69>2004-08-02 18:10:42 (UTC)
committer ulf69 <ulf69>2004-08-02 18:10:42 (UTC)
commit09e8e7e5d4c3cafcf2b05511e5c78717fb5380e7 (patch) (side-by-side diff)
tree4060a8dad4d840c92c62c16f9c51e733da51e33c /microkde/kresources/resource.h
parent7520e7cb4f10eb535efd457c539a15a0b7e52137 (diff)
downloadkdepimpi-09e8e7e5d4c3cafcf2b05511e5c78717fb5380e7.zip
kdepimpi-09e8e7e5d4c3cafcf2b05511e5c78717fb5380e7.tar.gz
kdepimpi-09e8e7e5d4c3cafcf2b05511e5c78717fb5380e7.tar.bz2
add changes that resources can be used for syncing as well
Diffstat (limited to 'microkde/kresources/resource.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/resource.h25
1 files changed, 20 insertions, 5 deletions
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
@@ -37,12 +37,13 @@
class KConfig;
namespace KRES {
class ConfigWidget;
+class SyncWidget;
/**
* @internal
* @libdoc The KDE Resource library
*
* NOTE: this library is NOT (YET?) PUBLIC. Do not publish this
@@ -317,12 +318,17 @@ class Resource : public QObject
/**
* Returns the name of resource.
*/
virtual QString resourceName() const;
+
+
+ virtual bool isSyncable() const = 0;
+
+
/**
Sets, if the resource is active.
*/
void setActive( bool active );
/**
@@ -335,12 +341,13 @@ class Resource : public QObject
/**
Print resource information as debug output.
*/
virtual void dump() const;
+
protected:
/**
* Open this resource. When called, the resource must be in
* a closed state.
*
* Returns true if the resource was opened successfully;
@@ -364,37 +371,45 @@ class Resource : public QObject
ResourcePrivate *d;
};
class PluginFactoryBase : public KLibFactory
{
public:
- virtual Resource *resource( const KConfig *config ) = 0;
+ virtual Resource *resource( const KConfig *config, bool syncable ) = 0;
virtual ConfigWidget *configWidget( QWidget *parent ) = 0;
+ virtual SyncWidget *syncWidget( QWidget *parent ) = 0;
+
protected:
virtual QObject* createObject( QObject*, const char*, const char*,
const QStringList & )
{
return 0;
}
};
-template<class TR,class TC>
+template<class TR,class TC, class TS>
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 )
{
return new TC( parent );
}
+
+ virtual SyncWidget *syncWidget( QWidget *parent )
+ {
+ return new TS( parent );
+ }
+
};
}