summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/factory.h
authorulf69 <ulf69>2004-08-02 18:15:04 (UTC)
committer ulf69 <ulf69>2004-08-02 18:15:04 (UTC)
commite084a79b8aa0174e7587893f9b87d88670ed9f2c (patch) (unidiff)
treed3250447b9352effc8fb953866c772418c5e166c /microkde/kresources/factory.h
parentb4203356adb6008a4b4e6782afdae7dd34178697 (diff)
downloadkdepimpi-e084a79b8aa0174e7587893f9b87d88670ed9f2c.zip
kdepimpi-e084a79b8aa0174e7587893f9b87d88670ed9f2c.tar.gz
kdepimpi-e084a79b8aa0174e7587893f9b87d88670ed9f2c.tar.bz2
added support for the syncing of resources
Diffstat (limited to 'microkde/kresources/factory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/factory.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/microkde/kresources/factory.h b/microkde/kresources/factory.h
index ad67ab3..a265bc8 100644
--- a/microkde/kresources/factory.h
+++ b/microkde/kresources/factory.h
@@ -34,7 +34,7 @@
34 34
35namespace KRES { 35namespace KRES {
36 36
37//US 37//US
38struct PluginInfo 38struct PluginInfo
39{ 39{
40 QString library; 40 QString library;
@@ -65,7 +65,7 @@ class Factory
65{ 65{
66 public: 66 public:
67 67
68 68
69 /** 69 /**
70 * Returns the global resource factory. 70 * Returns the global resource factory.
71 */ 71 */
@@ -78,20 +78,32 @@ class Factory
78 * or a null pointer if resource type doesn't exist. 78 * or a null pointer if resource type doesn't exist.
79 * 79 *
80 * @param type The type of the resource, returned by @ref resources() 80 * @param type The type of the resource, returned by @ref resources()
81 * @param resource The resource to be editted. 81 * @param resource The resource to be editted.
82 * @param parent The parent widget 82 * @param parent The parent widget
83 */ 83 */
84 ConfigWidget *configWidget( const QString& type, QWidget *parent = 0 ); 84 ConfigWidget *configWidget( const QString& type, QWidget *parent = 0 );
85 85
86 /** 86 /**
87 * Returns the sync widget for the given resource type,
88 * or a null pointer if resource type doesn't exist,
89 * or a null pointer if resource does not support syncing.
90 *
91 * @param type The type of the resource, returned by @ref resources()
92 * @param resource The resource to be editted.
93 * @param parent The parent widget
94 */
95 SyncWidget *syncWidget( const QString& type, QWidget *parent = 0 );
96
97 /**
87 * Returns a pointer to a resource object or a null pointer 98 * Returns a pointer to a resource object or a null pointer
88 * if resource type doesn't exist. 99 * if resource type doesn't exist.
89 * 100 *
90 * @param type The type of the resource, returned by @ref resources() 101 * @param type The type of the resource, returned by @ref resources()
91 * @param ab The address book, the resource should belong to 102 * @param ab The address book, the resource should belong to
92 * @param config The config object where the resource get it settings from, or 0 if a new resource should be created. 103 * @param config The config object where the resource get it settings from, or 0 if a new resource should be created.
104 * @param syncable If the resource should support syncing capabilities.
93 */ 105 */
94 Resource *resource( const QString& type, const KConfig *config ); 106 Resource *resource( const QString& type, const KConfig *config, bool syncable );
95 107
96 /** 108 /**
97 * Returns a list of all available resource types. 109 * Returns a list of all available resource types.
@@ -109,15 +121,15 @@ class Factory
109 QString typeDescription( const QString &type ) const; 121 QString typeDescription( const QString &type ) const;
110 122
111 protected: 123 protected:
112 Factory( const QString& resourceFamily ); 124 Factory( const QString& resourceFamily);
113 125
114 private: 126 private:
115 static QDict<Factory> *mSelves; 127 static QDict<Factory> *mSelves;
116 128
117 QString mResourceFamily; 129 QString mResourceFamily;
118//US QMap<QString, KService::Ptr> mTypeMap; 130//US QMap<QString, KService::Ptr> mTypeMap;
119//US lets store the pluginfo struct as value instead of a KService 131//US lets store the pluginfo struct as value instead of a KService
120 QMap<QString, PluginInfo*> mTypeMap; 132 QMap<QString, PluginInfo*> mTypeMap;
121}; 133};
122 134
123} 135}