summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbook.pro8
-rw-r--r--kaddressbook/kaddressbookE.pro8
-rw-r--r--kaddressbook/xxportmanager.cpp15
-rw-r--r--kaddressbook/xxportobject.cpp21
-rw-r--r--kaddressbook/xxportobject.h35
5 files changed, 78 insertions, 9 deletions
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro
index 77fce1b..0da5842 100644
--- a/kaddressbook/kaddressbook.pro
+++ b/kaddressbook/kaddressbook.pro
@@ -8,3 +8,3 @@ include( ../variables.pri )
-INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../kabc ../ interfaces
+INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces
DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION
@@ -99,2 +99,5 @@ xxport/csv_xxport.h \
xxport/csvimportdialog.h \
+xxport/opie_xxport.h \
+xxport/qtopia_xxport.h \
+xxport/sharpdtm_xxport.h \
#details/look_details.h \
@@ -162,2 +165,5 @@ xxport/csv_xxport.cpp \
xxport/csvimportdialog.cpp \
+xxport/opie_xxport.cpp \
+xxport/qtopia_xxport.cpp \
+xxport/sharpdtm_xxport.cpp \
#details/look_details.cpp \
diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro
index dc4a2f2..95e6641 100644
--- a/kaddressbook/kaddressbookE.pro
+++ b/kaddressbook/kaddressbookE.pro
@@ -12,3 +12,3 @@ DESTDIR=$(QPEDIR)/bin
-INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../kabc ../qtcompat ../ interfaces $(QPEDIR)/include
+INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../qtcompat ../ interfaces $(QPEDIR)/include
DEFINES += KAB_EMBEDDED KAB_NOSPLITTER
@@ -89,2 +89,5 @@ xxport/csv_xxport.h \
xxport/csvimportdialog.h \
+xxport/opie_xxport.h \
+xxport/qtopia_xxport.h \
+xxport/sharpdtm_xxport.h \
#details/look_details.h \
@@ -152,2 +155,5 @@ xxport/csv_xxport.cpp \
xxport/csvimportdialog.cpp \
+xxport/opie_xxport.cpp \
+xxport/qtopia_xxport.cpp \
+xxport/sharpdtm_xxport.cpp \
#details/look_details.cpp \
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 2962951..a6797c9 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -45,5 +45,8 @@ extern "C"
{
- void* init_kaddrbk_csv_xxport();
- void* init_kaddrbk_kde2_xxport();
- void* init_kaddrbk_vcard_xxport();
+ void* init_microkaddrbk_csv_xxport();
+ void* init_microkaddrbk_kde2_xxport();
+ void* init_microkaddrbk_vcard_xxport();
+ void* init_microkaddrbk_opie_xxport();
+ void* init_microkaddrbk_qtopia_xxport();
+ void* init_microkaddrbk_sharpdtm_xxport();
}
@@ -194,5 +197,5 @@ void XXPortManager::loadPlugins()
QList<XXPortFactory> factorylist;
- factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_csv_xxport()));
- factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_kde2_xxport()));
- factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_vcard_xxport()));
+ factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport()));
+ factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport()));
+ factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport()));
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp
index 42ab0fb..bb985a6 100644
--- a/kaddressbook/xxportobject.cpp
+++ b/kaddressbook/xxportobject.cpp
@@ -149,2 +149,23 @@ void XXPortObject::slotImportActivated( const QString &data )
+/********************************************************************
+ *
+ *******************************************************************/
+
+
+XXPortResourceObject::XXPortResourceObject( KABC::AddressBook *ab, QWidget *parent,
+ const char *name )
+ : XXPortObject( ab, parent, name ), mResource(0)
+{
+}
+
+XXPortResourceObject::~XXPortResourceObject()
+{
+}
+
+bool XXPortResourceObject::isAvailable()
+{
+ return (mResource != 0);
+}
+
+
#ifndef KAB_EMBEDDED
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