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 | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | TARGET = kapi | 3 | TARGET = kapi |
4 | DESTDIR= ../bin | 4 | DESTDIR= ../bin |
5 | 5 | ||
6 | include( ../variables.pri ) | 6 | include( ../variables.pri ) |
7 | 7 | ||
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 |
11 | 11 | ||
12 | unix : { | 12 | unix : { |
13 | LIBS += ../bin/libmicrokdepim.so | 13 | LIBS += ../bin/libmicrokdepim.so |
14 | LIBS += ../bin/libmicrokde.so | 14 | LIBS += ../bin/libmicrokde.so |
15 | LIBS += ../bin/libmicrokabc.so | 15 | LIBS += ../bin/libmicrokabc.so |
16 | LIBS += ../bin/libmicrokcal.so | 16 | LIBS += ../bin/libmicrokcal.so |
17 | LIBS += -lldap | 17 | LIBS += -lldap |
18 | OBJECTS_DIR = obj/unix | 18 | OBJECTS_DIR = obj/unix |
19 | MOC_DIR = moc/unix | 19 | MOC_DIR = moc/unix |
20 | } | 20 | } |
21 | win32: { | 21 | win32: { |
22 | DEFINES += _WIN32_ | 22 | DEFINES += _WIN32_ |
23 | LIBS += ../bin/microkdepim.lib | 23 | LIBS += ../bin/microkdepim.lib |
24 | LIBS += ../bin/microkcal.lib | 24 | LIBS += ../bin/microkcal.lib |
25 | LIBS += ../bin/microkde.lib | 25 | LIBS += ../bin/microkde.lib |
26 | LIBS += ../bin/microkabc.lib | 26 | LIBS += ../bin/microkabc.lib |
27 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 27 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
28 | OBJECTS_DIR = obj/win | 28 | OBJECTS_DIR = obj/win |
29 | MOC_DIR = moc/win | 29 | MOC_DIR = moc/win |
30 | LIBS += mfc71u.lib | 30 | LIBS += mfc71u.lib |
31 | } | 31 | } |
32 | 32 | ||
33 | 33 | ||
@@ -76,48 +76,51 @@ configurewidget.h \ | |||
76 | viewconfigurewidget.h \ | 76 | viewconfigurewidget.h \ |
77 | viewconfigurefieldspage.h \ | 77 | viewconfigurefieldspage.h \ |
78 | viewconfigurefilterpage.h \ | 78 | viewconfigurefilterpage.h \ |
79 | typecombo.h \ | 79 | typecombo.h \ |
80 | undo.h \ | 80 | undo.h \ |
81 | undocmds.h \ | 81 | undocmds.h \ |
82 | xxportmanager.h \ | 82 | xxportmanager.h \ |
83 | xxportobject.h \ | 83 | xxportobject.h \ |
84 | xxportselectdialog.h \ | 84 | xxportselectdialog.h \ |
85 | details/detailsviewcontainer.h \ | 85 | details/detailsviewcontainer.h \ |
86 | details/look_basic.h \ | 86 | details/look_basic.h \ |
87 | details/look_html.h \ | 87 | details/look_html.h \ |
88 | views/kaddressbookiconview.h \ | 88 | views/kaddressbookiconview.h \ |
89 | views/kaddressbooktableview.h \ | 89 | views/kaddressbooktableview.h \ |
90 | views/kaddressbookcardview.h \ | 90 | views/kaddressbookcardview.h \ |
91 | views/configuretableviewdialog.h \ | 91 | views/configuretableviewdialog.h \ |
92 | views/configurecardviewdialog.h \ | 92 | views/configurecardviewdialog.h \ |
93 | views/cardview.h \ | 93 | views/cardview.h \ |
94 | views/colorlistbox.h \ | 94 | views/colorlistbox.h \ |
95 | views/contactlistview.h \ | 95 | views/contactlistview.h \ |
96 | xxport/vcard_xxport.h \ | 96 | xxport/vcard_xxport.h \ |
97 | xxport/kde2_xxport.h \ | 97 | xxport/kde2_xxport.h \ |
98 | xxport/csv_xxport.h \ | 98 | 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 \ |
101 | #mainwindoiw.h \ | 104 | #mainwindoiw.h \ |
102 | # alarmclient.h \ | 105 | # alarmclient.h \ |
103 | # calendarview.h \ | 106 | # calendarview.h \ |
104 | # customlistviewitem.h \ | 107 | # customlistviewitem.h \ |
105 | # datenavigator.h | 108 | # datenavigator.h |
106 | 109 | ||
107 | SOURCES = \ | 110 | SOURCES = \ |
108 | addresseeeditordialog.cpp \ | 111 | addresseeeditordialog.cpp \ |
109 | addresseeeditorwidget.cpp \ | 112 | addresseeeditorwidget.cpp \ |
110 | addresseditwidget.cpp \ | 113 | addresseditwidget.cpp \ |
111 | addresseeconfig.cpp \ | 114 | addresseeconfig.cpp \ |
112 | addresseeutil.cpp \ | 115 | addresseeutil.cpp \ |
113 | extensionmanager.cpp \ | 116 | extensionmanager.cpp \ |
114 | features/mergewidget.cpp \ | 117 | features/mergewidget.cpp \ |
115 | features/distributionlistwidget.cpp \ | 118 | features/distributionlistwidget.cpp \ |
116 | kcmconfigs/addresseewidget.cpp \ | 119 | kcmconfigs/addresseewidget.cpp \ |
117 | kcmconfigs/extensionconfigdialog.cpp \ | 120 | kcmconfigs/extensionconfigdialog.cpp \ |
118 | kcmconfigs/kcmkabconfig.cpp \ | 121 | kcmconfigs/kcmkabconfig.cpp \ |
119 | kcmconfigs/kabconfigwidget.cpp \ | 122 | kcmconfigs/kabconfigwidget.cpp \ |
120 | emaileditwidget.cpp \ | 123 | emaileditwidget.cpp \ |
121 | filtereditdialog.cpp \ | 124 | filtereditdialog.cpp \ |
122 | mainembedded.cpp \ | 125 | mainembedded.cpp \ |
123 | kaddressbookmain.cpp \ | 126 | kaddressbookmain.cpp \ |
@@ -139,39 +142,42 @@ addviewdialog.cpp \ | |||
139 | configurewidget.cpp \ | 142 | configurewidget.cpp \ |
140 | viewconfigurewidget.cpp \ | 143 | viewconfigurewidget.cpp \ |
141 | viewconfigurefieldspage.cpp \ | 144 | viewconfigurefieldspage.cpp \ |
142 | viewconfigurefilterpage.cpp \ | 145 | viewconfigurefilterpage.cpp \ |
143 | undo.cpp \ | 146 | undo.cpp \ |
144 | undocmds.cpp \ | 147 | undocmds.cpp \ |
145 | xxportmanager.cpp \ | 148 | xxportmanager.cpp \ |
146 | xxportobject.cpp \ | 149 | xxportobject.cpp \ |
147 | xxportselectdialog.cpp \ | 150 | xxportselectdialog.cpp \ |
148 | details/detailsviewcontainer.cpp \ | 151 | details/detailsviewcontainer.cpp \ |
149 | details/look_basic.cpp \ | 152 | details/look_basic.cpp \ |
150 | details/look_html.cpp \ | 153 | details/look_html.cpp \ |
151 | views/kaddressbookiconview.cpp \ | 154 | views/kaddressbookiconview.cpp \ |
152 | views/kaddressbooktableview.cpp \ | 155 | views/kaddressbooktableview.cpp \ |
153 | views/kaddressbookcardview.cpp \ | 156 | views/kaddressbookcardview.cpp \ |
154 | views/configuretableviewdialog.cpp \ | 157 | views/configuretableviewdialog.cpp \ |
155 | views/configurecardviewdialog.cpp \ | 158 | views/configurecardviewdialog.cpp \ |
156 | views/cardview.cpp \ | 159 | views/cardview.cpp \ |
157 | views/contactlistview.cpp \ | 160 | views/contactlistview.cpp \ |
158 | views/colorlistbox.cpp \ | 161 | views/colorlistbox.cpp \ |
159 | xxport/vcard_xxport.cpp \ | 162 | xxport/vcard_xxport.cpp \ |
160 | xxport/kde2_xxport.cpp \ | 163 | xxport/kde2_xxport.cpp \ |
161 | xxport/csv_xxport.cpp \ | 164 | 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 \ |
164 | #mainwindow.cpp \ | 170 | #mainwindow.cpp \ |
165 | # calendarview.cpp \ | 171 | # calendarview.cpp \ |
166 | # timespanview.cpp | 172 | # timespanview.cpp |
167 | 173 | ||
168 | 174 | ||
169 | 175 | ||
170 | win32: { | 176 | win32: { |
171 | HEADERS += ../outport/msoutl9.h \ | 177 | HEADERS += ../outport/msoutl9.h \ |
172 | kaimportoldialog.h | 178 | kaimportoldialog.h |
173 | 179 | ||
174 | SOURCES += ../outport/msoutl9.cpp \ | 180 | SOURCES += ../outport/msoutl9.cpp \ |
175 | kaimportoldialog.cpp | 181 | kaimportoldialog.cpp |
176 | } | 182 | } |
177 | 183 | ||
diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro index dc4a2f2..95e6641 100644 --- a/kaddressbook/kaddressbookE.pro +++ b/kaddressbook/kaddressbookE.pro | |||
@@ -1,37 +1,37 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | 3 | ||
4 | 4 | ||
5 | TARGET = kapi | 5 | TARGET = kapi |
6 | OBJECTS_DIR = obj/$(PLATFORM) | 6 | OBJECTS_DIR = obj/$(PLATFORM) |
7 | MOC_DIR = moc/$(PLATFORM) | 7 | MOC_DIR = moc/$(PLATFORM) |
8 | DESTDIR=$(QPEDIR)/bin | 8 | DESTDIR=$(QPEDIR)/bin |
9 | 9 | ||
10 | #LFLAGS += -Wl,-export-dynamic | 10 | #LFLAGS += -Wl,-export-dynamic |
11 | 11 | ||
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 |
15 | #DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL | 15 | #DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL |
16 | #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER | 16 | #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER |
17 | #DEFINES += KORG_NOLVALTERNATION | 17 | #DEFINES += KORG_NOLVALTERNATION |
18 | LIBS += -lmicrokdepim | 18 | LIBS += -lmicrokdepim |
19 | #LIBS += -lmicrokcal | 19 | #LIBS += -lmicrokcal |
20 | LIBS += -lmicrokde | 20 | LIBS += -lmicrokde |
21 | LIBS += -lmicrokcal | 21 | LIBS += -lmicrokcal |
22 | LIBS += -lmicroqtcompat | 22 | LIBS += -lmicroqtcompat |
23 | LIBS += -lmicrokabc | 23 | LIBS += -lmicrokabc |
24 | LIBS += -lqpe | 24 | LIBS += -lqpe |
25 | LIBS += -ljpeg | 25 | LIBS += -ljpeg |
26 | LIBS += $(QTOPIALIB) | 26 | LIBS += $(QTOPIALIB) |
27 | LIBS += -L$(QPEDIR)/lib | 27 | LIBS += -L$(QPEDIR)/lib |
28 | LIBS += -Wl,-export-dynamic | 28 | LIBS += -Wl,-export-dynamic |
29 | 29 | ||
30 | INTERFACES = \ | 30 | INTERFACES = \ |
31 | # filteredit_base.ui \ | 31 | # filteredit_base.ui \ |
32 | # kofilterview_base.ui \ | 32 | # kofilterview_base.ui \ |
33 | 33 | ||
34 | HEADERS = \ | 34 | HEADERS = \ |
35 | features/mergewidget.h \ | 35 | features/mergewidget.h \ |
36 | features/distributionlistwidget.h \ | 36 | features/distributionlistwidget.h \ |
37 | kcmconfigs/addresseewidget.h \ | 37 | kcmconfigs/addresseewidget.h \ |
@@ -66,48 +66,51 @@ configurewidget.h \ | |||
66 | viewconfigurewidget.h \ | 66 | viewconfigurewidget.h \ |
67 | viewconfigurefieldspage.h \ | 67 | viewconfigurefieldspage.h \ |
68 | viewconfigurefilterpage.h \ | 68 | viewconfigurefilterpage.h \ |
69 | typecombo.h \ | 69 | typecombo.h \ |
70 | undo.h \ | 70 | undo.h \ |
71 | undocmds.h \ | 71 | undocmds.h \ |
72 | xxportmanager.h \ | 72 | xxportmanager.h \ |
73 | xxportobject.h \ | 73 | xxportobject.h \ |
74 | xxportselectdialog.h \ | 74 | xxportselectdialog.h \ |
75 | details/detailsviewcontainer.h \ | 75 | details/detailsviewcontainer.h \ |
76 | details/look_basic.h \ | 76 | details/look_basic.h \ |
77 | details/look_html.h \ | 77 | details/look_html.h \ |
78 | views/kaddressbookiconview.h \ | 78 | views/kaddressbookiconview.h \ |
79 | views/kaddressbooktableview.h \ | 79 | views/kaddressbooktableview.h \ |
80 | views/kaddressbookcardview.h \ | 80 | views/kaddressbookcardview.h \ |
81 | views/configuretableviewdialog.h \ | 81 | views/configuretableviewdialog.h \ |
82 | views/configurecardviewdialog.h \ | 82 | views/configurecardviewdialog.h \ |
83 | views/cardview.h \ | 83 | views/cardview.h \ |
84 | views/colorlistbox.h \ | 84 | views/colorlistbox.h \ |
85 | views/contactlistview.h \ | 85 | views/contactlistview.h \ |
86 | xxport/vcard_xxport.h \ | 86 | xxport/vcard_xxport.h \ |
87 | xxport/kde2_xxport.h \ | 87 | xxport/kde2_xxport.h \ |
88 | xxport/csv_xxport.h \ | 88 | 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 \ |
91 | #mainwindoiw.h \ | 94 | #mainwindoiw.h \ |
92 | # alarmclient.h \ | 95 | # alarmclient.h \ |
93 | # calendarview.h \ | 96 | # calendarview.h \ |
94 | # customlistviewitem.h \ | 97 | # customlistviewitem.h \ |
95 | # datenavigator.h | 98 | # datenavigator.h |
96 | 99 | ||
97 | SOURCES = \ | 100 | SOURCES = \ |
98 | addresseeeditordialog.cpp \ | 101 | addresseeeditordialog.cpp \ |
99 | addresseeeditorwidget.cpp \ | 102 | addresseeeditorwidget.cpp \ |
100 | addresseditwidget.cpp \ | 103 | addresseditwidget.cpp \ |
101 | addresseeconfig.cpp \ | 104 | addresseeconfig.cpp \ |
102 | addresseeutil.cpp \ | 105 | addresseeutil.cpp \ |
103 | extensionmanager.cpp \ | 106 | extensionmanager.cpp \ |
104 | features/mergewidget.cpp \ | 107 | features/mergewidget.cpp \ |
105 | features/distributionlistwidget.cpp \ | 108 | features/distributionlistwidget.cpp \ |
106 | kcmconfigs/addresseewidget.cpp \ | 109 | kcmconfigs/addresseewidget.cpp \ |
107 | kcmconfigs/extensionconfigdialog.cpp \ | 110 | kcmconfigs/extensionconfigdialog.cpp \ |
108 | kcmconfigs/kcmkabconfig.cpp \ | 111 | kcmconfigs/kcmkabconfig.cpp \ |
109 | kcmconfigs/kabconfigwidget.cpp \ | 112 | kcmconfigs/kabconfigwidget.cpp \ |
110 | emaileditwidget.cpp \ | 113 | emaileditwidget.cpp \ |
111 | filtereditdialog.cpp \ | 114 | filtereditdialog.cpp \ |
112 | mainembedded.cpp \ | 115 | mainembedded.cpp \ |
113 | kaddressbookmain.cpp \ | 116 | kaddressbookmain.cpp \ |
@@ -129,29 +132,32 @@ addviewdialog.cpp \ | |||
129 | configurewidget.cpp \ | 132 | configurewidget.cpp \ |
130 | viewconfigurewidget.cpp \ | 133 | viewconfigurewidget.cpp \ |
131 | viewconfigurefieldspage.cpp \ | 134 | viewconfigurefieldspage.cpp \ |
132 | viewconfigurefilterpage.cpp \ | 135 | viewconfigurefilterpage.cpp \ |
133 | undo.cpp \ | 136 | undo.cpp \ |
134 | undocmds.cpp \ | 137 | undocmds.cpp \ |
135 | xxportmanager.cpp \ | 138 | xxportmanager.cpp \ |
136 | xxportobject.cpp \ | 139 | xxportobject.cpp \ |
137 | xxportselectdialog.cpp \ | 140 | xxportselectdialog.cpp \ |
138 | details/detailsviewcontainer.cpp \ | 141 | details/detailsviewcontainer.cpp \ |
139 | details/look_basic.cpp \ | 142 | details/look_basic.cpp \ |
140 | details/look_html.cpp \ | 143 | details/look_html.cpp \ |
141 | views/kaddressbookiconview.cpp \ | 144 | views/kaddressbookiconview.cpp \ |
142 | views/kaddressbooktableview.cpp \ | 145 | views/kaddressbooktableview.cpp \ |
143 | views/kaddressbookcardview.cpp \ | 146 | views/kaddressbookcardview.cpp \ |
144 | views/configuretableviewdialog.cpp \ | 147 | views/configuretableviewdialog.cpp \ |
145 | views/configurecardviewdialog.cpp \ | 148 | views/configurecardviewdialog.cpp \ |
146 | views/cardview.cpp \ | 149 | views/cardview.cpp \ |
147 | views/contactlistview.cpp \ | 150 | views/contactlistview.cpp \ |
148 | views/colorlistbox.cpp \ | 151 | views/colorlistbox.cpp \ |
149 | xxport/vcard_xxport.cpp \ | 152 | xxport/vcard_xxport.cpp \ |
150 | xxport/kde2_xxport.cpp \ | 153 | xxport/kde2_xxport.cpp \ |
151 | xxport/csv_xxport.cpp \ | 154 | 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 \ |
154 | #mainwindow.cpp \ | 160 | #mainwindow.cpp \ |
155 | # calendarview.cpp \ | 161 | # calendarview.cpp \ |
156 | # timespanview.cpp | 162 | # timespanview.cpp |
157 | 163 | ||
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp index 2962951..a6797c9 100644 --- a/kaddressbook/xxportmanager.cpp +++ b/kaddressbook/xxportmanager.cpp | |||
@@ -22,51 +22,54 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qlist.h> | 32 | #include <qlist.h> |
33 | 33 | ||
34 | #include <kabc/addressbook.h> | 34 | #include <kabc/addressbook.h> |
35 | #include <kabc/resource.h> | 35 | #include <kabc/resource.h> |
36 | #include <kdebug.h> | 36 | #include <kdebug.h> |
37 | #include <kdialogbase.h> | 37 | #include <kdialogbase.h> |
38 | #include <klocale.h> | 38 | #include <klocale.h> |
39 | #include <kmessagebox.h> | 39 | #include <kmessagebox.h> |
40 | 40 | ||
41 | #ifndef KAB_EMBEDDED | 41 | #ifndef KAB_EMBEDDED |
42 | #include <ktrader.h> | 42 | #include <ktrader.h> |
43 | #else //KAB_EMBEDDED | 43 | #else //KAB_EMBEDDED |
44 | extern "C" | 44 | 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 | } |
50 | #endif //KAB_EMBEDDED | 53 | #endif //KAB_EMBEDDED |
51 | 54 | ||
52 | #include <libkdepim/addresseeview.h> | 55 | #include <libkdepim/addresseeview.h> |
53 | 56 | ||
54 | #include "kabcore.h" | 57 | #include "kabcore.h" |
55 | #include "undocmds.h" | 58 | #include "undocmds.h" |
56 | #include "xxportselectdialog.h" | 59 | #include "xxportselectdialog.h" |
57 | 60 | ||
58 | #include "xxportmanager.h" | 61 | #include "xxportmanager.h" |
59 | 62 | ||
60 | KURL XXPortManager::importURL = KURL(); | 63 | KURL XXPortManager::importURL = KURL(); |
61 | QString XXPortManager::importData = QString::null; | 64 | QString XXPortManager::importData = QString::null; |
62 | 65 | ||
63 | class PreviewDialog : public KDialogBase | 66 | class PreviewDialog : public KDialogBase |
64 | { | 67 | { |
65 | public: | 68 | public: |
66 | PreviewDialog( const KABC::Addressee &addr, | 69 | PreviewDialog( const KABC::Addressee &addr, |
67 | QWidget *parent, const char *name = 0 ); | 70 | QWidget *parent, const char *name = 0 ); |
68 | }; | 71 | }; |
69 | 72 | ||
70 | XXPortManager::XXPortManager( KABCore *core, QObject *parent, const char *name ) | 73 | XXPortManager::XXPortManager( KABCore *core, QObject *parent, const char *name ) |
71 | : QObject( parent, name ), mCore( core ), mShowPreview( false ) | 74 | : QObject( parent, name ), mCore( core ), mShowPreview( false ) |
72 | { | 75 | { |
@@ -171,51 +174,51 @@ void XXPortManager::loadPlugins() | |||
171 | mXXPortObjects.clear(); | 174 | mXXPortObjects.clear(); |
172 | 175 | ||
173 | #ifndef KAB_EMBEDDED | 176 | #ifndef KAB_EMBEDDED |
174 | KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort" ); | 177 | KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort" ); |
175 | KTrader::OfferList::ConstIterator it; | 178 | KTrader::OfferList::ConstIterator it; |
176 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { | 179 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { |
177 | if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) ) | 180 | if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) ) |
178 | continue; | 181 | continue; |
179 | 182 | ||
180 | KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() ); | 183 | KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() ); |
181 | if ( !factory ) { | 184 | if ( !factory ) { |
182 | kdDebug(5720) << "XXPortManager::loadExtensions(): Factory creation failed" << endl; | 185 | kdDebug(5720) << "XXPortManager::loadExtensions(): Factory creation failed" << endl; |
183 | continue; | 186 | continue; |
184 | } | 187 | } |
185 | 188 | ||
186 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); | 189 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); |
187 | 190 | ||
188 | if ( !xxportFactory ) { | 191 | if ( !xxportFactory ) { |
189 | kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl; | 192 | kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl; |
190 | continue; | 193 | continue; |
191 | } | 194 | } |
192 | 195 | ||
193 | #else //KAB_EMBEDDED | 196 | #else //KAB_EMBEDDED |
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 | ||
199 | //add the opie import library dynamically | 202 | //add the opie import library dynamically |
200 | KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" ); | 203 | KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" ); |
201 | if ( factory ) { | 204 | if ( factory ) { |
202 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); | 205 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); |
203 | factorylist.append(xxportFactory); | 206 | factorylist.append(xxportFactory); |
204 | } | 207 | } |
205 | 208 | ||
206 | //add the qtopia import library dynamically | 209 | //add the qtopia import library dynamically |
207 | factory = KLibLoader::self()->factory( "microkaddrbk_qtopia_xxport" ); | 210 | factory = KLibLoader::self()->factory( "microkaddrbk_qtopia_xxport" ); |
208 | if ( factory ) { | 211 | if ( factory ) { |
209 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); | 212 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); |
210 | factorylist.append(xxportFactory); | 213 | factorylist.append(xxportFactory); |
211 | } | 214 | } |
212 | 215 | ||
213 | //add the sharp import library dynamically | 216 | //add the sharp import library dynamically |
214 | factory = KLibLoader::self()->factory( "microkaddrbk_sharpdtm_xxport" ); | 217 | factory = KLibLoader::self()->factory( "microkaddrbk_sharpdtm_xxport" ); |
215 | if ( factory ) { | 218 | if ( factory ) { |
216 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); | 219 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); |
217 | factorylist.append(xxportFactory); | 220 | factorylist.append(xxportFactory); |
218 | } | 221 | } |
219 | 222 | ||
220 | QListIterator<XXPortFactory> it(factorylist); | 223 | QListIterator<XXPortFactory> it(factorylist); |
221 | for ( ; it.current(); ++it ) | 224 | for ( ; it.current(); ++it ) |
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp index 42ab0fb..bb985a6 100644 --- a/kaddressbook/xxportobject.cpp +++ b/kaddressbook/xxportobject.cpp | |||
@@ -126,27 +126,48 @@ void XXPortObject::createExportAction( const QString &label, const QString &data | |||
126 | #endif //KAB_EMBEDDED | 126 | #endif //KAB_EMBEDDED |
127 | 127 | ||
128 | } | 128 | } |
129 | 129 | ||
130 | KABC::AddressBook *XXPortObject::addressBook() const | 130 | KABC::AddressBook *XXPortObject::addressBook() const |
131 | { | 131 | { |
132 | return mAddressBook; | 132 | return mAddressBook; |
133 | } | 133 | } |
134 | 134 | ||
135 | QWidget *XXPortObject::parentWidget() const | 135 | QWidget *XXPortObject::parentWidget() const |
136 | { | 136 | { |
137 | return mParentWidget; | 137 | return mParentWidget; |
138 | } | 138 | } |
139 | 139 | ||
140 | void XXPortObject::slotExportActivated( const QString &data ) | 140 | void XXPortObject::slotExportActivated( const QString &data ) |
141 | { | 141 | { |
142 | emit exportActivated( identifier(), ( data == "<empty>" ? QString::null : data ) ); | 142 | emit exportActivated( identifier(), ( data == "<empty>" ? QString::null : data ) ); |
143 | } | 143 | } |
144 | 144 | ||
145 | void XXPortObject::slotImportActivated( const QString &data ) | 145 | void XXPortObject::slotImportActivated( const QString &data ) |
146 | { | 146 | { |
147 | emit importActivated( identifier(), ( data == "<empty>" ? QString::null : data ) ); | 147 | emit importActivated( identifier(), ( data == "<empty>" ? QString::null : data ) ); |
148 | } | 148 | } |
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 |
151 | #include "xxportobject.moc" | 172 | #include "xxportobject.moc" |
152 | #endif //KAB_EMBEDDED | 173 | #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/xxportobject.h b/kaddressbook/xxportobject.h index fddc219..d547855 100644 --- a/kaddressbook/xxportobject.h +++ b/kaddressbook/xxportobject.h | |||
@@ -14,124 +14,157 @@ | |||
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef XXPORTOBJECT_H | 31 | #ifndef XXPORTOBJECT_H |
32 | #define XXPORTOBJECT_H | 32 | #define XXPORTOBJECT_H |
33 | 33 | ||
34 | #include <qobject.h> | 34 | #include <qobject.h> |
35 | 35 | ||
36 | #include <kabc/addressbook.h> | 36 | #include <kabc/addressbook.h> |
37 | #include <kabc/addresseelist.h> | 37 | #include <kabc/addresseelist.h> |
38 | #include <kabc/resource.h> | ||
38 | #include <kxmlguiclient.h> | 39 | #include <kxmlguiclient.h> |
39 | #include <klibloader.h> | 40 | #include <klibloader.h> |
40 | 41 | ||
41 | 42 | ||
43 | |||
44 | |||
45 | |||
42 | class XXPortObject : public QObject, virtual public KXMLGUIClient | 46 | class XXPortObject : public QObject, virtual public KXMLGUIClient |
43 | { | 47 | { |
44 | Q_OBJECT | 48 | Q_OBJECT |
45 | 49 | ||
46 | public: | 50 | public: |
47 | XXPortObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); | 51 | XXPortObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); |
48 | ~XXPortObject(); | 52 | ~XXPortObject(); |
49 | 53 | ||
50 | /** | 54 | /** |
51 | Returns the unique identifier of this xxport modul, it should | 55 | Returns the unique identifier of this xxport modul, it should |
52 | be the lowercase name of the import/export format e.g. 'vcard' | 56 | be the lowercase name of the import/export format e.g. 'vcard' |
53 | */ | 57 | */ |
54 | virtual QString identifier() const = 0; | 58 | virtual QString identifier() const = 0; |
55 | 59 | ||
56 | /** | 60 | /** |
57 | Reimplement this method if the XXPortManager shall | 61 | Reimplement this method if the XXPortManager shall |
58 | pass a sorted list to @ref exportContacts(). | 62 | pass a sorted list to @ref exportContacts(). |
59 | */ | 63 | */ |
60 | virtual bool requiresSorting() const { return false; } | 64 | virtual bool requiresSorting() const { return false; } |
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: |
63 | /** | 74 | /** |
64 | Reimplement this method for exporting the contacts. | 75 | Reimplement this method for exporting the contacts. |
65 | */ | 76 | */ |
66 | virtual bool exportContacts( const KABC::AddresseeList &list, const QString& identifier ); | 77 | virtual bool exportContacts( const KABC::AddresseeList &list, const QString& identifier ); |
67 | 78 | ||
68 | /** | 79 | /** |
69 | Reimplement this method for importing the contacts. | 80 | Reimplement this method for importing the contacts. |
70 | */ | 81 | */ |
71 | virtual KABC::AddresseeList importContacts( const QString& identifier ) const; | 82 | virtual KABC::AddresseeList importContacts( const QString& identifier ) const; |
72 | 83 | ||
73 | signals: | 84 | signals: |
74 | /** | 85 | /** |
75 | Emitted whenever the export action is activated. | 86 | Emitted whenever the export action is activated. |
76 | The parameter contains the @ref identifier() for | 87 | The parameter contains the @ref identifier() for |
77 | unique identification. | 88 | unique identification. |
78 | */ | 89 | */ |
79 | void exportActivated( const QString&, const QString& ); | 90 | void exportActivated( const QString&, const QString& ); |
80 | 91 | ||
81 | /** | 92 | /** |
82 | Emitted whenever the import action is activated. | 93 | Emitted whenever the import action is activated. |
83 | The parameter contains the @ref identifier() for | 94 | The parameter contains the @ref identifier() for |
84 | unique identification. | 95 | unique identification. |
85 | */ | 96 | */ |
86 | void importActivated( const QString&, const QString& ); | 97 | void importActivated( const QString&, const QString& ); |
87 | 98 | ||
88 | protected: | 99 | protected: |
89 | /** | 100 | /** |
90 | Create the import action. The identifier is passed in the import slot. | 101 | Create the import action. The identifier is passed in the import slot. |
91 | */ | 102 | */ |
92 | void createImportAction( const QString &label, const QString &identifier = QString::null ); | 103 | void createImportAction( const QString &label, const QString &identifier = QString::null ); |
93 | 104 | ||
94 | /** | 105 | /** |
95 | Create the export action. The identifier is passed in the export slot. | 106 | Create the export action. The identifier is passed in the export slot. |
96 | */ | 107 | */ |
97 | void createExportAction( const QString &label, const QString &identifier = QString::null ); | 108 | void createExportAction( const QString &label, const QString &identifier = QString::null ); |
98 | 109 | ||
99 | /** | 110 | /** |
100 | Returns a pointer to the address book object. | 111 | Returns a pointer to the address book object. |
101 | */ | 112 | */ |
102 | KABC::AddressBook *addressBook() const; | 113 | KABC::AddressBook *addressBook() const; |
103 | 114 | ||
104 | /** | 115 | /** |
105 | Returns a pointer to the parent widget. It can be used as parent for | 116 | Returns a pointer to the parent widget. It can be used as parent for |
106 | message boxes. | 117 | message boxes. |
107 | */ | 118 | */ |
108 | QWidget *parentWidget() const; | 119 | QWidget *parentWidget() const; |
109 | 120 | ||
110 | 121 | ||
111 | private slots: | 122 | private slots: |
112 | void slotImportActivated( const QString& ); | 123 | void slotImportActivated( const QString& ); |
113 | void slotExportActivated( const QString& ); | 124 | void slotExportActivated( const QString& ); |
114 | 125 | ||
115 | private: | 126 | private: |
116 | KABC::AddressBook *mAddressBook; | 127 | KABC::AddressBook *mAddressBook; |
117 | QWidget *mParentWidget; | 128 | QWidget *mParentWidget; |
118 | 129 | ||
119 | class XXPortObjectPrivate; | 130 | class XXPortObjectPrivate; |
120 | XXPortObjectPrivate *d; | 131 | XXPortObjectPrivate *d; |
121 | }; | 132 | }; |
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 |
124 | { | 157 | { |
125 | public: | 158 | public: |
126 | virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, | 159 | virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, |
127 | const char *name = 0 ) = 0; | 160 | const char *name = 0 ) = 0; |
128 | 161 | ||
129 | protected: | 162 | protected: |
130 | virtual QObject* createObject( QObject*, const char*, const char*, | 163 | virtual QObject* createObject( QObject*, const char*, const char*, |
131 | const QStringList & ) | 164 | const QStringList & ) |
132 | { | 165 | { |
133 | return 0; | 166 | return 0; |
134 | } | 167 | } |
135 | }; | 168 | }; |
136 | 169 | ||
137 | #endif | 170 | #endif |