summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/factory.h
Unidiff
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
@@ -33,9 +33,9 @@
33#include "resource.h" 33#include "resource.h"
34 34
35namespace KRES { 35namespace KRES {
36 36
37//US 37//US
38struct PluginInfo 38struct PluginInfo
39{ 39{
40 QString library; 40 QString library;
41 QString nameLabel; 41 QString nameLabel;
@@ -64,9 +64,9 @@ struct PluginInfo
64class Factory 64class 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 */
72 static Factory *self( const QString& resourceFamily ); 72 static Factory *self( const QString& resourceFamily );
@@ -77,22 +77,34 @@ class Factory
77 * Returns the config widget for the given resource type, 77 * Returns the config widget for the given resource type,
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.
98 */ 110 */
@@ -108,17 +120,17 @@ class Factory
108 */ 120 */
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}
124#endif 136#endif