From 983127ce46c9ff6663d08dedd450da3fe7dd549b Mon Sep 17 00:00:00 2001 From: ulf69 Date: Mon, 02 Aug 2004 18:28:27 +0000 Subject: implemented the exportclasses for opie, qtopia and sharp as part of kaddressbook and not as additional libraries. --- (limited to 'kaddressbook/xxportobject.h') 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 #include +#include #include #include + + + 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: -- cgit v0.9.0.2