author | ulf69 <ulf69> | 2004-08-04 22:45:22 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-04 22:45:22 (UTC) |
commit | c3a704f5acda9cf9fee66e5c0b1b864f3b7dd852 (patch) (unidiff) | |
tree | dc59744a6d59ba241e793ce051da485d0bf16d06 /microkde/kresources/resource.h | |
parent | b83866e08ddcc5cb2734801977927f48b53a2e1c (diff) | |
download | kdepimpi-c3a704f5acda9cf9fee66e5c0b1b864f3b7dd852.zip kdepimpi-c3a704f5acda9cf9fee66e5c0b1b864f3b7dd852.tar.gz kdepimpi-c3a704f5acda9cf9fee66e5c0b1b864f3b7dd852.tar.bz2 |
final changes for addressbook sync config dialog
Diffstat (limited to 'microkde/kresources/resource.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/resource.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h index c9202c9..580b5d1 100644 --- a/microkde/kresources/resource.h +++ b/microkde/kresources/resource.h | |||
@@ -19,49 +19,49 @@ | |||
19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. | 20 | Boston, MA 02111-1307, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifndef KRESOURCES_RESOURCE_H | 23 | #ifndef KRESOURCES_RESOURCE_H |
24 | #define KRESOURCES_RESOURCE_H | 24 | #define KRESOURCES_RESOURCE_H |
25 | 25 | ||
26 | //US | 26 | //US |
27 | #ifdef QT_THREAD_SUPPORT | 27 | #ifdef QT_THREAD_SUPPORT |
28 | #include <qmutex.h> | 28 | #include <qmutex.h> |
29 | #endif //QT_THREAD_SUPPORT | 29 | #endif //QT_THREAD_SUPPORT |
30 | 30 | ||
31 | #include <qvaluelist.h> | 31 | #include <qvaluelist.h> |
32 | #include <qwidget.h> | 32 | #include <qwidget.h> |
33 | 33 | ||
34 | #include <qobject.h> | 34 | #include <qobject.h> |
35 | 35 | ||
36 | #include <klibloader.h> | 36 | #include <klibloader.h> |
37 | 37 | ||
38 | class KConfig; | 38 | class KConfig; |
39 | 39 | ||
40 | namespace KRES { | 40 | namespace KRES { |
41 | 41 | ||
42 | class ConfigWidget; | 42 | class ConfigWidget; |
43 | class SyncWidget; | 43 | class SyncWidgetContainer; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * @internal | 46 | * @internal |
47 | * @libdoc The KDE Resource library | 47 | * @libdoc The KDE Resource library |
48 | * | 48 | * |
49 | * NOTE: this library is NOT (YET?) PUBLIC. Do not publish this | 49 | * NOTE: this library is NOT (YET?) PUBLIC. Do not publish this |
50 | * interface, it is in constant flux. | 50 | * interface, it is in constant flux. |
51 | * | 51 | * |
52 | * The KDE Resource framework can be used to manage resources of | 52 | * The KDE Resource framework can be used to manage resources of |
53 | * different types, organized in families. The Resource framework | 53 | * different types, organized in families. The Resource framework |
54 | * is currently used for addressbook resources in libkabc and for | 54 | * is currently used for addressbook resources in libkabc and for |
55 | * calendar resources in libkcal. | 55 | * calendar resources in libkcal. |
56 | * | 56 | * |
57 | * When you want to use the framework for a new family, you need to | 57 | * When you want to use the framework for a new family, you need to |
58 | * <ul><li>Define a name for your resource family</li> | 58 | * <ul><li>Define a name for your resource family</li> |
59 | * <li>subclass Resource and add the fields and method that are needed | 59 | * <li>subclass Resource and add the fields and method that are needed |
60 | * in your application</li> | 60 | * in your application</li> |
61 | * <li>If needed, override the doOpen() and doClose() methods. | 61 | * <li>If needed, override the doOpen() and doClose() methods. |
62 | * <li> Provide a configuration possibility for resources in your | 62 | * <li> Provide a configuration possibility for resources in your |
63 | * new family. You can use @ref ResourcesConfigPage to easily create a | 63 | * new family. You can use @ref ResourcesConfigPage to easily create a |
64 | * KControl applet</li> | 64 | * KControl applet</li> |
65 | * <li>In your application, you can use @ref ResourceManager to keep track | 65 | * <li>In your application, you can use @ref ResourceManager to keep track |
66 | * of the resources in your family, and you can use @ref ResourceSelectDialog | 66 | * of the resources in your family, and you can use @ref ResourceSelectDialog |
67 | * to let the user select a single resource.</li> | 67 | * to let the user select a single resource.</li> |
@@ -357,60 +357,60 @@ class Resource : public QObject | |||
357 | */ | 357 | */ |
358 | virtual bool doOpen() { return true; } | 358 | virtual bool doOpen() { return true; } |
359 | 359 | ||
360 | /** | 360 | /** |
361 | * Close this resource. Pre-condition: resource is open. | 361 | * Close this resource. Pre-condition: resource is open. |
362 | * Post-condition: resource is closed. | 362 | * Post-condition: resource is closed. |
363 | */ | 363 | */ |
364 | virtual void doClose() {} | 364 | virtual void doClose() {} |
365 | 365 | ||
366 | void setIdentifier( const QString& identifier ); | 366 | void setIdentifier( const QString& identifier ); |
367 | void setType( const QString& type ); | 367 | void setType( const QString& type ); |
368 | 368 | ||
369 | private: | 369 | private: |
370 | class ResourcePrivate; | 370 | class ResourcePrivate; |
371 | ResourcePrivate *d; | 371 | ResourcePrivate *d; |
372 | }; | 372 | }; |
373 | 373 | ||
374 | class PluginFactoryBase : public KLibFactory | 374 | class PluginFactoryBase : public KLibFactory |
375 | { | 375 | { |
376 | public: | 376 | public: |
377 | virtual Resource *resource( const KConfig *config, bool syncable ) = 0; | 377 | virtual Resource *resource( const KConfig *config, bool syncable ) = 0; |
378 | 378 | ||
379 | virtual ConfigWidget *configWidget( QWidget *parent ) = 0; | 379 | virtual ConfigWidget *configWidget( QWidget *parent ) = 0; |
380 | 380 | ||
381 | virtual SyncWidget *syncWidget( QWidget *parent ) = 0; | 381 | virtual SyncWidgetContainer *syncWidgetContainer() = 0; |
382 | 382 | ||
383 | protected: | 383 | protected: |
384 | virtual QObject* createObject( QObject*, const char*, const char*, | 384 | virtual QObject* createObject( QObject*, const char*, const char*, |
385 | const QStringList & ) | 385 | const QStringList & ) |
386 | { | 386 | { |
387 | return 0; | 387 | return 0; |
388 | } | 388 | } |
389 | }; | 389 | }; |
390 | 390 | ||
391 | template<class TR,class TC, class TS> | 391 | template<class TR,class TC, class TS> |
392 | class PluginFactory : public PluginFactoryBase | 392 | class PluginFactory : public PluginFactoryBase |
393 | { | 393 | { |
394 | public: | 394 | public: |
395 | Resource *resource( const KConfig *config, bool syncable ) | 395 | Resource *resource( const KConfig *config, bool syncable ) |
396 | { | 396 | { |
397 | return new TR( config, syncable ); | 397 | return new TR( config, syncable ); |
398 | } | 398 | } |
399 | 399 | ||
400 | ConfigWidget *configWidget( QWidget *parent ) | 400 | ConfigWidget *configWidget( QWidget *parent ) |
401 | { | 401 | { |
402 | return new TC( parent ); | 402 | return new TC( parent ); |
403 | } | 403 | } |
404 | 404 | ||
405 | virtual SyncWidget *syncWidget( QWidget *parent ) | 405 | SyncWidgetContainer *syncWidgetContainer() |
406 | { | 406 | { |
407 | return new TS( parent ); | 407 | return new TS(); |
408 | } | 408 | } |
409 | 409 | ||
410 | }; | 410 | }; |
411 | 411 | ||
412 | 412 | ||
413 | 413 | ||
414 | } | 414 | } |
415 | 415 | ||
416 | #endif | 416 | #endif |