author | ulf69 <ulf69> | 2004-08-02 18:28:27 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-02 18:28:27 (UTC) |
commit | 983127ce46c9ff6663d08dedd450da3fe7dd549b (patch) (unidiff) | |
tree | b6c5bf6bffbddb80ef405a6fc322bfa8bfe13d98 | |
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/kaddressbook.pro | 8 | ||||
-rw-r--r-- | kaddressbook/kaddressbookE.pro | 8 | ||||
-rw-r--r-- | kaddressbook/xxportmanager.cpp | 15 | ||||
-rw-r--r-- | kaddressbook/xxportobject.cpp | 21 | ||||
-rw-r--r-- | kaddressbook/xxportobject.h | 35 |
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 ) | |||
8 | 8 | ||
9 | INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../kabc ../ interfaces | 9 | INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces |
10 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION | 10 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION |
@@ -99,2 +99,5 @@ xxport/csv_xxport.h \ | |||
99 | xxport/csvimportdialog.h \ | 99 | xxport/csvimportdialog.h \ |
100 | xxport/opie_xxport.h \ | ||
101 | xxport/qtopia_xxport.h \ | ||
102 | xxport/sharpdtm_xxport.h \ | ||
100 | #details/look_details.h \ | 103 | #details/look_details.h \ |
@@ -162,2 +165,5 @@ xxport/csv_xxport.cpp \ | |||
162 | xxport/csvimportdialog.cpp \ | 165 | xxport/csvimportdialog.cpp \ |
166 | xxport/opie_xxport.cpp \ | ||
167 | xxport/qtopia_xxport.cpp \ | ||
168 | xxport/sharpdtm_xxport.cpp \ | ||
163 | #details/look_details.cpp \ | 169 | #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 | |||
12 | 12 | ||
13 | INCLUDEPATH += . ./details ./features ./kcmconfigs ./xxport ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../kabc ../qtcompat ../ interfaces $(QPEDIR)/include | 13 | 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 |
14 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER | 14 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER |
@@ -89,2 +89,5 @@ xxport/csv_xxport.h \ | |||
89 | xxport/csvimportdialog.h \ | 89 | xxport/csvimportdialog.h \ |
90 | xxport/opie_xxport.h \ | ||
91 | xxport/qtopia_xxport.h \ | ||
92 | xxport/sharpdtm_xxport.h \ | ||
90 | #details/look_details.h \ | 93 | #details/look_details.h \ |
@@ -152,2 +155,5 @@ xxport/csv_xxport.cpp \ | |||
152 | xxport/csvimportdialog.cpp \ | 155 | xxport/csvimportdialog.cpp \ |
156 | xxport/opie_xxport.cpp \ | ||
157 | xxport/qtopia_xxport.cpp \ | ||
158 | xxport/sharpdtm_xxport.cpp \ | ||
153 | #details/look_details.cpp \ | 159 | #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" | |||
45 | { | 45 | { |
46 | void* init_kaddrbk_csv_xxport(); | 46 | void* init_microkaddrbk_csv_xxport(); |
47 | void* init_kaddrbk_kde2_xxport(); | 47 | void* init_microkaddrbk_kde2_xxport(); |
48 | void* init_kaddrbk_vcard_xxport(); | 48 | void* init_microkaddrbk_vcard_xxport(); |
49 | void* init_microkaddrbk_opie_xxport(); | ||
50 | void* init_microkaddrbk_qtopia_xxport(); | ||
51 | void* init_microkaddrbk_sharpdtm_xxport(); | ||
49 | } | 52 | } |
@@ -194,5 +197,5 @@ void XXPortManager::loadPlugins() | |||
194 | QList<XXPortFactory> factorylist; | 197 | QList<XXPortFactory> factorylist; |
195 | factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_csv_xxport())); | 198 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); |
196 | factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_kde2_xxport())); | 199 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport())); |
197 | factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_vcard_xxport())); | 200 | factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport())); |
198 | 201 | ||
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 ) | |||
149 | 149 | ||
150 | /******************************************************************** | ||
151 | * | ||
152 | *******************************************************************/ | ||
153 | |||
154 | |||
155 | XXPortResourceObject::XXPortResourceObject( KABC::AddressBook *ab, QWidget *parent, | ||
156 | const char *name ) | ||
157 | : XXPortObject( ab, parent, name ), mResource(0) | ||
158 | { | ||
159 | } | ||
160 | |||
161 | XXPortResourceObject::~XXPortResourceObject() | ||
162 | { | ||
163 | } | ||
164 | |||
165 | bool XXPortResourceObject::isAvailable() | ||
166 | { | ||
167 | return (mResource != 0); | ||
168 | } | ||
169 | |||
170 | |||
150 | #ifndef KAB_EMBEDDED | 171 | #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$ | |||
37 | #include <kabc/addresseelist.h> | 37 | #include <kabc/addresseelist.h> |
38 | #include <kabc/resource.h> | ||
38 | #include <kxmlguiclient.h> | 39 | #include <kxmlguiclient.h> |
@@ -41,2 +42,5 @@ $Id$ | |||
41 | 42 | ||
43 | |||
44 | |||
45 | |||
42 | class XXPortObject : public QObject, virtual public KXMLGUIClient | 46 | class XXPortObject : public QObject, virtual public KXMLGUIClient |
@@ -61,2 +65,9 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient | |||
61 | 65 | ||
66 | /** | ||
67 | Returns true if the XXPortObject can be used. | ||
68 | One case it can not be used is for example if a needed lib could not be loaded. | ||
69 | */ | ||
70 | virtual bool isAvailable() const { return true; }; | ||
71 | |||
72 | |||
62 | public slots: | 73 | public slots: |
@@ -109,3 +120,3 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient | |||
109 | 120 | ||
110 | 121 | ||
111 | private slots: | 122 | private slots: |
@@ -122,2 +133,24 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient | |||
122 | 133 | ||
134 | |||
135 | |||
136 | class XXPortResourceObject : public XXPortObject | ||
137 | { | ||
138 | Q_OBJECT | ||
139 | |||
140 | public: | ||
141 | XXPortResourceObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); | ||
142 | ~XXPortResourceObject(); | ||
143 | |||
144 | /** | ||
145 | Returns true if the XXPortObject can be used. | ||
146 | One case it can not be used is for example if a needed lib could not be loaded. | ||
147 | */ | ||
148 | virtual bool isAvailable(); | ||
149 | protected: | ||
150 | KABC::Resource* mResource; | ||
151 | }; | ||
152 | |||
153 | |||
154 | |||
155 | |||
123 | class XXPortFactory : public KLibFactory | 156 | class XXPortFactory : public KLibFactory |