summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-11-01 21:55:00 (UTC)
committer zautrix <zautrix>2004-11-01 21:55:00 (UTC)
commit71eeea80d9c449bd1983c1a9207c7123e919b55f (patch) (unidiff)
tree36e8bbd4901b4c1f8d566e529b7a31e08d93ec76
parent2340aa4fcce77bf99308f2b2848680138124f837 (diff)
downloadkdepimpi-71eeea80d9c449bd1983c1a9207c7123e919b55f.zip
kdepimpi-71eeea80d9c449bd1983c1a9207c7123e919b55f.tar.gz
kdepimpi-71eeea80d9c449bd1983c1a9207c7123e919b55f.tar.bz2
toolbar repaint fix for kapi
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kaddressbook/kabcore.cpp7
-rw-r--r--kaddressbook/kabcore.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 5037443..29688de 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,524 +1,524 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.12 ************ 3********** VERSION 1.9.12 ************
4 4
5Fix for the bug in KO/Pi What's Next view of version 1.9.11. 5Fix for the bug in KO/Pi What's Next view of version 1.9.11.
6 6
7Bugfix: Licence file is now shown again. 7Bugfix: Licence file is now shown again.
8 8
9OM/Pi now supports Unicode (utf8 charset). 9OM/Pi now supports Unicode (utf8 charset).
10Fixed some bugs in OM/Pi.
10 11
11Why a new release? 12KA/Pi has more German translation.
12Because of the two bugs.
13 13
14 14
15********** VERSION 1.9.11 ************ 15********** VERSION 1.9.11 ************
16 16
17Fixed several problems in PWM/Pi, like 17Fixed several problems in PWM/Pi, like
18asking the user, if unsaved changed are pending 18asking the user, if unsaved changed are pending
19when closing the app. 19when closing the app.
20And PwM/Pi handles now different texts for the 20And PwM/Pi handles now different texts for the
21fields Description, Username, Password, configurable per category. 21fields Description, Username, Password, configurable per category.
22 22
23Fixed a crash in KO/Pi , when importing/loading vcs files 23Fixed a crash in KO/Pi , when importing/loading vcs files
24which have an entry with an attendee with state: 24which have an entry with an attendee with state:
25NEEDS ACTION 25NEEDS ACTION
26 26
27Fixed some problems in the German translation of OM/Pi, 27Fixed some problems in the German translation of OM/Pi,
28which makes some dialogs not fitting on the screen 28which makes some dialogs not fitting on the screen
29of the Z 5500. 29of the Z 5500.
30 30
31Fixed Qtopia crash, when disabling/deinstalling 31Fixed Qtopia crash, when disabling/deinstalling
32KO/Pi alarm applet. 32KO/Pi alarm applet.
33 33
34Implemented direct KDE<->KA/Pi sync for KA/Pi running 34Implemented direct KDE<->KA/Pi sync for KA/Pi running
35on Linux desktop. 35on Linux desktop.
36 36
37Added feature "remove sync info" to sync menu. 37Added feature "remove sync info" to sync menu.
38 38
39Tweaked the KO/Pi What's next view a bit, added 39Tweaked the KO/Pi What's next view a bit, added
40setting to hide events that are done. 40setting to hide events that are done.
41 41
42Disabled "beam receive enabled" on startup to 42Disabled "beam receive enabled" on startup to
43avoid problems if Fastload is enabled. 43avoid problems if Fastload is enabled.
44Please set "beam receive enabled", 44Please set "beam receive enabled",
45if you want to receive data via IR. 45if you want to receive data via IR.
46 46
47Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 47Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
48on Linux desktop. 48on Linux desktop.
49 49
50Made in KA/Pi scrolling possible, if details view is selected. 50Made in KA/Pi scrolling possible, if details view is selected.
51(The keyboard focus is set automatically to the search line) 51(The keyboard focus is set automatically to the search line)
52 52
53Fixed a bug in DMT sync, that a new entry in DTM was added 53Fixed a bug in DMT sync, that a new entry in DTM was added
54on every sync to Kx/Pi. 54on every sync to Kx/Pi.
55 55
56Fixed missing writing of KA/Pi categories to DMT entries when syncing. 56Fixed missing writing of KA/Pi categories to DMT entries when syncing.
57 57
58Fixed a bug in DMT sync with todos created in KO/Pi containing 58Fixed a bug in DMT sync with todos created in KO/Pi containing
59non-latin1 characters. 59non-latin1 characters.
60 60
61Rearranged package contents of Sharp-ipks and made all 61Rearranged package contents of Sharp-ipks and made all
62packages installable on SD again. 62packages installable on SD again.
63 63
64Fixed the writing of addressbook data in DTM sync. 64Fixed the writing of addressbook data in DTM sync.
65Empty fields in KA/Pi were not removed. 65Empty fields in KA/Pi were not removed.
66 66
67Added better category handling in KA/Pi: 67Added better category handling in KA/Pi:
68Added item 68Added item
69Edit Categories and 69Edit Categories and
70Manage new categories 70Manage new categories
71to the settings menu. 71to the settings menu.
72Possible to configure a view to display categories. 72Possible to configure a view to display categories.
73 73
74Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 74Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
75 75
76Fixed displaying of "free" days and time in KO Monthview and Agendaview. 76Fixed displaying of "free" days and time in KO Monthview and Agendaview.
77 77
78... and many other bugfixes. 78... and many other bugfixes.
79 79
80********** VERSION 1.9.10 ************ 80********** VERSION 1.9.10 ************
81 81
82Many internal small bugfixes. 82Many internal small bugfixes.
83And fix of the "big" bug in KO/Pi, 83And fix of the "big" bug in KO/Pi,
84that after Syncing the appointments had an offset by several hours. 84that after Syncing the appointments had an offset by several hours.
85That was a problem with the internal timezone setting, 85That was a problem with the internal timezone setting,
86introduced by the changed timezone configuration settings. 86introduced by the changed timezone configuration settings.
87 87
88German translation for OM/Pi is now available. 88German translation for OM/Pi is now available.
89 89
90 90
91********** VERSION 1.9.9 ************ 91********** VERSION 1.9.9 ************
92 92
93KDE-Pim/Pi has a new Member! 93KDE-Pim/Pi has a new Member!
94It is called PWM/Pi (Passwordmanager/platform-independent) 94It is called PWM/Pi (Passwordmanager/platform-independent)
95and it is available for the Zaurus. 95and it is available for the Zaurus.
96It is planned, that it will be available later for Windows. 96It is planned, that it will be available later for Windows.
97(And for Linux, of course). 97(And for Linux, of course).
98It is a port of the Passwordmanager of KDE. 98It is a port of the Passwordmanager of KDE.
99It will need the MicroKDElibs to run. 99It will need the MicroKDElibs to run.
100 100
101Made loading of addressbooks in KA/Pi up to 7 times faster! 101Made loading of addressbooks in KA/Pi up to 7 times faster!
102The bigger your addressbook file, the more starting speed 102The bigger your addressbook file, the more starting speed
103will you gain. (relatively) 103will you gain. (relatively)
104 104
105The Qtopia addressbook connector is now platform independend 105The Qtopia addressbook connector is now platform independend
106as well and should work on any platform for importing/exporting 106as well and should work on any platform for importing/exporting
107Qtopia and Opie XML files. 107Qtopia and Opie XML files.
108 108
109Added a +30min feature to the timezone settings to make 109Added a +30min feature to the timezone settings to make
110KDE-Pim/Pi useable in Australia and other parts on the 110KDE-Pim/Pi useable in Australia and other parts on the
111world with strange timezones ;-) 111world with strange timezones ;-)
112 112
113German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 113German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
114 114
115It is now possible to disable the 115It is now possible to disable the
116"receive data via infrared" feature, such that syncing with 116"receive data via infrared" feature, such that syncing with
117Outlook is now possible again with Kx/Pi runing. 117Outlook is now possible again with Kx/Pi runing.
118Please disable it, before syncing Sharp DTM with Outlook. 118Please disable it, before syncing Sharp DTM with Outlook.
119For your convenience, the "receive data via infrared" feature 119For your convenience, the "receive data via infrared" feature
120is disabled automatically, if you sync Kx/Pi with DTM. 120is disabled automatically, if you sync Kx/Pi with DTM.
121You have to enable it again manually after syncing. 121You have to enable it again manually after syncing.
122Enabling this feature makes it impossible to start the 122Enabling this feature makes it impossible to start the
123Sharp DTM apps. If this feature is enabled, you will only get the 123Sharp DTM apps. If this feature is enabled, you will only get the
124alarm notification from KO/Pi and not from the Sharp calendar. 124alarm notification from KO/Pi and not from the Sharp calendar.
125This is very useful if you sync KO/Pi with Sharp DTM, 125This is very useful if you sync KO/Pi with Sharp DTM,
126because after syncing you usually would get notified about 126because after syncing you usually would get notified about
127an alarm by KO/Pi and the Sharp Calendar. 127an alarm by KO/Pi and the Sharp Calendar.
128 128
129Together with the Linux desktop version of KO/Pi 129Together with the Linux desktop version of KO/Pi
130it is now possible to sync KO/Pi on the Zaurus 130it is now possible to sync KO/Pi on the Zaurus
131with the complete KDE-desktop (3.3 or later) 131with the complete KDE-desktop (3.3 or later)
132calendar data easily. 132calendar data easily.
133That makes it possible to sync the Z with one 133That makes it possible to sync the Z with one
134click of a mouse with the KDE-Desktop. 134click of a mouse with the KDE-Desktop.
135This feature it available for all Zaurus platforms KO/Pi 135This feature it available for all Zaurus platforms KO/Pi
136is running on. 136is running on.
137The only thing needed is a running KO/Pi on Linux and 137The only thing needed is a running KO/Pi on Linux and
138a compiled version of the small 138a compiled version of the small
139KDE-Pim/Pi<->KDE-Desktop access command line program, 139KDE-Pim/Pi<->KDE-Desktop access command line program,
140which is in the KDE-Pim/Pi sources available. 140which is in the KDE-Pim/Pi sources available.
141 141
142The "KDE-desktop" syncing feature for KA/Pi will follow 142The "KDE-desktop" syncing feature for KA/Pi will follow
143in the next releases. 143in the next releases.
144 144
145Fixed the vcard export bug, which had the version 1.9.8. 145Fixed the vcard export bug, which had the version 1.9.8.
146 146
147Added missing GERMAN translation to KO/Pi. 147Added missing GERMAN translation to KO/Pi.
148Hi PsionX, could you add the missing french translation?Thx! 148Hi PsionX, could you add the missing french translation?Thx!
149 149
150Translation files for KA/Pi are available as well. 150Translation files for KA/Pi are available as well.
151GERMAN translation will be available in the next release. 151GERMAN translation will be available in the next release.
152PsionX ( yres, you again ;-) ), could you start translating 152PsionX ( yres, you again ;-) ), could you start translating
153KA/Pi? Thx! 153KA/Pi? Thx!
154 154
155You can download the version 1.9.9 at 155You can download the version 1.9.9 at
156 156
157http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 157http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
158 158
159Note: 159Note:
160To run the mail program OM/Pi you need libopenssl. 160To run the mail program OM/Pi you need libopenssl.
161A link to a download loaction is available at 161A link to a download loaction is available at
162ZSI at www.killefiz.de 162ZSI at www.killefiz.de
163 163
164 164
165********** VERSION 1.9.8 ************ 165********** VERSION 1.9.8 ************
166 166
167Fixed character decoding in OM/Pi. 167Fixed character decoding in OM/Pi.
168(e.g. German "Umlaute" were not displayed properly.) 168(e.g. German "Umlaute" were not displayed properly.)
169 169
170Made is possible to reparent todos in KO/Pi. 170Made is possible to reparent todos in KO/Pi.
171Use contextmenu or keys (look at Help-Keys + Colors) for that. 171Use contextmenu or keys (look at Help-Keys + Colors) for that.
172 172
173Added the missing Sync-Howto and WhatsNew to the packages. 173Added the missing Sync-Howto and WhatsNew to the packages.
174 174
175KO/Pi on Linux desktop can now sync with KDE desktop. 175KO/Pi on Linux desktop can now sync with KDE desktop.
176That means: When using KO/Pi on Linux desktop for syncing with 176That means: When using KO/Pi on Linux desktop for syncing with
177KDE desktop and the Zaurus, the Zaurus can be synced now 177KDE desktop and the Zaurus, the Zaurus can be synced now
178with all KDE-Calendar resources, not only with one local file. 178with all KDE-Calendar resources, not only with one local file.
179(That makes it possible to sync the Zaurus with the 179(That makes it possible to sync the Zaurus with the
180calendar data on a Kolab server) 180calendar data on a Kolab server)
181 181
182KA/Pi syncing with KDE desktop will be available in the next version. 182KA/Pi syncing with KDE desktop will be available in the next version.
183 183
184 184
185********** VERSION 1.9.7 ************ 185********** VERSION 1.9.7 ************
186 186
187KO/Pi - KA/Pi on Windows: 187KO/Pi - KA/Pi on Windows:
188Now a directory can be defined by the user, where the 188Now a directory can be defined by the user, where the
189application/config data should be saved. 189application/config data should be saved.
190 Define your desired path in the evironment variable 190 Define your desired path in the evironment variable
191 MICROKDEHOME 191 MICROKDEHOME
192 before starting KO/Pi or KA/Pi. 192 before starting KO/Pi or KA/Pi.
193 193
194An easy Kx/Pi to Kx/Pi syncing is now possible 194An easy Kx/Pi to Kx/Pi syncing is now possible
195(it is called Pi-Sync) via network. 195(it is called Pi-Sync) via network.
196Please look at the Sync Howto. 196Please look at the Sync Howto.
197 197
198Exporting of calendar data and contacts to mobile phones is now possible. 198Exporting of calendar data and contacts to mobile phones is now possible.
199The SyncHowto is updated with information howto 199The SyncHowto is updated with information howto
200access/sync mobile phones. 200access/sync mobile phones.
201Please look at the Sync Howto. 201Please look at the Sync Howto.
202 202
203Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 203Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
204Please disable Fastload for the original contact/calendar applications 204Please disable Fastload for the original contact/calendar applications
205and close them. 205and close them.
206KO/Pi and KA/Pi must be running in order to receive the data. 206KO/Pi and KA/Pi must be running in order to receive the data.
207(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 207(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
208 208
209In the KA/Pi details view are now the preferred tel. numbers displayed on top 209In the KA/Pi details view are now the preferred tel. numbers displayed on top
210of the other data ( emails/tel.numbers/addresses) 210of the other data ( emails/tel.numbers/addresses)
211 211
212Fixed some syncing problems in KA/Pi. 212Fixed some syncing problems in KA/Pi.
213 213
214Added font settings for the KA/Pi details view. 214Added font settings for the KA/Pi details view.
215Added fields "children's name" and "gender" to KA/Pi. 215Added fields "children's name" and "gender" to KA/Pi.
216 216
217Made searching in KA/Pi better: 217Made searching in KA/Pi better:
218Now the first item in a view is selected after a search automatically and 218Now the first item in a view is selected after a search automatically and
219the views can be scrolled up/down when the search input field has the keyboard focus. 219the views can be scrolled up/down when the search input field has the keyboard focus.
220 220
221And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 221And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
222 222
223 223
224********** VERSION 1.9.6 ************ 224********** VERSION 1.9.6 ************
225 225
226Changes in the external application communication on the Zaurus 226Changes in the external application communication on the Zaurus
227in order to use less RAM when the apps are running. 227in order to use less RAM when the apps are running.
228First syncing of addressbooks (KA/Pi) is possible. 228First syncing of addressbooks (KA/Pi) is possible.
229 229
230 230
231********** VERSION 1.9.5a ************ 231********** VERSION 1.9.5a ************
232 232
233Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 233Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
234Fixed some small bugs. 234Fixed some small bugs.
235KA/Pi shows now the birthday in summary view. 235KA/Pi shows now the birthday in summary view.
236Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 236Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
237for displaying dates. 237for displaying dates.
238 238
239 239
240********** VERSION 1.9.5 ************ 240********** VERSION 1.9.5 ************
241 241
242There is still no Addressbook syncing! 242There is still no Addressbook syncing!
243 243
244New in 1.9.5: 244New in 1.9.5:
245 245
246Many bugfixes. 246Many bugfixes.
247Better searching in KA/Pi. 247Better searching in KA/Pi.
248You can configure in KA/Pi if you want to search only after 248You can configure in KA/Pi if you want to search only after
249<return> key pressed. 249<return> key pressed.
250 250
251Better mail downloading in OM/Pi. 251Better mail downloading in OM/Pi.
252 252
253First experimental alpha version of sync of KO/Pi with mobile phones. 253First experimental alpha version of sync of KO/Pi with mobile phones.
254See gammu documentation for supported phones. 254See gammu documentation for supported phones.
255You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. 255You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp.
256Quick hint how to use: 256Quick hint how to use:
257NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 257NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
258Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 258Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
259Create syncprofile - mobile device 259Create syncprofile - mobile device
260Remove entry for model. (Leave empty ). 260Remove entry for model. (Leave empty ).
261Enable infrared on Zaurus and your Phone. 261Enable infrared on Zaurus and your Phone.
262Sync. 262Sync.
263To get a more detailed log, start kopi from konsole. 263To get a more detailed log, start kopi from konsole.
264 264
265********** VERSION 1.9.4 ************ 265********** VERSION 1.9.4 ************
266 266
267This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 267This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
268 268
269WARNING: 269WARNING:
270PLEASE BACKUP ALL YOUR DATA! 270PLEASE BACKUP ALL YOUR DATA!
271We have changed a lot and maybe there are some unknown problems. 271We have changed a lot and maybe there are some unknown problems.
272 272
273SYNC HANDLING HAS CHANGED! 273SYNC HANDLING HAS CHANGED!
274Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 274Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
275(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 275(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
276 276
277You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 277You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
278If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. 278If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well.
279 279
280As programs are available: 280As programs are available:
281KO/Pi (korganizer ipk) - a calendar program. 281KO/Pi (korganizer ipk) - a calendar program.
282KA/Pi (kaddressbook ipk ) - an addressbook 282KA/Pi (kaddressbook ipk ) - an addressbook
283OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 283OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
284 284
285An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 285An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
286(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 286(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
287 287
288All the applications are installed in a "Pim" TAB. 288All the applications are installed in a "Pim" TAB.
289If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk 289If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk
290 290
291All the application are integrated. 291All the application are integrated.
292Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. 292Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail.
293 293
294HINT: 294HINT:
295If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 295If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
296 296
297What's new? 297What's new?
298 298
299SYNC HANDLING HAS CHANGED! 299SYNC HANDLING HAS CHANGED!
300Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 300Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
301(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 301(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
302 302
303New in OM/Pi: 303New in OM/Pi:
304When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. 304When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails.
305 305
306New in KO/Pi: 306New in KO/Pi:
307French is now available for KO/Pi. 307French is now available for KO/Pi.
308Choose menu:Actions - Configure:TAB locale 308Choose menu:Actions - Configure:TAB locale
309Syncing has changed. 309Syncing has changed.
310Phone sync available soon. 310Phone sync available soon.
311Not much changes, I cannot remember them ... 311Not much changes, I cannot remember them ...
312 312
313New in KA/Pi: 313New in KA/Pi:
314Beaming possible. 314Beaming possible.
315Sharp DTM readonly access possible( create a new DTM resource ); 315Sharp DTM readonly access possible( create a new DTM resource );
316Better searching possible. 316Better searching possible.
317Search is performed only after pressing the return key. 317Search is performed only after pressing the return key.
318Use wildcard * to specify parts of a name. 318Use wildcard * to specify parts of a name.
319 319
320Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . 320Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * .
321 321
322A big improvement is the new management of the contact access. 322A big improvement is the new management of the contact access.
323In version 1.9.3, every application was using their own addressbook access data. 323In version 1.9.3, every application was using their own addressbook access data.
324That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 324That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
325That was wasting of memory, if you had several hundreds of contacts. 325That was wasting of memory, if you had several hundreds of contacts.
326 326
327Now only KA/Pi accesses the addressbook. 327Now only KA/Pi accesses the addressbook.
328If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. 328If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them.
329If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 329If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
330That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 330That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
331 331
332New in the KO/Pi alarm applet: 332New in the KO/Pi alarm applet:
333Configure your own timer popup menu! 333Configure your own timer popup menu!
334(Text and minutes for timer countdown) 334(Text and minutes for timer countdown)
335Just edit the file 335Just edit the file
336(yourhomedir)/.kopialarmtimerrc 336(yourhomedir)/.kopialarmtimerrc
337and start/stop a timer to get a new menu with the data of this file. 337and start/stop a timer to get a new menu with the data of this file.
338 338
339********** VERSION 1.9.3 ************ 339********** VERSION 1.9.3 ************
3401) 3401)
341Now KO/Pi on Windows imports directly the calendar data of 341Now KO/Pi on Windows imports directly the calendar data of
342an installed Outlook. Should work with OL version >= 2000. 342an installed Outlook. Should work with OL version >= 2000.
343 343
344********** VERSION 1.9.2 ************ 344********** VERSION 1.9.2 ************
3451) 3451)
346KDE-Pim/Pi has got a new member: 346KDE-Pim/Pi has got a new member:
347KmicroMail (KM/Pi) is a mail program, 347KmicroMail (KM/Pi) is a mail program,
348which can handle IMAP and POP mail access. 348which can handle IMAP and POP mail access.
349It is based on Opie-Mail v3. 349It is based on Opie-Mail v3.
350All dependencies to the Opie libraries ar removed, 350All dependencies to the Opie libraries ar removed,
351such that no additional Opie lib is needed. 351such that no additional Opie lib is needed.
352It is already integrated in KO/Pi and KA/Pi. 352It is already integrated in KO/Pi and KA/Pi.
353It it now available for the Zaurus,probably it 353It it now available for the Zaurus,probably it
354will be available for other platforms later. 354will be available for other platforms later.
355Hint: 355Hint:
356Create your own contact (name + email) 356Create your own contact (name + email)
357in KA/Pi, select this contact and choose menu: 357in KA/Pi, select this contact and choose menu:
358Settings - Set Who Am I. 358Settings - Set Who Am I.
359Now the settings of this contact are used as 359Now the settings of this contact are used as
360the sender data in KM/Pi. 360the sender data in KM/Pi.
3612) 3612)
362KDE-Pim/Pi is split up in five different 362KDE-Pim/Pi is split up in five different
363packages now precompiled for Sharp Zaurus: 363packages now precompiled for Sharp Zaurus:
364--kmicrokdelibs_1.9.2_arm.ipk 364--kmicrokdelibs_1.9.2_arm.ipk
365The libs are needed for any 365The libs are needed for any
366of the following programs: 366of the following programs:
367--kaddressbook_1.9.2_arm.ipk 367--kaddressbook_1.9.2_arm.ipk
368--kmicromail_1.9.2_arm.ipk 368--kmicromail_1.9.2_arm.ipk
369--korganizer_1.9.2_arm.ipk 369--korganizer_1.9.2_arm.ipk
370Independ from that, there is the alarm applet 370Independ from that, there is the alarm applet
371available for KO/Pi, which also offers 371available for KO/Pi, which also offers
372quick access for a new mail or 372quick access for a new mail or
373showing the addressbook.: 373showing the addressbook.:
374--korganizer-alarm_1.9.2_arm.ipk 374--korganizer-alarm_1.9.2_arm.ipk
375Independend means, that the alarm applet 375Independend means, that the alarm applet
376does not need any of the libs or programs above to run. 376does not need any of the libs or programs above to run.
377But it would be quite useless without these programs. 377But it would be quite useless without these programs.
378NOTE: 378NOTE:
379If you get a 379If you get a
380"This application depends on other programs" 380"This application depends on other programs"
381during installation of 381during installation of
382--kmicrokdelibs_1.9.2_arm.ipk 382--kmicrokdelibs_1.9.2_arm.ipk
383you probably do not have to care about that. 383you probably do not have to care about that.
384kmicrokdelibs_1.9.2 will come with some 384kmicrokdelibs_1.9.2 will come with some
385resource plugins, which needs additional libraries. 385resource plugins, which needs additional libraries.
386(E.g. libopie1, if you want to use the 386(E.g. libopie1, if you want to use the
387opie resource connector in KA/Pi). 387opie resource connector in KA/Pi).
388If you do not have this libraries installed, 388If you do not have this libraries installed,
389you simply cannot use the resource. 389you simply cannot use the resource.
390To make it clear: 390To make it clear:
391If the libraries are missing, the applications 391If the libraries are missing, the applications
392using kmicrokdelibs will start, 392using kmicrokdelibs will start,
393because the resources are plugins. 393because the resources are plugins.
3943) 3943)
395KO/Pi and friends are now installable on SD-Card! 395KO/Pi and friends are now installable on SD-Card!
396It is recommended to install all libs and apps 396It is recommended to install all libs and apps
397on the SD card or all in the internal storage. 397on the SD card or all in the internal storage.
398There may be problems, if this is mixed. 398There may be problems, if this is mixed.
3994) 3994)
400Fixed two bugs in the alarm notification on Windows. 400Fixed two bugs in the alarm notification on Windows.
4015) 4015)
402Great improvement! 402Great improvement!
403KO/Pi uses now the latest version of libical. 403KO/Pi uses now the latest version of libical.
404Libical is the library which actually reads 404Libical is the library which actually reads
405the calendar files and extract the data from it. 405the calendar files and extract the data from it.
406With the old version, there were problems 406With the old version, there were problems
407(crashes or program hangs) when licical did read 407(crashes or program hangs) when licical did read
408files, which were not stored from KO/Pi. 408files, which were not stored from KO/Pi.
409I do not know, if the new libical works perfect, 409I do not know, if the new libical works perfect,
410but actually it works much better than 410but actually it works much better than
411the old version. 411the old version.
412There are no problems with compatibility with 412There are no problems with compatibility with
413old calendar files of KO/Pi, of course! 413old calendar files of KO/Pi, of course!
4146) 4146)
415New in KA/Pi: 415New in KA/Pi:
416Opie addressbook resource connector available! 416Opie addressbook resource connector available!
417You will need libopie1 and the opie addressbook, 417You will need libopie1 and the opie addressbook,
418of course. 418of course.
419With the Opie addressbook resource connector, 419With the Opie addressbook resource connector,
420you can access the Opie addressbook readonly in KA/Pi. 420you can access the Opie addressbook readonly in KA/Pi.
421If you want to edit or import the data into KA/Pi, 421If you want to edit or import the data into KA/Pi,
422do this: 422do this:
423a) Create an Opie resource. 423a) Create an Opie resource.
424 (Menu: Settings-Configure Resources). 424 (Menu: Settings-Configure Resources).
425After configuration and restarting KA/Pi you should see 425After configuration and restarting KA/Pi you should see
426the Opie contacts in KA/Pi. 426the Opie contacts in KA/Pi.
427b) Select some or all Opie contacts. 427b) Select some or all Opie contacts.
428(NOTE: +++++ 428(NOTE: +++++
429To know exactly, what contacts are Opie contacts, 429To know exactly, what contacts are Opie contacts,
430do this: Choose menu: 430do this: Choose menu:
431View-Modify View - TAB Fields. 431View-Modify View - TAB Fields.
432Select in the above list "Resource" and click 432Select in the above list "Resource" and click
433down arrow to add it to the "Selected fields". 433down arrow to add it to the "Selected fields".
434Click OK. 434Click OK.
435Now you have a new column "Resource" in your list, 435Now you have a new column "Resource" in your list,
436where you can see, what an Opie resource is. 436where you can see, what an Opie resource is.
437++++ NOTE end.) 437++++ NOTE end.)
438Ok, we do have now some Opie contacts seleted. 438Ok, we do have now some Opie contacts seleted.
439(Use SHIFT or CTRL key in order to multiple select). 439(Use SHIFT or CTRL key in order to multiple select).
440c) Choose menu: Edit-Copy. 440c) Choose menu: Edit-Copy.
441d) Choose menu: Edit-Paste. 441d) Choose menu: Edit-Paste.
442e) Select the resource, you want to add the contacts to. 442e) Select the resource, you want to add the contacts to.
443Congrats! Now you have read/write access to the copied 443Congrats! Now you have read/write access to the copied
444opie contacts as "real" KA/Pi contacts. 444opie contacts as "real" KA/Pi contacts.
445 445
446 446
447********** VERSION 1.9.1 ************ 447********** VERSION 1.9.1 ************
4481) 4481)
449 +++ IMPORTANT 1 +++ 449 +++ IMPORTANT 1 +++
450 450
451The storing place of the default calendar 451The storing place of the default calendar
452file has changed! 452file has changed!
453The default calendar file was 453The default calendar file was
454Applications/korganizer/mycalendar.ics 454Applications/korganizer/mycalendar.ics
455on Zaurus and 455on Zaurus and
456(yourHomeDir)/korganizer/mycalendar.ics 456(yourHomeDir)/korganizer/mycalendar.ics
457on Windows/Linux desktop. Now it is 457on Windows/Linux desktop. Now it is
458(yourHomeDir)/kdepim/korganizer/mycalendar.ics 458(yourHomeDir)/kdepim/korganizer/mycalendar.ics
459on Zaurus, Windows and Linux. 459on Zaurus, Windows and Linux.
460To load the old file, choose menu 460To load the old file, choose menu
461File-Load calendar backup. 461File-Load calendar backup.
462(It should be loaded automatically 462(It should be loaded automatically
463at startup with a warning message displayed). 463at startup with a warning message displayed).
464The place of the configuration file has changed too. 464The place of the configuration file has changed too.
465If you want to use your old KO/Pi config, 465If you want to use your old KO/Pi config,
466copy it to 466copy it to
467(yourHomeDir)/kdepim/config/korganizerrc 467(yourHomeDir)/kdepim/config/korganizerrc
468Please read VERSION 1.9.0 - topic 3) as well! 468Please read VERSION 1.9.0 - topic 3) as well!
469 469
470 +++ IMPORTANT 2 +++ 470 +++ IMPORTANT 2 +++
471 471
472Because of the new paths, you will need 472Because of the new paths, you will need
473a new version of the KO/Pi alarm applet 473a new version of the KO/Pi alarm applet
474for Zaurus. 474for Zaurus.
475Use version >= 1.9.1 475Use version >= 1.9.1
476 476
4772) 4772)
478Now the QWhat'sThis Icon works for items 478Now the QWhat'sThis Icon works for items
479in the month view as well. 479in the month view as well.
480(See VERSION 1.7.8 Topic 1) ). 480(See VERSION 1.7.8 Topic 1) ).
4813) 4813)
482You can import birtsdays/anniversaries 482You can import birtsdays/anniversaries
483from KA/Pi into KO/Pi. 483from KA/Pi into KO/Pi.
484Choose menu File-Import birthdays. 484Choose menu File-Import birthdays.
485If you import twice, already imported items 485If you import twice, already imported items
486will not be imported again, if they 486will not be imported again, if they
487have not been changed in KO/Pi. 487have not been changed in KO/Pi.
4884) 4884)
489When syncing with sharp DTM, now a progress 489When syncing with sharp DTM, now a progress
490is shown, when the data is written back. 490is shown, when the data is written back.
491If there is much data in KO/Pi and no data 491If there is much data in KO/Pi and no data
492in DTM, that can take a long time. 492in DTM, that can take a long time.
493(But only for the first time ). 493(But only for the first time ).
4945) 4945)
495In the search dialog, you can search 495In the search dialog, you can search
496now for the name/email of an attendee 496now for the name/email of an attendee
497of an event/todo. 497of an event/todo.
498To get more space for displaying 498To get more space for displaying
499search results, the buttons 499search results, the buttons
500for "search" and "close" on the 500for "search" and "close" on the
501bottom are removed in the PDA version. 501bottom are removed in the PDA version.
502You have to click OK in the top right 502You have to click OK in the top right
503corner to do a search. 503corner to do a search.
5046) 5046)
505Now it is possible to disable the displaying 505Now it is possible to disable the displaying
506of todo items in the Allday part of the Agenda. 506of todo items in the Allday part of the Agenda.
507Choose Menu Action-Configure, 507Choose Menu Action-Configure,
508TAB Todo View, checkbox 508TAB Todo View, checkbox
509"Allday Agenda view shows todos" 509"Allday Agenda view shows todos"
5107) 5107)
511If FastLoad is enabled, now the settings and the 511If FastLoad is enabled, now the settings and the
512calendar data are saved, when KO/Pi is closed. 512calendar data are saved, when KO/Pi is closed.
513(If no Fastload is enabled, KO/Pi saves 513(If no Fastload is enabled, KO/Pi saves
514the data as well, of course) 514the data as well, of course)
5158) 5158)
516The Agenda View has a minimize-splitter now, 516The Agenda View has a minimize-splitter now,
517such that the height of the allday part can be 517such that the height of the allday part can be
518changed quickly. 518changed quickly.
519 519
520********** VERSION 1.9.0 ************ 520********** VERSION 1.9.0 ************
5211) 5211)
522KO/Pi is now merged with the new microKDE from KA/Pi. 522KO/Pi is now merged with the new microKDE from KA/Pi.
523KO/Pi accesses now KA/Pi as the addressbook. 523KO/Pi accesses now KA/Pi as the addressbook.
524The other ddressbook-plugins are not working any longer. 524The other ddressbook-plugins are not working any longer.
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 4445310..d651224 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1,873 +1,880 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
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/*s 24/*s
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include "kabcore.h" 31#include "kabcore.h"
32 32
33#include <stdaddressbook.h> 33#include <stdaddressbook.h>
34#include <klocale.h> 34#include <klocale.h>
35#include <kfiledialog.h> 35#include <kfiledialog.h>
36#include <qtimer.h> 36#include <qtimer.h>
37#include <qlabel.h> 37#include <qlabel.h>
38#include <qregexp.h> 38#include <qregexp.h>
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qcheckbox.h> 40#include <qcheckbox.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qprogressbar.h> 42#include <qprogressbar.h>
43#include <libkdepim/phoneaccess.h> 43#include <libkdepim/phoneaccess.h>
44 44
45#ifndef KAB_EMBEDDED 45#ifndef KAB_EMBEDDED
46#include <qclipboard.h> 46#include <qclipboard.h>
47#include <qdir.h> 47#include <qdir.h>
48#include <qfile.h> 48#include <qfile.h>
49#include <qapplicaton.h> 49#include <qapplicaton.h>
50#include <qprogressbar.h> 50#include <qprogressbar.h>
51#include <qlayout.h> 51#include <qlayout.h>
52#include <qregexp.h> 52#include <qregexp.h>
53#include <qvbox.h> 53#include <qvbox.h>
54#include <kabc/addresseelist.h> 54#include <kabc/addresseelist.h>
55#include <kabc/errorhandler.h> 55#include <kabc/errorhandler.h>
56#include <kabc/resource.h> 56#include <kabc/resource.h>
57#include <kabc/vcardconverter.h> 57#include <kabc/vcardconverter.h>
58#include <kapplication.h> 58#include <kapplication.h>
59#include <kactionclasses.h> 59#include <kactionclasses.h>
60#include <kcmultidialog.h> 60#include <kcmultidialog.h>
61#include <kdebug.h> 61#include <kdebug.h>
62#include <kdeversion.h> 62#include <kdeversion.h>
63#include <kkeydialog.h> 63#include <kkeydialog.h>
64#include <kmessagebox.h> 64#include <kmessagebox.h>
65#include <kprinter.h> 65#include <kprinter.h>
66#include <kprotocolinfo.h> 66#include <kprotocolinfo.h>
67#include <kresources/selectdialog.h> 67#include <kresources/selectdialog.h>
68#include <kstandarddirs.h> 68#include <kstandarddirs.h>
69#include <ktempfile.h> 69#include <ktempfile.h>
70#include <kxmlguiclient.h> 70#include <kxmlguiclient.h>
71#include <kaboutdata.h> 71#include <kaboutdata.h>
72#include <libkdepim/categoryselectdialog.h> 72#include <libkdepim/categoryselectdialog.h>
73 73
74#include "addresseeutil.h" 74#include "addresseeutil.h"
75#include "addresseeeditordialog.h" 75#include "addresseeeditordialog.h"
76#include "extensionmanager.h" 76#include "extensionmanager.h"
77#include "kstdaction.h" 77#include "kstdaction.h"
78#include "kaddressbookservice.h" 78#include "kaddressbookservice.h"
79#include "ldapsearchdialog.h" 79#include "ldapsearchdialog.h"
80#include "printing/printingwizard.h" 80#include "printing/printingwizard.h"
81#else // KAB_EMBEDDED 81#else // KAB_EMBEDDED
82 82
83#include <kapplication.h> 83#include <kapplication.h>
84#include "KDGanttMinimizeSplitter.h" 84#include "KDGanttMinimizeSplitter.h"
85#include "kaddressbookmain.h" 85#include "kaddressbookmain.h"
86#include "kactioncollection.h" 86#include "kactioncollection.h"
87#include "addresseedialog.h" 87#include "addresseedialog.h"
88//US 88//US
89#include <addresseeview.h> 89#include <addresseeview.h>
90 90
91#include <qapp.h> 91#include <qapp.h>
92#include <qmenubar.h> 92#include <qmenubar.h>
93//#include <qtoolbar.h> 93//#include <qtoolbar.h>
94#include <qmessagebox.h> 94#include <qmessagebox.h>
95#include <kdebug.h> 95#include <kdebug.h>
96#include <kiconloader.h> // needed for SmallIcon 96#include <kiconloader.h> // needed for SmallIcon
97#include <kresources/kcmkresources.h> 97#include <kresources/kcmkresources.h>
98#include <ktoolbar.h> 98#include <ktoolbar.h>
99 99
100 100
101//#include <qlabel.h> 101//#include <qlabel.h>
102 102
103 103
104#ifndef DESKTOP_VERSION 104#ifndef DESKTOP_VERSION
105#include <qpe/ir.h> 105#include <qpe/ir.h>
106#include <qpe/qpemenubar.h> 106#include <qpe/qpemenubar.h>
107#include <qtopia/qcopenvelope_qws.h> 107#include <qtopia/qcopenvelope_qws.h>
108#else 108#else
109 109
110#include <qmenubar.h> 110#include <qmenubar.h>
111#endif 111#endif
112 112
113#endif // KAB_EMBEDDED 113#endif // KAB_EMBEDDED
114#include "kcmconfigs/kcmkabconfig.h" 114#include "kcmconfigs/kcmkabconfig.h"
115#include "kcmconfigs/kcmkdepimconfig.h" 115#include "kcmconfigs/kcmkdepimconfig.h"
116#include "kpimglobalprefs.h" 116#include "kpimglobalprefs.h"
117#include "externalapphandler.h" 117#include "externalapphandler.h"
118 118
119 119
120#include <kresources/selectdialog.h> 120#include <kresources/selectdialog.h>
121#include <kmessagebox.h> 121#include <kmessagebox.h>
122 122
123#include <picture.h> 123#include <picture.h>
124#include <resource.h> 124#include <resource.h>
125 125
126//US#include <qsplitter.h> 126//US#include <qsplitter.h>
127#include <qmap.h> 127#include <qmap.h>
128#include <qdir.h> 128#include <qdir.h>
129#include <qfile.h> 129#include <qfile.h>
130#include <qvbox.h> 130#include <qvbox.h>
131#include <qlayout.h> 131#include <qlayout.h>
132#include <qclipboard.h> 132#include <qclipboard.h>
133#include <qtextstream.h> 133#include <qtextstream.h>
134#include <qradiobutton.h> 134#include <qradiobutton.h>
135#include <qbuttongroup.h> 135#include <qbuttongroup.h>
136 136
137#include <libkdepim/categoryselectdialog.h> 137#include <libkdepim/categoryselectdialog.h>
138#include <libkdepim/categoryeditdialog.h> 138#include <libkdepim/categoryeditdialog.h>
139#include <kabc/vcardconverter.h> 139#include <kabc/vcardconverter.h>
140 140
141 141
142#include "addresseeutil.h" 142#include "addresseeutil.h"
143#include "undocmds.h" 143#include "undocmds.h"
144#include "addresseeeditordialog.h" 144#include "addresseeeditordialog.h"
145#include "viewmanager.h" 145#include "viewmanager.h"
146#include "details/detailsviewcontainer.h" 146#include "details/detailsviewcontainer.h"
147#include "kabprefs.h" 147#include "kabprefs.h"
148#include "xxportmanager.h" 148#include "xxportmanager.h"
149#include "incsearchwidget.h" 149#include "incsearchwidget.h"
150#include "jumpbuttonbar.h" 150#include "jumpbuttonbar.h"
151#include "extensionmanager.h" 151#include "extensionmanager.h"
152#include "addresseeconfig.h" 152#include "addresseeconfig.h"
153#include <kcmultidialog.h> 153#include <kcmultidialog.h>
154 154
155#ifdef _WIN32_ 155#ifdef _WIN32_
156 156
157#include "kaimportoldialog.h" 157#include "kaimportoldialog.h"
158#else 158#else
159#include <unistd.h> 159#include <unistd.h>
160#endif 160#endif
161// sync includes 161// sync includes
162#include <libkdepim/ksyncprofile.h> 162#include <libkdepim/ksyncprofile.h>
163#include <libkdepim/ksyncprefsdialog.h> 163#include <libkdepim/ksyncprefsdialog.h>
164 164
165 165
166class KABCatPrefs : public QDialog 166class KABCatPrefs : public QDialog
167{ 167{
168 public: 168 public:
169 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 169 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
170 QDialog( parent, name, true ) 170 QDialog( parent, name, true )
171 { 171 {
172 setCaption( i18n("Manage new Categories") ); 172 setCaption( i18n("Manage new Categories") );
173 QVBoxLayout* lay = new QVBoxLayout( this ); 173 QVBoxLayout* lay = new QVBoxLayout( this );
174 lay->setSpacing( 3 ); 174 lay->setSpacing( 3 );
175 lay->setMargin( 3 ); 175 lay->setMargin( 3 );
176 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 176 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
177 lay->addWidget( lab ); 177 lay->addWidget( lab );
178 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 178 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
179 lay->addWidget( format ); 179 lay->addWidget( format );
180 format->setExclusive ( true ) ; 180 format->setExclusive ( true ) ;
181 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 181 addCatBut = new QRadioButton(i18n("Add to category list"), format );
182 new QRadioButton(i18n("Remove from addressees"), format ); 182 new QRadioButton(i18n("Remove from addressees"), format );
183 addCatBut->setChecked( true ); 183 addCatBut->setChecked( true );
184 QPushButton * ok = new QPushButton( i18n("OK"), this ); 184 QPushButton * ok = new QPushButton( i18n("OK"), this );
185 lay->addWidget( ok ); 185 lay->addWidget( ok );
186 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 186 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
187 lay->addWidget( cancel ); 187 lay->addWidget( cancel );
188 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 188 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
189 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 189 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
190 resize( 200, 200 ); 190 resize( 200, 200 );
191 } 191 }
192 192
193 bool addCat() { return addCatBut->isChecked(); } 193 bool addCat() { return addCatBut->isChecked(); }
194private: 194private:
195 QRadioButton* addCatBut; 195 QRadioButton* addCatBut;
196}; 196};
197 197
198 198
199 199
200class KAex2phonePrefs : public QDialog 200class KAex2phonePrefs : public QDialog
201{ 201{
202 public: 202 public:
203 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 203 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
204 QDialog( parent, name, true ) 204 QDialog( parent, name, true )
205 { 205 {
206 setCaption( i18n("Export to phone options") ); 206 setCaption( i18n("Export to phone options") );
207 QVBoxLayout* lay = new QVBoxLayout( this ); 207 QVBoxLayout* lay = new QVBoxLayout( this );
208 lay->setSpacing( 3 ); 208 lay->setSpacing( 3 );
209 lay->setMargin( 3 ); 209 lay->setMargin( 3 );
210 QLabel *lab; 210 QLabel *lab;
211 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 211 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
212 lab->setAlignment (AlignHCenter ); 212 lab->setAlignment (AlignHCenter );
213 QHBox* temphb; 213 QHBox* temphb;
214 temphb = new QHBox( this ); 214 temphb = new QHBox( this );
215 new QLabel( i18n("I/O device: "), temphb ); 215 new QLabel( i18n("I/O device: "), temphb );
216 mPhoneDevice = new QLineEdit( temphb); 216 mPhoneDevice = new QLineEdit( temphb);
217 lay->addWidget( temphb ); 217 lay->addWidget( temphb );
218 temphb = new QHBox( this ); 218 temphb = new QHBox( this );
219 new QLabel( i18n("Connection: "), temphb ); 219 new QLabel( i18n("Connection: "), temphb );
220 mPhoneConnection = new QLineEdit( temphb); 220 mPhoneConnection = new QLineEdit( temphb);
221 lay->addWidget( temphb ); 221 lay->addWidget( temphb );
222 temphb = new QHBox( this ); 222 temphb = new QHBox( this );
223 new QLabel( i18n("Model(opt.): "), temphb ); 223 new QLabel( i18n("Model(opt.): "), temphb );
224 mPhoneModel = new QLineEdit( temphb); 224 mPhoneModel = new QLineEdit( temphb);
225 lay->addWidget( temphb ); 225 lay->addWidget( temphb );
226 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 226 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
227 // lay->addWidget( mWriteToSim ); 227 // lay->addWidget( mWriteToSim );
228 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 228 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
229 lab->setAlignment (AlignHCenter ); 229 lab->setAlignment (AlignHCenter );
230 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 230 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
231 lay->addWidget( ok ); 231 lay->addWidget( ok );
232 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 232 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
233 lay->addWidget( cancel ); 233 lay->addWidget( cancel );
234 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 234 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
235 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 235 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
236 resize( 220, 240 ); 236 resize( 220, 240 );
237 237
238 } 238 }
239 239
240public: 240public:
241 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 241 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
242 QCheckBox* mWriteToSim; 242 QCheckBox* mWriteToSim;
243}; 243};
244 244
245 245
246bool pasteWithNewUid = true; 246bool pasteWithNewUid = true;
247 247
248#ifdef KAB_EMBEDDED 248#ifdef KAB_EMBEDDED
249KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 249KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
250 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 250 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
251 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 251 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
252 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 252 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
253#else //KAB_EMBEDDED 253#else //KAB_EMBEDDED
254KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 254KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
255 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 255 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
256 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 256 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
257 mReadWrite( readWrite ), mModified( false ) 257 mReadWrite( readWrite ), mModified( false )
258#endif //KAB_EMBEDDED 258#endif //KAB_EMBEDDED
259{ 259{
260 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 260 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
261 // syncManager->setBlockSave(false); 261 // syncManager->setBlockSave(false);
262 mExtensionBarSplitter = 0; 262 mExtensionBarSplitter = 0;
263 mIsPart = !parent->inherits( "KAddressBookMain" ); 263 mIsPart = !parent->inherits( "KAddressBookMain" );
264 mAddressBook = KABC::StdAddressBook::self(); 264 mAddressBook = KABC::StdAddressBook::self();
265 KABC::StdAddressBook::setAutomaticSave( false ); 265 KABC::StdAddressBook::setAutomaticSave( false );
266 266
267#ifndef KAB_EMBEDDED 267#ifndef KAB_EMBEDDED
268 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 268 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
269#endif //KAB_EMBEDDED 269#endif //KAB_EMBEDDED
270 270
271 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 271 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
272 SLOT( addressBookChanged() ) ); 272 SLOT( addressBookChanged() ) );
273 273
274#if 0 274#if 0
275 // LP moved to addressbook init method 275 // LP moved to addressbook init method
276 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 276 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
277 "X-Department", "KADDRESSBOOK" ); 277 "X-Department", "KADDRESSBOOK" );
278 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 278 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
279 "X-Profession", "KADDRESSBOOK" ); 279 "X-Profession", "KADDRESSBOOK" );
280 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 280 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
281 "X-AssistantsName", "KADDRESSBOOK" ); 281 "X-AssistantsName", "KADDRESSBOOK" );
282 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 282 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
283 "X-ManagersName", "KADDRESSBOOK" ); 283 "X-ManagersName", "KADDRESSBOOK" );
284 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 284 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
285 "X-SpousesName", "KADDRESSBOOK" ); 285 "X-SpousesName", "KADDRESSBOOK" );
286 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 286 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
287 "X-Office", "KADDRESSBOOK" ); 287 "X-Office", "KADDRESSBOOK" );
288 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 288 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
289 "X-IMAddress", "KADDRESSBOOK" ); 289 "X-IMAddress", "KADDRESSBOOK" );
290 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 290 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
291 "X-Anniversary", "KADDRESSBOOK" ); 291 "X-Anniversary", "KADDRESSBOOK" );
292 292
293 //US added this field to become compatible with Opie/qtopia addressbook 293 //US added this field to become compatible with Opie/qtopia addressbook
294 // values can be "female" or "male" or "". An empty field represents undefined. 294 // values can be "female" or "male" or "". An empty field represents undefined.
295 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 295 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
296 "X-Gender", "KADDRESSBOOK" ); 296 "X-Gender", "KADDRESSBOOK" );
297 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 297 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
298 "X-Children", "KADDRESSBOOK" ); 298 "X-Children", "KADDRESSBOOK" );
299 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 299 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
300 "X-FreeBusyUrl", "KADDRESSBOOK" ); 300 "X-FreeBusyUrl", "KADDRESSBOOK" );
301#endif 301#endif
302 initGUI(); 302 initGUI();
303 303
304 mIncSearchWidget->setFocus(); 304 mIncSearchWidget->setFocus();
305 305
306 306
307 connect( mViewManager, SIGNAL( selected( const QString& ) ), 307 connect( mViewManager, SIGNAL( selected( const QString& ) ),
308 SLOT( setContactSelected( const QString& ) ) ); 308 SLOT( setContactSelected( const QString& ) ) );
309 connect( mViewManager, SIGNAL( executed( const QString& ) ), 309 connect( mViewManager, SIGNAL( executed( const QString& ) ),
310 SLOT( executeContact( const QString& ) ) ); 310 SLOT( executeContact( const QString& ) ) );
311 311
312 connect( mViewManager, SIGNAL( deleteRequest( ) ), 312 connect( mViewManager, SIGNAL( deleteRequest( ) ),
313 SLOT( deleteContacts( ) ) ); 313 SLOT( deleteContacts( ) ) );
314 connect( mViewManager, SIGNAL( modified() ), 314 connect( mViewManager, SIGNAL( modified() ),
315 SLOT( setModified() ) ); 315 SLOT( setModified() ) );
316 316
317 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 317 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
318 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 318 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
319 319
320 connect( mXXPortManager, SIGNAL( modified() ), 320 connect( mXXPortManager, SIGNAL( modified() ),
321 SLOT( setModified() ) ); 321 SLOT( setModified() ) );
322 322
323 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 323 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
324 SLOT( incrementalSearch( const QString& ) ) ); 324 SLOT( incrementalSearch( const QString& ) ) );
325 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 325 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
326 mJumpButtonBar, SLOT( recreateButtons() ) ); 326 mJumpButtonBar, SLOT( recreateButtons() ) );
327 327
328 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 328 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
329 SLOT( sendMail( const QString& ) ) ); 329 SLOT( sendMail( const QString& ) ) );
330 330
331 331
332 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 332 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
333 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 333 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
334 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 334 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
335 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 335 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
336 336
337 337
338#ifndef KAB_EMBEDDED 338#ifndef KAB_EMBEDDED
339 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 339 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
340 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 340 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
341 341
342 connect( mDetails, SIGNAL( browse( const QString& ) ), 342 connect( mDetails, SIGNAL( browse( const QString& ) ),
343 SLOT( browse( const QString& ) ) ); 343 SLOT( browse( const QString& ) ) );
344 344
345 345
346 mAddressBookService = new KAddressBookService( this ); 346 mAddressBookService = new KAddressBookService( this );
347 347
348#endif //KAB_EMBEDDED 348#endif //KAB_EMBEDDED
349 349
350 mMessageTimer = new QTimer( this ); 350 mMessageTimer = new QTimer( this );
351 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 351 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
352 mEditorDialog = 0; 352 mEditorDialog = 0;
353 createAddresseeEditorDialog( this ); 353 createAddresseeEditorDialog( this );
354 setModified( false ); 354 setModified( false );
355 mBRdisabled = false; 355 mBRdisabled = false;
356#ifndef DESKTOP_VERSION 356#ifndef DESKTOP_VERSION
357 infrared = 0; 357 infrared = 0;
358#endif 358#endif
359 //toggleBeamReceive( ); 359 //toggleBeamReceive( );
360
361 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
362 QTimer::singleShot( 1, this , SLOT ( updateToolBar()));
360} 363}
361 364
365void KABCore::updateToolBar()
366{
367 mMainWindow->toolBar()->repaint();
368}
362KABCore::~KABCore() 369KABCore::~KABCore()
363{ 370{
364 // save(); 371 // save();
365 //saveSettings(); 372 //saveSettings();
366 //KABPrefs::instance()->writeConfig(); 373 //KABPrefs::instance()->writeConfig();
367 delete AddresseeConfig::instance(); 374 delete AddresseeConfig::instance();
368 mAddressBook = 0; 375 mAddressBook = 0;
369 KABC::StdAddressBook::close(); 376 KABC::StdAddressBook::close();
370 377
371 delete syncManager; 378 delete syncManager;
372#ifndef DESKTOP_VERSION 379#ifndef DESKTOP_VERSION
373 if ( infrared ) 380 if ( infrared )
374 delete infrared; 381 delete infrared;
375#endif 382#endif
376} 383}
377void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 384void KABCore::receive( const QCString& cmsg, const QByteArray& data )
378{ 385{
379 qDebug("KA: QCOP message received: %s ", cmsg.data() ); 386 qDebug("KA: QCOP message received: %s ", cmsg.data() );
380 if ( cmsg == "setDocument(QString)" ) { 387 if ( cmsg == "setDocument(QString)" ) {
381 QDataStream stream( data, IO_ReadOnly ); 388 QDataStream stream( data, IO_ReadOnly );
382 QString fileName; 389 QString fileName;
383 stream >> fileName; 390 stream >> fileName;
384 recieve( fileName ); 391 recieve( fileName );
385 return; 392 return;
386 } 393 }
387} 394}
388void KABCore::toggleBeamReceive( ) 395void KABCore::toggleBeamReceive( )
389{ 396{
390 if ( mBRdisabled ) 397 if ( mBRdisabled )
391 return; 398 return;
392#ifndef DESKTOP_VERSION 399#ifndef DESKTOP_VERSION
393 if ( infrared ) { 400 if ( infrared ) {
394 qDebug("AB disable BeamReceive "); 401 qDebug("AB disable BeamReceive ");
395 delete infrared; 402 delete infrared;
396 infrared = 0; 403 infrared = 0;
397 mActionBR->setChecked(false); 404 mActionBR->setChecked(false);
398 return; 405 return;
399 } 406 }
400 qDebug("AB enable BeamReceive "); 407 qDebug("AB enable BeamReceive ");
401 mActionBR->setChecked(true); 408 mActionBR->setChecked(true);
402 409
403 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 410 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
404 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 411 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
405#endif 412#endif
406} 413}
407 414
408 415
409void KABCore::disableBR(bool b) 416void KABCore::disableBR(bool b)
410{ 417{
411#ifndef DESKTOP_VERSION 418#ifndef DESKTOP_VERSION
412 if ( b ) { 419 if ( b ) {
413 if ( infrared ) { 420 if ( infrared ) {
414 toggleBeamReceive( ); 421 toggleBeamReceive( );
415 } 422 }
416 mBRdisabled = true; 423 mBRdisabled = true;
417 } else { 424 } else {
418 if ( mBRdisabled ) { 425 if ( mBRdisabled ) {
419 mBRdisabled = false; 426 mBRdisabled = false;
420 //toggleBeamReceive( ); 427 //toggleBeamReceive( );
421 } 428 }
422 } 429 }
423#endif 430#endif
424 431
425} 432}
426void KABCore::recieve( QString fn ) 433void KABCore::recieve( QString fn )
427{ 434{
428 //qDebug("KABCore::recieve "); 435 //qDebug("KABCore::recieve ");
429 int count = mAddressBook->importFromFile( fn, true ); 436 int count = mAddressBook->importFromFile( fn, true );
430 if ( count ) 437 if ( count )
431 setModified( true ); 438 setModified( true );
432 mViewManager->refreshView(); 439 mViewManager->refreshView();
433 message(i18n("%1 contact(s) received!").arg( count )); 440 message(i18n("%1 contact(s) received!").arg( count ));
434 topLevelWidget()->showMaximized(); 441 topLevelWidget()->showMaximized();
435 topLevelWidget()->raise(); 442 topLevelWidget()->raise();
436} 443}
437void KABCore::restoreSettings() 444void KABCore::restoreSettings()
438{ 445{
439 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 446 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
440 447
441 bool state; 448 bool state;
442 449
443 if (mMultipleViewsAtOnce) 450 if (mMultipleViewsAtOnce)
444 state = KABPrefs::instance()->mDetailsPageVisible; 451 state = KABPrefs::instance()->mDetailsPageVisible;
445 else 452 else
446 state = false; 453 state = false;
447 454
448 mActionDetails->setChecked( state ); 455 mActionDetails->setChecked( state );
449 setDetailsVisible( state ); 456 setDetailsVisible( state );
450 457
451 state = KABPrefs::instance()->mJumpButtonBarVisible; 458 state = KABPrefs::instance()->mJumpButtonBarVisible;
452 459
453 mActionJumpBar->setChecked( state ); 460 mActionJumpBar->setChecked( state );
454 setJumpButtonBarVisible( state ); 461 setJumpButtonBarVisible( state );
455/*US 462/*US
456 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 463 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
457 if ( splitterSize.count() == 0 ) { 464 if ( splitterSize.count() == 0 ) {
458 splitterSize.append( width() / 2 ); 465 splitterSize.append( width() / 2 );
459 splitterSize.append( width() / 2 ); 466 splitterSize.append( width() / 2 );
460 } 467 }
461 mMiniSplitter->setSizes( splitterSize ); 468 mMiniSplitter->setSizes( splitterSize );
462 if ( mExtensionBarSplitter ) { 469 if ( mExtensionBarSplitter ) {
463 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 470 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
464 if ( splitterSize.count() == 0 ) { 471 if ( splitterSize.count() == 0 ) {
465 splitterSize.append( width() / 2 ); 472 splitterSize.append( width() / 2 );
466 splitterSize.append( width() / 2 ); 473 splitterSize.append( width() / 2 );
467 } 474 }
468 mExtensionBarSplitter->setSizes( splitterSize ); 475 mExtensionBarSplitter->setSizes( splitterSize );
469 476
470 } 477 }
471*/ 478*/
472 mViewManager->restoreSettings(); 479 mViewManager->restoreSettings();
473 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 480 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
474 mExtensionManager->restoreSettings(); 481 mExtensionManager->restoreSettings();
475#ifdef DESKTOP_VERSION 482#ifdef DESKTOP_VERSION
476 int wid = width(); 483 int wid = width();
477 if ( wid < 10 ) 484 if ( wid < 10 )
478 wid = 400; 485 wid = 400;
479#else 486#else
480 int wid = QApplication::desktop()->width(); 487 int wid = QApplication::desktop()->width();
481 if ( wid < 640 ) 488 if ( wid < 640 )
482 wid = QApplication::desktop()->height(); 489 wid = QApplication::desktop()->height();
483#endif 490#endif
484 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 491 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
485 if ( true /*splitterSize.count() == 0*/ ) { 492 if ( true /*splitterSize.count() == 0*/ ) {
486 splitterSize.append( wid / 2 ); 493 splitterSize.append( wid / 2 );
487 splitterSize.append( wid / 2 ); 494 splitterSize.append( wid / 2 );
488 } 495 }
489 mMiniSplitter->setSizes( splitterSize ); 496 mMiniSplitter->setSizes( splitterSize );
490 if ( mExtensionBarSplitter ) { 497 if ( mExtensionBarSplitter ) {
491 //splitterSize = KABPrefs::instance()->mExtensionsSplitter; 498 //splitterSize = KABPrefs::instance()->mExtensionsSplitter;
492 if ( true /*splitterSize.count() == 0*/ ) { 499 if ( true /*splitterSize.count() == 0*/ ) {
493 splitterSize.append( wid / 2 ); 500 splitterSize.append( wid / 2 );
494 splitterSize.append( wid / 2 ); 501 splitterSize.append( wid / 2 );
495 } 502 }
496 mExtensionBarSplitter->setSizes( splitterSize ); 503 mExtensionBarSplitter->setSizes( splitterSize );
497 504
498 } 505 }
499 506
500 507
501} 508}
502 509
503void KABCore::saveSettings() 510void KABCore::saveSettings()
504{ 511{
505 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 512 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
506 if ( mExtensionBarSplitter ) 513 if ( mExtensionBarSplitter )
507 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 514 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
508 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 515 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
509 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 516 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
510#ifndef KAB_EMBEDDED 517#ifndef KAB_EMBEDDED
511 518
512 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 519 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
513 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 520 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
514#endif //KAB_EMBEDDED 521#endif //KAB_EMBEDDED
515 mExtensionManager->saveSettings(); 522 mExtensionManager->saveSettings();
516 mViewManager->saveSettings(); 523 mViewManager->saveSettings();
517 524
518 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 525 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
519} 526}
520 527
521KABC::AddressBook *KABCore::addressBook() const 528KABC::AddressBook *KABCore::addressBook() const
522{ 529{
523 return mAddressBook; 530 return mAddressBook;
524} 531}
525 532
526KConfig *KABCore::config() 533KConfig *KABCore::config()
527{ 534{
528#ifndef KAB_EMBEDDED 535#ifndef KAB_EMBEDDED
529 return KABPrefs::instance()->config(); 536 return KABPrefs::instance()->config();
530#else //KAB_EMBEDDED 537#else //KAB_EMBEDDED
531 return KABPrefs::instance()->getConfig(); 538 return KABPrefs::instance()->getConfig();
532#endif //KAB_EMBEDDED 539#endif //KAB_EMBEDDED
533} 540}
534 541
535KActionCollection *KABCore::actionCollection() const 542KActionCollection *KABCore::actionCollection() const
536{ 543{
537 return mGUIClient->actionCollection(); 544 return mGUIClient->actionCollection();
538} 545}
539 546
540KABC::Field *KABCore::currentSearchField() const 547KABC::Field *KABCore::currentSearchField() const
541{ 548{
542 if (mIncSearchWidget) 549 if (mIncSearchWidget)
543 return mIncSearchWidget->currentField(); 550 return mIncSearchWidget->currentField();
544 else 551 else
545 return 0; 552 return 0;
546} 553}
547 554
548QStringList KABCore::selectedUIDs() const 555QStringList KABCore::selectedUIDs() const
549{ 556{
550 return mViewManager->selectedUids(); 557 return mViewManager->selectedUids();
551} 558}
552 559
553KABC::Resource *KABCore::requestResource( QWidget *parent ) 560KABC::Resource *KABCore::requestResource( QWidget *parent )
554{ 561{
555 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 562 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
556 563
557 QPtrList<KRES::Resource> kresResources; 564 QPtrList<KRES::Resource> kresResources;
558 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 565 QPtrListIterator<KABC::Resource> resIt( kabcResources );
559 KABC::Resource *resource; 566 KABC::Resource *resource;
560 while ( ( resource = resIt.current() ) != 0 ) { 567 while ( ( resource = resIt.current() ) != 0 ) {
561 ++resIt; 568 ++resIt;
562 if ( !resource->readOnly() ) { 569 if ( !resource->readOnly() ) {
563 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 570 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
564 if ( res ) 571 if ( res )
565 kresResources.append( res ); 572 kresResources.append( res );
566 } 573 }
567 } 574 }
568 575
569 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 576 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
570 return static_cast<KABC::Resource*>( res ); 577 return static_cast<KABC::Resource*>( res );
571} 578}
572 579
573#ifndef KAB_EMBEDDED 580#ifndef KAB_EMBEDDED
574KAboutData *KABCore::createAboutData() 581KAboutData *KABCore::createAboutData()
575#else //KAB_EMBEDDED 582#else //KAB_EMBEDDED
576void KABCore::createAboutData() 583void KABCore::createAboutData()
577#endif //KAB_EMBEDDED 584#endif //KAB_EMBEDDED
578{ 585{
579#ifndef KAB_EMBEDDED 586#ifndef KAB_EMBEDDED
580 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), 587 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ),
581 "3.1", I18N_NOOP( "The KDE Address Book" ), 588 "3.1", I18N_NOOP( "The KDE Address Book" ),
582 KAboutData::License_GPL_V2, 589 KAboutData::License_GPL_V2,
583 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); 590 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) );
584 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); 591 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" );
585 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); 592 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) );
586 about->addAuthor( "Cornelius Schumacher", 593 about->addAuthor( "Cornelius Schumacher",
587 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), 594 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ),
588 "schumacher@kde.org" ); 595 "schumacher@kde.org" );
589 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), 596 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ),
590 "mpilone@slac.com" ); 597 "mpilone@slac.com" );
591 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); 598 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) );
592 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); 599 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) );
593 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), 600 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ),
594 "michel@klaralvdalens-datakonsult.se" ); 601 "michel@klaralvdalens-datakonsult.se" );
595 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), 602 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ),
596 "hansen@kde.org" ); 603 "hansen@kde.org" );
597 604
598 return about; 605 return about;
599#endif //KAB_EMBEDDED 606#endif //KAB_EMBEDDED
600 607
601 QString version; 608 QString version;
602#include <../version> 609#include <../version>
603 QMessageBox::about( this, "About KAddressbook/Pi", 610 QMessageBox::about( this, "About KAddressbook/Pi",
604 "KAddressbook/Platform-independent\n" 611 "KAddressbook/Platform-independent\n"
605 "(KA/Pi) " +version + " - " + 612 "(KA/Pi) " +version + " - " +
606#ifdef DESKTOP_VERSION 613#ifdef DESKTOP_VERSION
607 "Desktop Edition\n" 614 "Desktop Edition\n"
608#else 615#else
609 "PDA-Edition\n" 616 "PDA-Edition\n"
610 "for: Zaurus 5500 / 7x0 / 8x0\n" 617 "for: Zaurus 5500 / 7x0 / 8x0\n"
611#endif 618#endif
612 619
613 "(c) 2004 Ulf Schenk\n" 620 "(c) 2004 Ulf Schenk\n"
614 "(c) 2004 Lutz Rogowski\n" 621 "(c) 2004 Lutz Rogowski\n"
615 "(c) 1997-2003, The KDE PIM Team\n" 622 "(c) 1997-2003, The KDE PIM Team\n"
616 "Tobias Koenig Current maintainer\ntokoe@kde.org\n" 623 "Tobias Koenig Current maintainer\ntokoe@kde.org\n"
617 "Don Sanders Original author\n" 624 "Don Sanders Original author\n"
618 "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n" 625 "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n"
619 "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n" 626 "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n"
620 "Greg Stern DCOP interface\n" 627 "Greg Stern DCOP interface\n"
621 "Mark Westcot Contact pinning\n" 628 "Mark Westcot Contact pinning\n"
622 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" 629 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n"
623 "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" 630 "Steffen Hansen LDAP Lookup\nhansen@kde.org\n"
624#ifdef _WIN32_ 631#ifdef _WIN32_
625 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" 632 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n"
626#endif 633#endif
627 ); 634 );
628} 635}
629 636
630void KABCore::setContactSelected( const QString &uid ) 637void KABCore::setContactSelected( const QString &uid )
631{ 638{
632 KABC::Addressee addr = mAddressBook->findByUid( uid ); 639 KABC::Addressee addr = mAddressBook->findByUid( uid );
633 if ( !mDetails->isHidden() ) 640 if ( !mDetails->isHidden() )
634 mDetails->setAddressee( addr ); 641 mDetails->setAddressee( addr );
635 642
636 if ( !addr.isEmpty() ) { 643 if ( !addr.isEmpty() ) {
637 emit contactSelected( addr.formattedName() ); 644 emit contactSelected( addr.formattedName() );
638 KABC::Picture pic = addr.photo(); 645 KABC::Picture pic = addr.photo();
639 if ( pic.isIntern() ) { 646 if ( pic.isIntern() ) {
640//US emit contactSelected( pic.data() ); 647//US emit contactSelected( pic.data() );
641//US instead use: 648//US instead use:
642 QPixmap px; 649 QPixmap px;
643 if (pic.data().isNull() != true) 650 if (pic.data().isNull() != true)
644 { 651 {
645 px.convertFromImage(pic.data()); 652 px.convertFromImage(pic.data());
646 } 653 }
647 654
648 emit contactSelected( px ); 655 emit contactSelected( px );
649 } 656 }
650 } 657 }
651 658
652 659
653 mExtensionManager->setSelectionChanged(); 660 mExtensionManager->setSelectionChanged();
654 661
655 // update the actions 662 // update the actions
656 bool selected = !uid.isEmpty(); 663 bool selected = !uid.isEmpty();
657 664
658 if ( mReadWrite ) { 665 if ( mReadWrite ) {
659 mActionCut->setEnabled( selected ); 666 mActionCut->setEnabled( selected );
660 mActionPaste->setEnabled( selected ); 667 mActionPaste->setEnabled( selected );
661 } 668 }
662 669
663 mActionCopy->setEnabled( selected ); 670 mActionCopy->setEnabled( selected );
664 mActionDelete->setEnabled( selected ); 671 mActionDelete->setEnabled( selected );
665 mActionEditAddressee->setEnabled( selected ); 672 mActionEditAddressee->setEnabled( selected );
666 mActionMail->setEnabled( selected ); 673 mActionMail->setEnabled( selected );
667 mActionMailVCard->setEnabled( selected ); 674 mActionMailVCard->setEnabled( selected );
668 //if (mActionBeam) 675 //if (mActionBeam)
669 //mActionBeam->setEnabled( selected ); 676 //mActionBeam->setEnabled( selected );
670 677
671 if (mActionBeamVCard) 678 if (mActionBeamVCard)
672 mActionBeamVCard->setEnabled( selected ); 679 mActionBeamVCard->setEnabled( selected );
673 680
674 mActionExport2phone->setEnabled( selected ); 681 mActionExport2phone->setEnabled( selected );
675 mActionWhoAmI->setEnabled( selected ); 682 mActionWhoAmI->setEnabled( selected );
676 mActionCategories->setEnabled( selected ); 683 mActionCategories->setEnabled( selected );
677} 684}
678 685
679void KABCore::sendMail() 686void KABCore::sendMail()
680{ 687{
681 sendMail( mViewManager->selectedEmails().join( ", " ) ); 688 sendMail( mViewManager->selectedEmails().join( ", " ) );
682} 689}
683 690
684void KABCore::sendMail( const QString& emaillist ) 691void KABCore::sendMail( const QString& emaillist )
685{ 692{
686 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " 693 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
687 if (emaillist.contains(",") > 0) 694 if (emaillist.contains(",") > 0)
688 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); 695 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
689 else 696 else
690 ExternalAppHandler::instance()->mailToOneContact( emaillist ); 697 ExternalAppHandler::instance()->mailToOneContact( emaillist );
691} 698}
692 699
693 700
694 701
695void KABCore::mailVCard() 702void KABCore::mailVCard()
696{ 703{
697 QStringList uids = mViewManager->selectedUids(); 704 QStringList uids = mViewManager->selectedUids();
698 if ( !uids.isEmpty() ) 705 if ( !uids.isEmpty() )
699 mailVCard( uids ); 706 mailVCard( uids );
700} 707}
701 708
702void KABCore::mailVCard( const QStringList& uids ) 709void KABCore::mailVCard( const QStringList& uids )
703{ 710{
704 QStringList urls; 711 QStringList urls;
705 712
706// QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 713// QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
707 714
708 QString dirName = "/tmp/" + KApplication::randomString( 8 ); 715 QString dirName = "/tmp/" + KApplication::randomString( 8 );
709 716
710 717
711 718
712 QDir().mkdir( dirName, true ); 719 QDir().mkdir( dirName, true );
713 720
714 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 721 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
715 KABC::Addressee a = mAddressBook->findByUid( *it ); 722 KABC::Addressee a = mAddressBook->findByUid( *it );
716 723
717 if ( a.isEmpty() ) 724 if ( a.isEmpty() )
718 continue; 725 continue;
719 726
720 QString name = a.givenName() + "_" + a.familyName() + ".vcf"; 727 QString name = a.givenName() + "_" + a.familyName() + ".vcf";
721 728
722 QString fileName = dirName + "/" + name; 729 QString fileName = dirName + "/" + name;
723 730
724 QFile outFile(fileName); 731 QFile outFile(fileName);
725 732
726 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 733 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
727 KABC::VCardConverter converter; 734 KABC::VCardConverter converter;
728 QString vcard; 735 QString vcard;
729 736
730 converter.addresseeToVCard( a, vcard ); 737 converter.addresseeToVCard( a, vcard );
731 738
732 QTextStream t( &outFile ); // use a text stream 739 QTextStream t( &outFile ); // use a text stream
733 t.setEncoding( QTextStream::UnicodeUTF8 ); 740 t.setEncoding( QTextStream::UnicodeUTF8 );
734 t << vcard; 741 t << vcard;
735 742
736 outFile.close(); 743 outFile.close();
737 744
738 urls.append( fileName ); 745 urls.append( fileName );
739 } 746 }
740 } 747 }
741 748
742 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); 749 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") );
743 750
744 751
745/*US 752/*US
746 kapp->invokeMailer( QString::null, QString::null, QString::null, 753 kapp->invokeMailer( QString::null, QString::null, QString::null,
747 QString::null, // subject 754 QString::null, // subject
748 QString::null, // body 755 QString::null, // body
749 QString::null, 756 QString::null,
750 urls ); // attachments 757 urls ); // attachments
751*/ 758*/
752 759
753} 760}
754 761
755/** 762/**
756 Beams the "WhoAmI contact. 763 Beams the "WhoAmI contact.
757*/ 764*/
758void KABCore::beamMySelf() 765void KABCore::beamMySelf()
759{ 766{
760 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); 767 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
761 if (!a.isEmpty()) 768 if (!a.isEmpty())
762 { 769 {
763 QStringList uids; 770 QStringList uids;
764 uids << a.uid(); 771 uids << a.uid();
765 772
766 beamVCard(uids); 773 beamVCard(uids);
767 } else { 774 } else {
768 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); 775 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) );
769 776
770 777
771 } 778 }
772} 779}
773 780
774void KABCore::export2phone() 781void KABCore::export2phone()
775{ 782{
776 783
777 KAex2phonePrefs ex2phone; 784 KAex2phonePrefs ex2phone;
778 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 785 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
779 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 786 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
780 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 787 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
781 788
782 if ( !ex2phone.exec() ) { 789 if ( !ex2phone.exec() ) {
783 return; 790 return;
784 } 791 }
785 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 792 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
786 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 793 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
787 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 794 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
788 795
789 796
790 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 797 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
791 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 798 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
792 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 799 KPimGlobalPrefs::instance()->mEx2PhoneModel );
793 800
794 QStringList uids = mViewManager->selectedUids(); 801 QStringList uids = mViewManager->selectedUids();
795 if ( uids.isEmpty() ) 802 if ( uids.isEmpty() )
796 return; 803 return;
797 804
798 QString fileName = getPhoneFile(); 805 QString fileName = getPhoneFile();
799 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 806 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
800 return; 807 return;
801 808
802 message(i18n("Exporting to phone...")); 809 message(i18n("Exporting to phone..."));
803 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 810 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
804 811
805} 812}
806QString KABCore::getPhoneFile() 813QString KABCore::getPhoneFile()
807{ 814{
808#ifdef DESKTOP_VERSION 815#ifdef DESKTOP_VERSION
809 return locateLocal("tmp", "phonefile.vcf"); 816 return locateLocal("tmp", "phonefile.vcf");
810#else 817#else
811 return "/tmp/phonefile.vcf"; 818 return "/tmp/phonefile.vcf";
812#endif 819#endif
813 820
814} 821}
815void KABCore::writeToPhone( ) 822void KABCore::writeToPhone( )
816{ 823{
817 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 824 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
818 message(i18n("Export to phone finished!")); 825 message(i18n("Export to phone finished!"));
819 else 826 else
820 qDebug(i18n("Error exporting to phone")); 827 qDebug(i18n("Error exporting to phone"));
821} 828}
822void KABCore::beamVCard() 829void KABCore::beamVCard()
823{ 830{
824 QStringList uids = mViewManager->selectedUids(); 831 QStringList uids = mViewManager->selectedUids();
825 if ( !uids.isEmpty() ) 832 if ( !uids.isEmpty() )
826 beamVCard( uids ); 833 beamVCard( uids );
827} 834}
828 835
829 836
830void KABCore::beamVCard(const QStringList& uids) 837void KABCore::beamVCard(const QStringList& uids)
831{ 838{
832 839
833 // LR: we should use the /tmp dir on the Zaurus, 840 // LR: we should use the /tmp dir on the Zaurus,
834 // because: /tmp = RAM, (HOME)/kdepim = flash memory 841 // because: /tmp = RAM, (HOME)/kdepim = flash memory
835 842
836#ifdef DESKTOP_VERSION 843#ifdef DESKTOP_VERSION
837 QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); 844 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
838#else 845#else
839 QString fileName = "/tmp/kapibeamfile.vcf"; 846 QString fileName = "/tmp/kapibeamfile.vcf";
840#endif 847#endif
841 848
842 KABC::VCardConverter converter; 849 KABC::VCardConverter converter;
843 QString description; 850 QString description;
844 QString datastream; 851 QString datastream;
845 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 852 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
846 KABC::Addressee a = mAddressBook->findByUid( *it ); 853 KABC::Addressee a = mAddressBook->findByUid( *it );
847 854
848 if ( a.isEmpty() ) 855 if ( a.isEmpty() )
849 continue; 856 continue;
850 857
851 if (description.isEmpty()) 858 if (description.isEmpty())
852 description = a.formattedName(); 859 description = a.formattedName();
853 860
854 QString vcard; 861 QString vcard;
855 converter.addresseeToVCard( a, vcard ); 862 converter.addresseeToVCard( a, vcard );
856 int start = 0; 863 int start = 0;
857 int next; 864 int next;
858 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 865 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
859 int semi = vcard.find(";", next); 866 int semi = vcard.find(";", next);
860 int dopp = vcard.find(":", next); 867 int dopp = vcard.find(":", next);
861 int sep; 868 int sep;
862 if ( semi < dopp && semi >= 0 ) 869 if ( semi < dopp && semi >= 0 )
863 sep = semi ; 870 sep = semi ;
864 else 871 else
865 sep = dopp; 872 sep = dopp;
866 datastream +=vcard.mid( start, next - start); 873 datastream +=vcard.mid( start, next - start);
867 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 874 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
868 start = sep; 875 start = sep;
869 } 876 }
870 datastream += vcard.mid( start,vcard.length() ); 877 datastream += vcard.mid( start,vcard.length() );
871 } 878 }
872#ifndef DESKTOP_VERSION 879#ifndef DESKTOP_VERSION
873 QFile outFile(fileName); 880 QFile outFile(fileName);
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index d2ee45d..0a52838 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -1,512 +1,513 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
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#ifndef KABCORE_H 24#ifndef KABCORE_H
25#define KABCORE_H 25#define KABCORE_H
26 26
27#include <kabc/field.h> 27#include <kabc/field.h>
28 28
29#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
30#endif //KAB_EMBEDDED 30#endif //KAB_EMBEDDED
31#include <qdict.h> 31#include <qdict.h>
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34#include <qwidget.h> 34#include <qwidget.h>
35#include <qpopupmenu.h> 35#include <qpopupmenu.h>
36#include <ksyncmanager.h> 36#include <ksyncmanager.h>
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38#include <qcopchannel_qws.h> 38#include <qcopchannel_qws.h>
39#endif 39#endif
40 40
41namespace KABC { 41namespace KABC {
42class AddressBook; 42class AddressBook;
43} 43}
44 44
45#ifndef KAB_EMBEDDED 45#ifndef KAB_EMBEDDED
46class KAboutData; 46class KAboutData;
47class KConfig; 47class KConfig;
48 48
49class KAddressBookService; 49class KAddressBookService;
50class LDAPSearchDialog; 50class LDAPSearchDialog;
51#else //KAB_EMBEDDED 51#else //KAB_EMBEDDED
52class KAddressBookMain; 52class KAddressBookMain;
53//US class QAction; 53//US class QAction;
54#endif //KAB_EMBEDDED 54#endif //KAB_EMBEDDED
55class KCMultiDialog; 55class KCMultiDialog;
56class KXMLGUIClient; 56class KXMLGUIClient;
57class ExtensionManager; 57class ExtensionManager;
58class XXPortManager; 58class XXPortManager;
59class JumpButtonBar; 59class JumpButtonBar;
60class IncSearchWidget; 60class IncSearchWidget;
61class KDGanttMinimizeSplitter; 61class KDGanttMinimizeSplitter;
62class KAction; 62class KAction;
63class KActionCollection; 63class KActionCollection;
64class KToggleAction; 64class KToggleAction;
65class KSyncProfile; 65class KSyncProfile;
66 66
67class QAction; 67class QAction;
68class QMenuBar; 68class QMenuBar;
69class QSplitter; 69class QSplitter;
70class ViewContainer; 70class ViewContainer;
71class ViewManager; 71class ViewManager;
72class AddresseeEditorDialog; 72class AddresseeEditorDialog;
73class Ir; 73class Ir;
74 74
75class KABCore : public QWidget, public KSyncInterface 75class KABCore : public QWidget, public KSyncInterface
76{ 76{
77 Q_OBJECT 77 Q_OBJECT
78 78
79 public: 79 public:
80 KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 ); 80 KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 );
81 81
82 82
83 ~KABCore(); 83 ~KABCore();
84 84
85 85
86#ifdef KAB_EMBEDDED 86#ifdef KAB_EMBEDDED
87 //US added functionality 87 //US added functionality
88 QPopupMenu* getViewMenu() {return viewMenu;} 88 QPopupMenu* getViewMenu() {return viewMenu;}
89 QPopupMenu* getFilterMenu() {return filterMenu;} 89 QPopupMenu* getFilterMenu() {return filterMenu;}
90 QPopupMenu* getSettingsMenu() {return settingsMenu;} 90 QPopupMenu* getSettingsMenu() {return settingsMenu;}
91 void addActionsManually(); 91 void addActionsManually();
92#endif //KAB_EMBEDDED 92#endif //KAB_EMBEDDED
93 /** 93 /**
94 Restores the global settings. 94 Restores the global settings.
95 */ 95 */
96 void restoreSettings(); 96 void restoreSettings();
97 97
98 /** 98 /**
99 Saves the global settings. 99 Saves the global settings.
100 */ 100 */
101 void saveSettings(); 101 void saveSettings();
102 102
103 /** 103 /**
104 Returns a pointer to the StdAddressBook of the application. 104 Returns a pointer to the StdAddressBook of the application.
105 */ 105 */
106 KABC::AddressBook *addressBook() const; 106 KABC::AddressBook *addressBook() const;
107 107
108 /** 108 /**
109 Returns a pointer to the KConfig object of the application. 109 Returns a pointer to the KConfig object of the application.
110 */ 110 */
111 static KConfig *config(); 111 static KConfig *config();
112 112
113 /** 113 /**
114 Returns a pointer to the global KActionCollection object. So 114 Returns a pointer to the global KActionCollection object. So
115 other classes can register their actions easily. 115 other classes can register their actions easily.
116 */ 116 */
117 KActionCollection *actionCollection() const; 117 KActionCollection *actionCollection() const;
118 118
119 /** 119 /**
120 Returns the current search field of the Incremental Search Widget. 120 Returns the current search field of the Incremental Search Widget.
121 */ 121 */
122 KABC::Field *currentSearchField() const; 122 KABC::Field *currentSearchField() const;
123 123
124 /** 124 /**
125 Returns the uid list of the currently selected contacts. 125 Returns the uid list of the currently selected contacts.
126 */ 126 */
127 QStringList selectedUIDs() const; 127 QStringList selectedUIDs() const;
128 128
129 /** 129 /**
130 Displays the ResourceSelectDialog and returns the selected 130 Displays the ResourceSelectDialog and returns the selected
131 resource or a null pointer if no resource was selected by 131 resource or a null pointer if no resource was selected by
132 the user. 132 the user.
133 */ 133 */
134 KABC::Resource *requestResource( QWidget *parent ); 134 KABC::Resource *requestResource( QWidget *parent );
135 135
136#ifndef KAB_EMBEDDED 136#ifndef KAB_EMBEDDED
137 static KAboutData *createAboutData(); 137 static KAboutData *createAboutData();
138#endif //KAB_EMBEDDED 138#endif //KAB_EMBEDDED
139 139
140#ifdef KAB_EMBEDDED 140#ifdef KAB_EMBEDDED
141 inline QPopupMenu* getImportMenu() { return ImportMenu;} 141 inline QPopupMenu* getImportMenu() { return ImportMenu;}
142 inline QPopupMenu* getExportMenu() { return ExportMenu;} 142 inline QPopupMenu* getExportMenu() { return ExportMenu;}
143#endif //KAB_EMBEDDED 143#endif //KAB_EMBEDDED
144 144
145 public slots: 145 public slots:
146#ifdef KAB_EMBEDDED 146#ifdef KAB_EMBEDDED
147 void createAboutData(); 147 void createAboutData();
148#endif //KAB_EMBEDDED 148#endif //KAB_EMBEDDED
149 void setDetailsToggle(); 149 void setDetailsToggle();
150 150
151 void showLicence(); 151 void showLicence();
152 void faq(); 152 void faq();
153 void whatsnew() ; 153 void whatsnew() ;
154 void synchowto() ; 154 void synchowto() ;
155 void multisynchowto() ; 155 void multisynchowto() ;
156 void kdesynchowto() ; 156 void kdesynchowto() ;
157 void writeToPhone(); 157 void writeToPhone();
158 158
159 /** 159 /**
160 Is called whenever a contact is selected in the view. 160 Is called whenever a contact is selected in the view.
161 */ 161 */
162 void setContactSelected( const QString &uid ); 162 void setContactSelected( const QString &uid );
163 163
164 /** 164 /**
165 Opens the preferred mail composer with all selected contacts as 165 Opens the preferred mail composer with all selected contacts as
166 arguments. 166 arguments.
167 */ 167 */
168 void sendMail(); 168 void sendMail();
169 169
170 /** 170 /**
171 Opens the preferred mail composer with the given contacts as 171 Opens the preferred mail composer with the given contacts as
172 arguments. 172 arguments.
173 */ 173 */
174 void sendMail( const QString& email ); 174 void sendMail( const QString& email );
175 175
176 176
177 void mailVCard(); 177 void mailVCard();
178 void mailVCard(const QStringList& uids); 178 void mailVCard(const QStringList& uids);
179 179
180 /** 180 /**
181 Beams the "WhoAmI contact. 181 Beams the "WhoAmI contact.
182 */ 182 */
183 void beamMySelf(); 183 void beamMySelf();
184 184
185 void beamVCard(); 185 void beamVCard();
186 void export2phone(); 186 void export2phone();
187 void beamVCard(const QStringList& uids); 187 void beamVCard(const QStringList& uids);
188 void beamDone( Ir *ir ); 188 void beamDone( Ir *ir );
189 189
190 190
191 /** 191 /**
192 Starts the preferred web browser with the given URL as argument. 192 Starts the preferred web browser with the given URL as argument.
193 */ 193 */
194 void browse( const QString& url ); 194 void browse( const QString& url );
195 195
196 /** 196 /**
197 Select all contacts in the view. 197 Select all contacts in the view.
198 */ 198 */
199 void selectAllContacts(); 199 void selectAllContacts();
200 200
201 /** 201 /**
202 Deletes all selected contacts from the address book. 202 Deletes all selected contacts from the address book.
203 */ 203 */
204 void deleteContacts(); 204 void deleteContacts();
205 205
206 /** 206 /**
207 Deletes given contacts from the address book. 207 Deletes given contacts from the address book.
208 208
209 @param uids The uids of the contacts, which shall be deleted. 209 @param uids The uids of the contacts, which shall be deleted.
210 */ 210 */
211 void deleteContacts( const QStringList &uids ); 211 void deleteContacts( const QStringList &uids );
212 212
213 /** 213 /**
214 Copys the selected contacts into clipboard for later pasting. 214 Copys the selected contacts into clipboard for later pasting.
215 */ 215 */
216 void copyContacts(); 216 void copyContacts();
217 217
218 /** 218 /**
219 Cuts the selected contacts and stores them for later pasting. 219 Cuts the selected contacts and stores them for later pasting.
220 */ 220 */
221 void cutContacts(); 221 void cutContacts();
222 222
223 /** 223 /**
224 Paste contacts from clipboard into the address book. 224 Paste contacts from clipboard into the address book.
225 */ 225 */
226 void pasteContacts(); 226 void pasteContacts();
227 227
228 /** 228 /**
229 Paste given contacts into the address book. 229 Paste given contacts into the address book.
230 230
231 @param list The list of addressee, which shall be pasted. 231 @param list The list of addressee, which shall be pasted.
232 */ 232 */
233 void pasteContacts( KABC::Addressee::List &list ); 233 void pasteContacts( KABC::Addressee::List &list );
234 234
235 /** 235 /**
236 Sets the whoAmI contact, that is used by many other programs to 236 Sets the whoAmI contact, that is used by many other programs to
237 get personal information about the current user. 237 get personal information about the current user.
238 */ 238 */
239 void setWhoAmI(); 239 void setWhoAmI();
240 240
241 /** 241 /**
242 Displays the category dialog and applies the result to all 242 Displays the category dialog and applies the result to all
243 selected contacts. 243 selected contacts.
244 */ 244 */
245 void setCategories(); 245 void setCategories();
246 void manageCategories(); 246 void manageCategories();
247 void editCategories(); 247 void editCategories();
248 248
249 /** 249 /**
250 Sets the field list of the Incremental Search Widget. 250 Sets the field list of the Incremental Search Widget.
251 */ 251 */
252 void setSearchFields( const KABC::Field::List &fields ); 252 void setSearchFields( const KABC::Field::List &fields );
253 253
254 /** 254 /**
255 Search with the current search field for a contact, that matches 255 Search with the current search field for a contact, that matches
256 the given text, and selects it in the view. 256 the given text, and selects it in the view.
257 */ 257 */
258 void incrementalSearch( const QString& text ); 258 void incrementalSearch( const QString& text );
259 259
260 /** 260 /**
261 Marks the address book as modified. 261 Marks the address book as modified.
262 */ 262 */
263 void setModified(); 263 void setModified();
264 /** 264 /**
265 Marks the address book as modified without refreshing the view. 265 Marks the address book as modified without refreshing the view.
266 */ 266 */
267 void setModifiedWOrefresh(); 267 void setModifiedWOrefresh();
268 268
269 /** 269 /**
270 Marks the address book as modified concerning the argument. 270 Marks the address book as modified concerning the argument.
271 */ 271 */
272 void setModified( bool modified ); 272 void setModified( bool modified );
273 273
274 /** 274 /**
275 Returns whether the address book is modified. 275 Returns whether the address book is modified.
276 */ 276 */
277 bool modified() const; 277 bool modified() const;
278 278
279 /** 279 /**
280 Called whenever an contact is modified in the contact editor 280 Called whenever an contact is modified in the contact editor
281 dialog or the quick edit. 281 dialog or the quick edit.
282 */ 282 */
283 void contactModified( const KABC::Addressee &addr ); 283 void contactModified( const KABC::Addressee &addr );
284 284
285 /** 285 /**
286 DCOP METHODS. 286 DCOP METHODS.
287 */ 287 */
288 void addEmail( QString addr ); 288 void addEmail( QString addr );
289 void importVCard( const KURL& url, bool showPreview ); 289 void importVCard( const KURL& url, bool showPreview );
290 void importVCard( const QString& vCard, bool showPreview ); 290 void importVCard( const QString& vCard, bool showPreview );
291 void newContact(); 291 void newContact();
292 QString getNameByPhone( const QString& phone ); 292 QString getNameByPhone( const QString& phone );
293 /** 293 /**
294 END DCOP METHODS 294 END DCOP METHODS
295 */ 295 */
296 296
297 /** 297 /**
298 Saves the contents of the AddressBook back to disk. 298 Saves the contents of the AddressBook back to disk.
299 */ 299 */
300 void save(); 300 void save();
301 301
302 /** 302 /**
303 Undos the last command using the undo stack. 303 Undos the last command using the undo stack.
304 */ 304 */
305 void undo(); 305 void undo();
306 306
307 /** 307 /**
308 Redos the last command that was undone, using the redo stack. 308 Redos the last command that was undone, using the redo stack.
309 */ 309 */
310 void redo(); 310 void redo();
311 311
312 /** 312 /**
313 Shows the edit dialog for the given uid. If the uid is QString::null, 313 Shows the edit dialog for the given uid. If the uid is QString::null,
314 the method will try to find a selected addressee in the view. 314 the method will try to find a selected addressee in the view.
315 */ 315 */
316 void editContact( const QString &uid /*US = QString::null*/ ); 316 void editContact( const QString &uid /*US = QString::null*/ );
317//US added a second method without defaultparameter 317//US added a second method without defaultparameter
318 void editContact2(); 318 void editContact2();
319 319
320 /** 320 /**
321 Shows or edits the detail view for the given uid. If the uid is QString::null, 321 Shows or edits the detail view for the given uid. If the uid is QString::null,
322 the method will try to find a selected addressee in the view. 322 the method will try to find a selected addressee in the view.
323 */ 323 */
324 void executeContact( const QString &uid /*US = QString::null*/ ); 324 void executeContact( const QString &uid /*US = QString::null*/ );
325 325
326 /** 326 /**
327 Launches the configuration dialog. 327 Launches the configuration dialog.
328 */ 328 */
329 void openConfigDialog(); 329 void openConfigDialog();
330 330
331 /** 331 /**
332 Launches the ldap search dialog. 332 Launches the ldap search dialog.
333 */ 333 */
334 void openLDAPDialog(); 334 void openLDAPDialog();
335 335
336 /** 336 /**
337 Creates a KAddressBookPrinter, which will display the print 337 Creates a KAddressBookPrinter, which will display the print
338 dialog and do the printing. 338 dialog and do the printing.
339 */ 339 */
340 void print(); 340 void print();
341 341
342 /** 342 /**
343 Registers a new GUI client, so plugins can register its actions. 343 Registers a new GUI client, so plugins can register its actions.
344 */ 344 */
345 void addGUIClient( KXMLGUIClient *client ); 345 void addGUIClient( KXMLGUIClient *client );
346 346
347 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); 347 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
348 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 348 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
349 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); 349 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid);
350 350
351 351
352 signals: 352 signals:
353 void contactSelected( const QString &name ); 353 void contactSelected( const QString &name );
354 void contactSelected( const QPixmap &pixmap ); 354 void contactSelected( const QPixmap &pixmap );
355 public slots: 355 public slots:
356 void recieve(QString cmsg ); 356 void recieve(QString cmsg );
357 void getFile( bool success ); 357 void getFile( bool success );
358 void syncFileRequest(); 358 void syncFileRequest();
359 void setDetailsVisible( bool visible ); 359 void setDetailsVisible( bool visible );
360 void setDetailsToState(); 360 void setDetailsToState();
361 // void slotSyncMenu( int ); 361 // void slotSyncMenu( int );
362 private slots: 362 private slots:
363 void updateToolBar();
363 void receive( const QCString& cmsg, const QByteArray& data ); 364 void receive( const QCString& cmsg, const QByteArray& data );
364 void toggleBeamReceive( ); 365 void toggleBeamReceive( );
365 void disableBR(bool); 366 void disableBR(bool);
366 void setJumpButtonBarVisible( bool visible ); 367 void setJumpButtonBarVisible( bool visible );
367 void setCaptionBack(); 368 void setCaptionBack();
368 void importFromOL(); 369 void importFromOL();
369 void extensionModified( const KABC::Addressee::List &list ); 370 void extensionModified( const KABC::Addressee::List &list );
370 void extensionChanged( int id ); 371 void extensionChanged( int id );
371 void clipboardDataChanged(); 372 void clipboardDataChanged();
372 void updateActionMenu(); 373 void updateActionMenu();
373 void configureKeyBindings(); 374 void configureKeyBindings();
374 void removeVoice(); 375 void removeVoice();
375#ifdef KAB_EMBEDDED 376#ifdef KAB_EMBEDDED
376 void configureResources(); 377 void configureResources();
377#endif //KAB_EMBEDDED 378#endif //KAB_EMBEDDED
378 379
379 void slotEditorDestroyed( const QString &uid ); 380 void slotEditorDestroyed( const QString &uid );
380 void configurationChanged(); 381 void configurationChanged();
381 void addressBookChanged(); 382 void addressBookChanged();
382 383
383 private: 384 private:
384 bool mBRdisabled; 385 bool mBRdisabled;
385#ifndef DESKTOP_VERSION 386#ifndef DESKTOP_VERSION
386 QCopChannel* infrared; 387 QCopChannel* infrared;
387#endif 388#endif
388 QTimer *mMessageTimer; 389 QTimer *mMessageTimer;
389 void initGUI(); 390 void initGUI();
390 void initActions(); 391 void initActions();
391 QString getPhoneFile(); 392 QString getPhoneFile();
392 393
393 AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, 394 AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent,
394 const char *name = 0 ); 395 const char *name = 0 );
395 396
396 KXMLGUIClient *mGUIClient; 397 KXMLGUIClient *mGUIClient;
397 398
398 KABC::AddressBook *mAddressBook; 399 KABC::AddressBook *mAddressBook;
399 400
400 ViewManager *mViewManager; 401 ViewManager *mViewManager;
401 // QSplitter *mDetailsSplitter; 402 // QSplitter *mDetailsSplitter;
402 KDGanttMinimizeSplitter *mExtensionBarSplitter; 403 KDGanttMinimizeSplitter *mExtensionBarSplitter;
403 ViewContainer *mDetails; 404 ViewContainer *mDetails;
404 KDGanttMinimizeSplitter* mMiniSplitter; 405 KDGanttMinimizeSplitter* mMiniSplitter;
405 XXPortManager *mXXPortManager; 406 XXPortManager *mXXPortManager;
406 JumpButtonBar *mJumpButtonBar; 407 JumpButtonBar *mJumpButtonBar;
407 IncSearchWidget *mIncSearchWidget; 408 IncSearchWidget *mIncSearchWidget;
408 ExtensionManager *mExtensionManager; 409 ExtensionManager *mExtensionManager;
409 410
410 KCMultiDialog *mConfigureDialog; 411 KCMultiDialog *mConfigureDialog;
411 412
412#ifndef KAB_EMBEDDED 413#ifndef KAB_EMBEDDED
413 LDAPSearchDialog *mLdapSearchDialog; 414 LDAPSearchDialog *mLdapSearchDialog;
414#endif //KAB_EMBEDDED 415#endif //KAB_EMBEDDED
415 // QDict<AddresseeEditorDialog> mEditorDict; 416 // QDict<AddresseeEditorDialog> mEditorDict;
416 AddresseeEditorDialog *mEditorDialog; 417 AddresseeEditorDialog *mEditorDialog;
417 bool mReadWrite; 418 bool mReadWrite;
418 bool mModified; 419 bool mModified;
419 bool mIsPart; 420 bool mIsPart;
420 bool mMultipleViewsAtOnce; 421 bool mMultipleViewsAtOnce;
421 422
422 423
423 //US file menu 424 //US file menu
424 KAction *mActionMail; 425 KAction *mActionMail;
425 KAction *mActionBeam; 426 KAction *mActionBeam;
426 KToggleAction *mActionBR; 427 KToggleAction *mActionBR;
427 KAction *mActionExport2phone; 428 KAction *mActionExport2phone;
428 KAction* mActionPrint; 429 KAction* mActionPrint;
429 KAction* mActionNewContact; 430 KAction* mActionNewContact;
430 KAction *mActionSave; 431 KAction *mActionSave;
431 KAction *mActionEditAddressee; 432 KAction *mActionEditAddressee;
432 KAction *mActionMailVCard; 433 KAction *mActionMailVCard;
433 KAction *mActionBeamVCard; 434 KAction *mActionBeamVCard;
434 435
435 KAction *mActionQuit; 436 KAction *mActionQuit;
436 437
437 //US edit menu 438 //US edit menu
438 KAction *mActionCopy; 439 KAction *mActionCopy;
439 KAction *mActionCut; 440 KAction *mActionCut;
440 KAction *mActionPaste; 441 KAction *mActionPaste;
441 KAction *mActionSelectAll; 442 KAction *mActionSelectAll;
442 KAction *mActionUndo; 443 KAction *mActionUndo;
443 KAction *mActionRedo; 444 KAction *mActionRedo;
444 KAction *mActionDelete; 445 KAction *mActionDelete;
445 446
446 //US settings menu 447 //US settings menu
447 KAction *mActionConfigResources; 448 KAction *mActionConfigResources;
448 KAction *mActionConfigKAddressbook; 449 KAction *mActionConfigKAddressbook;
449 KAction *mActionConfigShortcuts; 450 KAction *mActionConfigShortcuts;
450 KAction *mActionConfigureToolbars; 451 KAction *mActionConfigureToolbars;
451 KAction *mActionKeyBindings; 452 KAction *mActionKeyBindings;
452 KToggleAction *mActionJumpBar; 453 KToggleAction *mActionJumpBar;
453 KToggleAction *mActionDetails; 454 KToggleAction *mActionDetails;
454 KAction *mActionWhoAmI; 455 KAction *mActionWhoAmI;
455 KAction *mActionCategories; 456 KAction *mActionCategories;
456 KAction *mActionEditCategories; 457 KAction *mActionEditCategories;
457 KAction *mActionManageCategories; 458 KAction *mActionManageCategories;
458 KAction *mActionAboutKAddressbook; 459 KAction *mActionAboutKAddressbook;
459 KAction *mActionLicence; 460 KAction *mActionLicence;
460 KAction *mActionFaq; 461 KAction *mActionFaq;
461 KAction *mActionWN; 462 KAction *mActionWN;
462 KAction *mActionSyncHowto; 463 KAction *mActionSyncHowto;
463 KAction *mActionKdeSyncHowto; 464 KAction *mActionKdeSyncHowto;
464 KAction *mActionMultiSyncHowto; 465 KAction *mActionMultiSyncHowto;
465 466
466 KAction *mActionDeleteView; 467 KAction *mActionDeleteView;
467 468
468 QPopupMenu *viewMenu; 469 QPopupMenu *viewMenu;
469 QPopupMenu *filterMenu; 470 QPopupMenu *filterMenu;
470 QPopupMenu *settingsMenu; 471 QPopupMenu *settingsMenu;
471 QPopupMenu *changeMenu; 472 QPopupMenu *changeMenu;
472//US QAction *mActionSave; 473//US QAction *mActionSave;
473 QPopupMenu *ImportMenu; 474 QPopupMenu *ImportMenu;
474 QPopupMenu *ExportMenu; 475 QPopupMenu *ExportMenu;
475 //LR additional methods 476 //LR additional methods
476 KAction *mActionRemoveVoice; 477 KAction *mActionRemoveVoice;
477 KAction * mActionImportOL; 478 KAction * mActionImportOL;
478 479
479#ifndef KAB_EMBEDDED 480#ifndef KAB_EMBEDDED
480 KAddressBookService *mAddressBookService; 481 KAddressBookService *mAddressBookService;
481#endif //KAB_EMBEDDED 482#endif //KAB_EMBEDDED
482 483
483 class KABCorePrivate; 484 class KABCorePrivate;
484 KABCorePrivate *d; 485 KABCorePrivate *d;
485 //US bool mBlockSaveFlag; 486 //US bool mBlockSaveFlag;
486 487
487#ifdef KAB_EMBEDDED 488#ifdef KAB_EMBEDDED
488 KAddressBookMain *mMainWindow; // should be the same like mGUIClient 489 KAddressBookMain *mMainWindow; // should be the same like mGUIClient
489#endif //KAB_EMBEDDED 490#endif //KAB_EMBEDDED
490 491
491 //this are the overwritten callbackmethods from the syncinterface 492 //this are the overwritten callbackmethods from the syncinterface
492 virtual bool sync(KSyncManager* manager, QString filename, int mode); 493 virtual bool sync(KSyncManager* manager, QString filename, int mode);
493 virtual bool syncExternal(KSyncManager* manager, QString resource); 494 virtual bool syncExternal(KSyncManager* manager, QString resource);
494 virtual void removeSyncInfo( QString syncProfile); 495 virtual void removeSyncInfo( QString syncProfile);
495 bool syncPhone(); 496 bool syncPhone();
496 void message( QString m ); 497 void message( QString m );
497 498
498 // LR ******************************* 499 // LR *******************************
499 // sync stuff! 500 // sync stuff!
500 QString sentSyncFile(); 501 QString sentSyncFile();
501 QPopupMenu *syncMenu; 502 QPopupMenu *syncMenu;
502 KSyncManager* syncManager; 503 KSyncManager* syncManager;
503 int mGlobalSyncMode; 504 int mGlobalSyncMode;
504 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); 505 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode);
505 KABC::Addressee getLastSyncAddressee(); 506 KABC::Addressee getLastSyncAddressee();
506 QDateTime mLastAddressbookSync; 507 QDateTime mLastAddressbookSync;
507 int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); 508 int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full );
508 // ********************* 509 // *********************
509 510
510}; 511};
511 512
512#endif 513#endif