author | ulf69 <ulf69> | 2004-08-02 18:28:27 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-02 18:28:27 (UTC) |
commit | 983127ce46c9ff6663d08dedd450da3fe7dd549b (patch) (side-by-side diff) | |
tree | b6c5bf6bffbddb80ef405a6fc322bfa8bfe13d98 /kaddressbook/xxportobject.h | |
parent | 09fe5a5325105b5051d22feb8dae6bb1f9875ff3 (diff) | |
download | kdepimpi-983127ce46c9ff6663d08dedd450da3fe7dd549b.zip kdepimpi-983127ce46c9ff6663d08dedd450da3fe7dd549b.tar.gz kdepimpi-983127ce46c9ff6663d08dedd450da3fe7dd549b.tar.bz2 |
implemented the exportclasses for opie, qtopia and sharp as part of kaddressbook and not as additional libraries.
-rw-r--r-- | kaddressbook/xxportobject.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/kaddressbook/xxportobject.h b/kaddressbook/xxportobject.h index fddc219..d547855 100644 --- a/kaddressbook/xxportobject.h +++ b/kaddressbook/xxportobject.h @@ -35,10 +35,14 @@ $Id$ #include <kabc/addressbook.h> #include <kabc/addresseelist.h> +#include <kabc/resource.h> #include <kxmlguiclient.h> #include <klibloader.h> + + + class XXPortObject : public QObject, virtual public KXMLGUIClient { Q_OBJECT @@ -59,6 +63,13 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient */ virtual bool requiresSorting() const { return false; } + /** + Returns true if the XXPortObject can be used. + One case it can not be used is for example if a needed lib could not be loaded. + */ + virtual bool isAvailable() const { return true; }; + + public slots: /** Reimplement this method for exporting the contacts. @@ -107,7 +118,7 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient */ QWidget *parentWidget() const; - + private slots: void slotImportActivated( const QString& ); void slotExportActivated( const QString& ); @@ -120,6 +131,28 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient XXPortObjectPrivate *d; }; + + +class XXPortResourceObject : public XXPortObject +{ + Q_OBJECT + + public: + XXPortResourceObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + ~XXPortResourceObject(); + + /** + Returns true if the XXPortObject can be used. + One case it can not be used is for example if a needed lib could not be loaded. + */ + virtual bool isAvailable(); + protected: + KABC::Resource* mResource; +}; + + + + class XXPortFactory : public KLibFactory { public: |