summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/resource.h
Unidiff
Diffstat (limited to 'microkde/kresources/resource.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/resource.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h
index 70b5613..ed5af96 100644
--- a/microkde/kresources/resource.h
+++ b/microkde/kresources/resource.h
@@ -37,13 +37,12 @@
37 37
38class KConfig; 38class KConfig;
39 39
40namespace KRES { 40namespace KRES {
41 41
42class ConfigWidget; 42class ConfigWidget;
43class SyncWidgetContainer;
44 43
45/** 44/**
46 * @internal 45 * @internal
47 * @libdoc The KDE Resource library 46 * @libdoc The KDE Resource library
48 * 47 *
49 * NOTE: this library is NOT (YET?) PUBLIC. Do not publish this 48 * NOTE: this library is NOT (YET?) PUBLIC. Do not publish this
@@ -229,13 +228,13 @@ link_DATA= resourceexample.desktop
229 */ 228 */
230 229
231/** 230/**
232 * A @ref Resource is a ... 231 * A @ref Resource is a ...
233 * 232 *
234 * A subclass should reimplement at least the constructor and the 233 * A subclass should reimplement at least the constructor and the
235 * @ref writeConfig method. 234k * @ref writeConfig method.
236 * 235 *
237 */ 236 */
238class Resource : public QObject 237class Resource : public QObject
239{ 238{
240 Q_OBJECT 239 Q_OBJECT
241 240
@@ -320,17 +319,12 @@ class Resource : public QObject
320 319
321 /** 320 /**
322 * Returns the name of resource. 321 * Returns the name of resource.
323 */ 322 */
324 virtual QString resourceName() const; 323 virtual QString resourceName() const;
325 324
326
327
328 virtual bool isSyncable() const = 0;
329
330
331 /** 325 /**
332 Sets, if the resource is active. 326 Sets, if the resource is active.
333 */ 327 */
334 void setActive( bool active ); 328 void setActive( bool active );
335 329
336 /** 330 /**
@@ -373,45 +367,37 @@ class Resource : public QObject
373 ResourcePrivate *d; 367 ResourcePrivate *d;
374}; 368};
375 369
376class PluginFactoryBase : public KLibFactory 370class PluginFactoryBase : public KLibFactory
377{ 371{
378 public: 372 public:
379 virtual Resource *resource( const KConfig *config, bool syncable ) = 0; 373 virtual Resource *resource( const KConfig *config) = 0;
380 374
381 virtual ConfigWidget *configWidget( QWidget *parent ) = 0; 375 virtual ConfigWidget *configWidget( QWidget *parent ) = 0;
382 376
383 virtual SyncWidgetContainer *syncWidgetContainer() = 0;
384
385 protected: 377 protected:
386 virtual QObject* createObject( QObject*, const char*, const char*, 378 virtual QObject* createObject( QObject*, const char*, const char*,
387 const QStringList & ) 379 const QStringList & )
388 { 380 {
389 return 0; 381 return 0;
390 } 382 }
391}; 383};
392 384
393template<class TR,class TC, class TS> 385template<class TR,class TC>
394class PluginFactory : public PluginFactoryBase 386class PluginFactory : public PluginFactoryBase
395{ 387{
396 public: 388 public:
397 Resource *resource( const KConfig *config, bool syncable ) 389 Resource *resource( const KConfig *config)
398 { 390 {
399 return new TR( config, syncable ); 391 return new TR( config );
400 } 392 }
401 393
402 ConfigWidget *configWidget( QWidget *parent ) 394 ConfigWidget *configWidget( QWidget *parent )
403 { 395 {
404 return new TC( parent ); 396 return new TC( parent );
405 } 397 }
406
407 SyncWidgetContainer *syncWidgetContainer()
408 {
409 return new TS();
410 }
411
412}; 398};
413 399
414 400
415 401
416} 402}
417 403