-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 @@ -37,2 +37,3 @@ $Id$ #include <kabc/addresseelist.h> +#include <kabc/resource.h> #include <kxmlguiclient.h> @@ -41,2 +42,5 @@ $Id$ + + + class XXPortObject : public QObject, virtual public KXMLGUIClient @@ -61,2 +65,9 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient + /** + 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: @@ -109,3 +120,3 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient - + private slots: @@ -122,2 +133,24 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient + + +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 |