summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxportobject.h
Side-by-side diff
Diffstat (limited to 'kaddressbook/xxportobject.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/xxportobject.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/kaddressbook/xxportobject.h b/kaddressbook/xxportobject.h
index fddc219..d547855 100644
--- a/kaddressbook/xxportobject.h
+++ b/kaddressbook/xxportobject.h
@@ -36,8 +36,12 @@ $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
{
@@ -60,4 +64,11 @@ 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:
/**
@@ -121,4 +132,26 @@ 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
{