summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt6
-rw-r--r--kabc/addressee.cpp25
-rw-r--r--kabc/addressee.h5
-rw-r--r--kabc/field.cpp20
-rw-r--r--kabc/phonenumber.cpp13
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp2
7 files changed, 61 insertions, 12 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 53eb428..bc0c62a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,252 +1,254 @@
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 2.0.26 ************ 3********** VERSION 2.0.26 ************
4 4
5And again fixed some bugs. 5And again fixed some bugs.
6Added two more fields to the KA/Pi view config:
7A "Mobile (home)" and a "Mobile (work)" field.
6 8
7********** VERSION 2.0.25 ************ 9********** VERSION 2.0.25 ************
8 10
9And again fixed some bugs. 11And again fixed some bugs.
10 12
11********** VERSION 2.0.24 ************ 13********** VERSION 2.0.24 ************
12 14
13Fixed again a lot of small bugs. 15Fixed again a lot of small bugs.
14Some performance optimizations in date navigator. 16Some performance optimizations in date navigator.
15Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row. 17Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row.
16 18
17********** VERSION 2.0.23 ************ 19********** VERSION 2.0.23 ************
18 20
19Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. 21Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation.
20Fixed the (agenda) layout of KO/Pi on 5500er. 22Fixed the (agenda) layout of KO/Pi on 5500er.
21Some usebility enhancements (e.g. reselection the current item of the todo view after some changes). 23Some usebility enhancements (e.g. reselection the current item of the todo view after some changes).
22 24
23********** VERSION 2.0.22 ************ 25********** VERSION 2.0.22 ************
24 26
25KO/Pi: 27KO/Pi:
26Fix for creating events/todos via the abgenda context menu. 28Fix for creating events/todos via the abgenda context menu.
27Added option to split toolbar to 3 toolbars. 29Added option to split toolbar to 3 toolbars.
28(Toolbar moving s disabled for this option due to a bug in Qt somewhere). 30(Toolbar moving s disabled for this option due to a bug in Qt somewhere).
29Added option to show one small filter-view-toolbar. 31Added option to show one small filter-view-toolbar.
30Added a print option to the desktop version: 32Added a print option to the desktop version:
31Now you can print out the view of the "Event Viewer". 33Now you can print out the view of the "Event Viewer".
32That means you can print all data of one particular event/todo. 34That means you can print all data of one particular event/todo.
33Added scaling options to printout of Event Viewer and What'sNext View. 35Added scaling options to printout of Event Viewer and What'sNext View.
34Fixed some problems in the month view in "week start sunday" mode. 36Fixed some problems in the month view in "week start sunday" mode.
35KA/Pi: 37KA/Pi:
36Added two more config options. 38Added two more config options.
37Fixed resizing problem of address request dialog when orientation was switched. 39Fixed resizing problem of address request dialog when orientation was switched.
38Cleaned up the menu structure. 40Cleaned up the menu structure.
39Fixed some more problems. 41Fixed some more problems.
40 42
41Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views. 43Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views.
42 44
43And, this is a really cool option (Ben did suggest it): 45And, this is a really cool option (Ben did suggest it):
44Now KO/Pi and KA/Pi can be run from a USB stick: 46Now KO/Pi and KA/Pi can be run from a USB stick:
45All data is read from and written to the stick. 47All data is read from and written to the stick.
46You can enable this in the global configure option TAB with: 48You can enable this in the global configure option TAB with:
47Save using LOCAL storage. 49Save using LOCAL storage.
48Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online. 50Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online.
49 51
50********** VERSION 2.0.21 ************ 52********** VERSION 2.0.21 ************
51 53
52Fixed another SMTP problem in OM/Pi. 54Fixed another SMTP problem in OM/Pi.
53Some small changed in the new datenavigator in KO/Pi. 55Some small changed in the new datenavigator in KO/Pi.
54Changed default setting for new filter in KA/Pi to "exclude categories". 56Changed default setting for new filter in KA/Pi to "exclude categories".
55Changed the default font size for 640x480 display . 57Changed the default font size for 640x480 display .
56Changed popup menu behaviour in agenda and list view. 58Changed popup menu behaviour in agenda and list view.
57Fixed some layout problems of the date label size in the month view. 59Fixed some layout problems of the date label size in the month view.
58Made month view update faster. 60Made month view update faster.
59Made first datenavigator repainting faster. 61Made first datenavigator repainting faster.
60Changed the title of the event/todo edit dialogs. 62Changed the title of the event/todo edit dialogs.
61Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). 63Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course).
62Many small usebility fixes in KO/Pi. 64Many small usebility fixes in KO/Pi.
63Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. 65Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi.
64The set of possible "next views" are the views you have toolbar buttons for. 66The set of possible "next views" are the views you have toolbar buttons for.
65 67
66Made alarm sound working on Linux. 68Made alarm sound working on Linux.
67 69
68KO/Pi alarm applet changed: 70KO/Pi alarm applet changed:
69Made buttons in alarm dialog much bigger. 71Made buttons in alarm dialog much bigger.
70Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. 72Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger.
71The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. 73The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings.
72 74
73And because this version is realeased at Easter, I added an Easter-egg: 75And because this version is realeased at Easter, I added an Easter-egg:
74With a new undocumented command you can get a message box about the next alarm. 76With a new undocumented command you can get a message box about the next alarm.
75Good luck to find it! 77Good luck to find it!
76 78
77 79
78 80
79********** VERSION 2.0.20 ************ 81********** VERSION 2.0.20 ************
80 82
81Two small fixes in OM/Pi. 83Two small fixes in OM/Pi.
82 84
83Better resizing of the new datenavigator in KO/Pi. 85Better resizing of the new datenavigator in KO/Pi.
84 86
85********** VERSION 2.0.19 ************ 87********** VERSION 2.0.19 ************
86KO/Pi: 88KO/Pi:
87Enhancements and bugfixes in the new datenavigator. 89Enhancements and bugfixes in the new datenavigator.
88Bugfix in this changelog: 90Bugfix in this changelog:
89The datenavigator was changed in version 2.0.18, not the datepicker. 91The datenavigator was changed in version 2.0.18, not the datepicker.
90 92
91********** VERSION 2.0.18 ************ 93********** VERSION 2.0.18 ************
92KO/Pi: 94KO/Pi:
93Fixed some minor problems. 95Fixed some minor problems.
94Cleaned up the KO/Pi config dialog. 96Cleaned up the KO/Pi config dialog.
95Fixed problem moving events in aganda view. 97Fixed problem moving events in aganda view.
96Made datepicker scaleable, i.e. if the datenavigator shows now a 98Made datepicker scaleable, i.e. if the datenavigator shows now a
97datenavigator matrix depending on its size. 99datenavigator matrix depending on its size.
98Birthdays are now displayed green in the datenavigator. 100Birthdays are now displayed green in the datenavigator.
99What'sThis Help in datenavigator shows all events of the day. 101What'sThis Help in datenavigator shows all events of the day.
100 102
101OM/Pi: 103OM/Pi:
102Updated the backend mail library to the latest version. 104Updated the backend mail library to the latest version.
103Please backup your mail before using this version. 105Please backup your mail before using this version.
104 106
105********** VERSION 2.0.17 ************ 107********** VERSION 2.0.17 ************
106 108
107KO/Pi: 109KO/Pi:
108Tooltips in month view were not sorted. Fixed. 110Tooltips in month view were not sorted. Fixed.
109Daylabel in agenda view ( for display of one day ) was too short. Fixed. 111Daylabel in agenda view ( for display of one day ) was too short. Fixed.
110Conflict display dialog for syncing was not on top of other windows. Fixed. 112Conflict display dialog for syncing was not on top of other windows. Fixed.
111Fixed some minor problems. 113Fixed some minor problems.
112 114
113Fixed an endless loop when importing vcs file with RESOURCES entry. 115Fixed an endless loop when importing vcs file with RESOURCES entry.
114 116
115********** VERSION 2.0.16 ************ 117********** VERSION 2.0.16 ************
116OM/Pi: 118OM/Pi:
117Fixed the SMTP account setting the option. 119Fixed the SMTP account setting the option.
118Fixed something in mail sending. 120Fixed something in mail sending.
119 121
120KO/Pi: 122KO/Pi:
121Added possibility to export selected events/todos as vcal file. 123Added possibility to export selected events/todos as vcal file.
122 124
123********** VERSION 2.0.15 ************ 125********** VERSION 2.0.15 ************
124 126
125PwM/Pi: 127PwM/Pi:
126Added keyboard shorcuts for 128Added keyboard shorcuts for
127- toggling summary view (space bar) 129- toggling summary view (space bar)
128- delete item (delete + backspace key) 130- delete item (delete + backspace key)
129- add new item ( i + n key) 131- add new item ( i + n key)
130Fixed length of info in the title. 132Fixed length of info in the title.
131 133
132KO/Pi-KA/Pi: 134KO/Pi-KA/Pi:
133Changed "ME" menu bar entry to an icon. 135Changed "ME" menu bar entry to an icon.
134 136
135KO/Pi: 137KO/Pi:
136Fixed two minor bugs in displaying todos. 138Fixed two minor bugs in displaying todos.
137If in month view a cell is selected, the key shortcut "d" shows now that date. 139If in month view a cell is selected, the key shortcut "d" shows now that date.
138Added complete info for a todo in month view as an icon left of the text. 140Added complete info for a todo in month view as an icon left of the text.
139Fixed problems of displaying data when "<" or ">" are used in summary/location/description. 141Fixed problems of displaying data when "<" or ">" are used in summary/location/description.
140Fixed problem of search dialog size when switching displays. 142Fixed problem of search dialog size when switching displays.
141Cancel key now closes date picker. 143Cancel key now closes date picker.
142Rearranged KO/Pi file menu structure. 144Rearranged KO/Pi file menu structure.
143 145
144OM/Pi: 146OM/Pi:
145Added to the SMTP account setting the option 147Added to the SMTP account setting the option
146"No secure connection". 148"No secure connection".
147You have to configure your SMTP accounts again, sorry. 149You have to configure your SMTP accounts again, sorry.
148 150
149KA/Pi: 151KA/Pi:
150Added support for importing quoted-printable. 152Added support for importing quoted-printable.
151Support was added by Peter P.. Thanks, Peter! 153Support was added by Peter P.. Thanks, Peter!
152 154
153 155
154********** VERSION 2.0.14 ************ 156********** VERSION 2.0.14 ************
155 157
156Made Passwordmanager PwM/Pi more userfriendly: 158Made Passwordmanager PwM/Pi more userfriendly:
157Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 159Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
158Fixed bug in KO/Pi todo printing. 160Fixed bug in KO/Pi todo printing.
159Made Qtopia calendar import possible on desktop . 161Made Qtopia calendar import possible on desktop .
160 162
161********** VERSION 2.0.13 ************ 163********** VERSION 2.0.13 ************
162 164
163Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. 165Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter.
164 166
165In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". 167In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down".
166 168
167OM/Pi: 169OM/Pi:
168Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. 170Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails.
169Added missing German translation. 171Added missing German translation.
170Added warning if path is specified in local folder settings of account config. 172Added warning if path is specified in local folder settings of account config.
171 173
172********** VERSION 2.0.12 ************ 174********** VERSION 2.0.12 ************
173 175
174KO/Pi: 176KO/Pi:
175Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. 177Fixed a bug in todo start/due date handling for non recurring todos with a start and due date.
176Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. 178Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes.
177Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. 179Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer.
178 180
179Fixed problem in pi-sync mode when wrong password was sent. 181Fixed problem in pi-sync mode when wrong password was sent.
180 182
181OM/Pi: 183OM/Pi:
182Fixed a crash when displaying mails with "Show mail as html" was checked in the config. 184Fixed a crash when displaying mails with "Show mail as html" was checked in the config.
183Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. 185Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled.
184 186
185********** VERSION 2.0.11 ************ 187********** VERSION 2.0.11 ************
186 188
187Fixed some problems in pi-sync mode 189Fixed some problems in pi-sync mode
188(e.g. details of events were not synced properly) 190(e.g. details of events were not synced properly)
189 191
190********** VERSION 2.0.10 ************ 192********** VERSION 2.0.10 ************
191 193
192KO/Pi: 194KO/Pi:
193In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. 195In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
194This is fixed. 196This is fixed.
195Changed the search dialog a bit to make it more user friendly. 197Changed the search dialog a bit to make it more user friendly.
196(E.g.: Removed message box about "no items found" and set key focus to search line edit after search). 198(E.g.: Removed message box about "no items found" and set key focus to search line edit after search).
197 199
198Added config option to hide the week number in KO/Pi toolbar. 200Added config option to hide the week number in KO/Pi toolbar.
199 201
200********** VERSION 2.0.9 ************ 202********** VERSION 2.0.9 ************
201 203
202Made month view icons for multiday events a bit nicer. 204Made month view icons for multiday events a bit nicer.
203Some minor fixes in KO/Pi 205Some minor fixes in KO/Pi
204(e.g. go to today did not work for new week view properly). 206(e.g. go to today did not work for new week view properly).
205 207
206 208
207********** VERSION 2.0.8 ************ 209********** VERSION 2.0.8 ************
208 210
209Fixed a problem in dependency info in the ipk files for the Zaurus. 211Fixed a problem in dependency info in the ipk files for the Zaurus.
210 212
211Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. 213Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar.
212 214
213Added a "go today" button to the datepicker. 215Added a "go today" button to the datepicker.
214 216
215Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) 217Added "created" and "last modified" to event/todo viewer (and What'sThis viewer)
216and made it configureable to show these values. 218and made it configureable to show these values.
217 219
218Fixed a problem for events (from external iCal files) that do have a duration but no end date. 220Fixed a problem for events (from external iCal files) that do have a duration but no end date.
219 221
220 222
221********** VERSION 2.0.7 ************ 223********** VERSION 2.0.7 ************
222 224
223Added global application font settings 225Added global application font settings
224(for all KDE-Pim/Pi apps) to the general settings. 226(for all KDE-Pim/Pi apps) to the general settings.
225 227
226Fixed a problem in OM/Pi when trying to login to some IMAP servers 228Fixed a problem in OM/Pi when trying to login to some IMAP servers
227(like the IMAP server of Apple: mail.mac.com ) 229(like the IMAP server of Apple: mail.mac.com )
228 230
229Added recurring todos to KO/Pi. 231Added recurring todos to KO/Pi.
230 232
231 233
232********** VERSION 2.0.6 ************ 234********** VERSION 2.0.6 ************
233 235
234Stable release 2.0.6! 236Stable release 2.0.6!
235 237
236Some bugfixes in the pi-sync mode. 238Some bugfixes in the pi-sync mode.
237Added German translation for pi-sync mode. 239Added German translation for pi-sync mode.
238 240
239KO/Pi: 241KO/Pi:
240Made the todolist using alternate background. 242Made the todolist using alternate background.
241 243
242Other minor fixes in KO/Pi. 244Other minor fixes in KO/Pi.
243 245
244 246
245You can find the complete changelog 247You can find the complete changelog
246from version 1.7.7 to 2.0.5 248from version 1.7.7 to 2.0.5
247in the source package or on 249in the source package or on
248 250
249http://www.pi-sync.net/html/changelog.html 251http://www.pi-sync.net/html/changelog.html
250 252
251 253
252 254
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index e54e140..f67a34d 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -244,519 +244,519 @@
244{ "ftp","ftp" }, 244{ "ftp","ftp" },
245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
251{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 251{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
253{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 253{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
254{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 254{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
259{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 259{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
260{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 260{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
261{ "KDE-Pim Sync","KDE-Pim Sync" }, 261{ "KDE-Pim Sync","KDE-Pim Sync" },
262{ "Multiple profiles","Multi-Sync Profile" }, 262{ "Multiple profiles","Multi-Sync Profile" },
263{ "Device: ","Gerät: " }, 263{ "Device: ","Gerät: " },
264{ "Multiple sync started.","Multi-Sync gestartet." }, 264{ "Multiple sync started.","Multi-Sync gestartet." },
265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" }, 266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" },
267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" }, 267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" },
268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
269{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 269{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
271{ "Edit Address Book Filters","Editiere Addressbuch Filter" }, 271{ "Edit Address Book Filters","Editiere Addressbuch Filter" },
272{ "&Add...","Hinzufügen..." }, 272{ "&Add...","Hinzufügen..." },
273{ "&Edit...","B&earbeiten..." }, 273{ "&Edit...","B&earbeiten..." },
274{ "&Remove","Entfe&rne" }, 274{ "&Remove","Entfe&rne" },
275{ "Modify View: ","Ansicht ändern: " }, 275{ "Modify View: ","Ansicht ändern: " },
276{ "Fields","Felder" }, 276{ "Fields","Felder" },
277{ "Select Fields to Display","Wähle anzuzeigende Felder" }, 277{ "Select Fields to Display","Wähle anzuzeigende Felder" },
278{ "All","Alles" }, 278{ "All","Alles" },
279{ "Frequent","Frequent" }, 279{ "Frequent","Frequent" },
280{ "Address","Adresse" }, 280{ "Address","Adresse" },
281{ "Email","E-Mail" }, 281{ "Email","E-Mail" },
282{ "Personal","Persönl." }, 282{ "Personal","Persönl." },
283{ "Organization","Organisation" }, 283{ "Organization","Organisation" },
284{ "Custom","Benutzerdefiniert" }, 284{ "Custom","Benutzerdefiniert" },
285{ "&Selected\nfields:","&Selektierte\nFelder:" }, 285{ "&Selected\nfields:","&Selektierte\nFelder:" },
286{ "Formatted Name","Format. Name" }, 286{ "Formatted Name","Format. Name" },
287{ "Additional Names","Mittelname" }, 287{ "Additional Names","Mittelname" },
288{ "Honorific Prefixes","Namen Prefix" }, 288{ "Honorific Prefixes","Namen Prefix" },
289{ "Honorific Suffixes","Namen Suffix" }, 289{ "Honorific Suffixes","Namen Suffix" },
290{ "Nick Name","Sptitzname" }, 290{ "Nick Name","Sptitzname" },
291{ "Birthday","Geburtstag" }, 291{ "Birthday","Geburtstag" },
292{ "Home Address Street","Privat Adresse Strasse" }, 292{ "Home Address Street","Privat Adresse Strasse" },
293{ "Home Address Locality","Privat Adresse Stadt" }, 293{ "Home Address Locality","Privat Adresse Stadt" },
294{ "Home Address Region","Privat Adresse Bundesland" }, 294{ "Home Address Region","Privat Adresse Bundesland" },
295{ "Home Address Postal Code","Privat Adresse PLZ" }, 295{ "Home Address Postal Code","Privat Adresse PLZ" },
296{ "Home Address Country","Privat Adresse Land" }, 296{ "Home Address Country","Privat Adresse Land" },
297{ "Home Address Label","Privat Adresse Label" }, 297{ "Home Address Label","Privat Adresse Label" },
298{ "Business Address Street","Büro Adresse Strasse" }, 298{ "Business Address Street","Büro Adresse Strasse" },
299{ "Business Address Locality","Büro Adresse Stadt" }, 299{ "Business Address Locality","Büro Adresse Stadt" },
300{ "Business Address Region","Büro Adresse Bundesland" }, 300{ "Business Address Region","Büro Adresse Bundesland" },
301{ "Business Address Postal Code","Büro Adresse PLZ" }, 301{ "Business Address Postal Code","Büro Adresse PLZ" },
302{ "Business Address Country","Büro Adresse Land" }, 302{ "Business Address Country","Büro Adresse Land" },
303{ "Business Address Label","Büro Adresse Label" }, 303{ "Business Address Label","Büro Adresse Label" },
304{ "Home Phone","Privat Telefon" }, 304{ "Home Phone","Privat Telefon" },
305{ "Business Phone","Büro Telefon" }, 305{ "Business Phone","Büro Telefon" },
306{ "Mobile Phone","Handy" }, 306{ "Mobile Phone","Handy" },
307{ "Home Fax","Privat Fax" }, 307{ "Home Fax","Privat Fax" },
308{ "Business Fax","Büro Fax" }, 308{ "Business Fax","Büro Fax" },
309{ "Car Phone","Autotelefon" }, 309{ "Car Phone","Autotelefon" },
310{ "ISDN","ISDN" }, 310{ "ISDN","ISDN" },
311{ "Pager","Pager" }, 311{ "Pager","Pager" },
312{ "Mail Client","Mail Client" }, 312{ "Mail Client","Mail Client" },
313{ "Title","Titel" }, 313{ "Title","Titel" },
314{ "Role","Rolle" }, 314{ "Role","Rolle" },
315{ "Note","Notiz" }, 315{ "Note","Notiz" },
316{ "URL","URL" }, 316{ "URL","URL" },
317{ "Resource","Resource" }, 317{ "Resource","Resource" },
318{ "SIP","SIP" }, 318{ "SIP","SIP" },
319{ "Default Filter","Default Filter" }, 319{ "Default Filter","Default Filter" },
320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." }, 320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." },
321{ "No default filter","Kein default Filter" }, 321{ "No default filter","Kein default Filter" },
322{ "Use last active filter","Nutze letzen aktiven Filter" }, 322{ "Use last active filter","Nutze letzen aktiven Filter" },
323{ "Use filter:","Nutze Filter:" }, 323{ "Use filter:","Nutze Filter:" },
324{ "Look & Feel","Look & Feel" }, 324{ "Look & Feel","Look & Feel" },
325{ "Row Separator","Reihen Separator" }, 325{ "Row Separator","Reihen Separator" },
326{ "Alternating backgrounds","Abwechselnder Hintergrund" }, 326{ "Alternating backgrounds","Abwechselnder Hintergrund" },
327{ "Single line","Einzelne Zeile" }, 327{ "Single line","Einzelne Zeile" },
328{ "Enable background image:","Hintergrundbild:" }, 328{ "Enable background image:","Hintergrundbild:" },
329{ "Enable contact tooltips","Contact Tooltips" }, 329{ "Enable contact tooltips","Contact Tooltips" },
330{ "&Enable custom Colors","Benutzerdef. Farben" }, 330{ "&Enable custom Colors","Benutzerdef. Farben" },
331{ "&Colors","Farben" }, 331{ "&Colors","Farben" },
332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." }, 332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." },
333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." }, 333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." },
334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" }, 334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
335{ "&Text font:","Textschriftart:" }, 335{ "&Text font:","Textschriftart:" },
336{ "&Header font:","Titelschriftart:" }, 336{ "&Header font:","Titelschriftart:" },
337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." }, 337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." },
338{ "&Fonts","Schri&ften" }, 338{ "&Fonts","Schri&ften" },
339{ "Background Color","Hintergrundfarbe" }, 339{ "Background Color","Hintergrundfarbe" },
340{ "Text Color","Textfarbe" }, 340{ "Text Color","Textfarbe" },
341{ "Header Background Color","Titel Hintergrundfarbe" }, 341{ "Header Background Color","Titel Hintergrundfarbe" },
342{ "Header Text Color","Titel Farbe" }, 342{ "Header Text Color","Titel Farbe" },
343{ "Highlight Color","Auswahlfarbe" }, 343{ "Highlight Color","Auswahlfarbe" },
344{ "Highlighted Text Color","Auswahltextfarbe" }, 344{ "Highlighted Text Color","Auswahltextfarbe" },
345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" }, 345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
346{ "Postal","Post" }, 346{ "Postal","Post" },
347{ "Dr.","Dr." }, 347{ "Dr.","Dr." },
348{ "Miss","Frl." }, 348{ "Miss","Frl." },
349{ "Mr.","Herr" }, 349{ "Mr.","Herr" },
350{ "Mrs.","Frau" }, 350{ "Mrs.","Frau" },
351{ "Ms.","Fr." }, 351{ "Ms.","Fr." },
352{ "Prof.","Prof." }, 352{ "Prof.","Prof." },
353{ "I","I" }, 353{ "I","I" },
354{ "II","II" }, 354{ "II","II" },
355{ "III","III" }, 355{ "III","III" },
356{ "Jr.","Jr." }, 356{ "Jr.","Jr." },
357{ "Sr.","Sr." }, 357{ "Sr.","Sr." },
358{ "Name:","Name:" }, 358{ "Name:","Name:" },
359{ "Documents","Dokumente" }, 359{ "Documents","Dokumente" },
360{ "Files","Dateien" }, 360{ "Files","Dateien" },
361{ "All Files","Alle Dateien" }, 361{ "All Files","Alle Dateien" },
362{ "Name","Name" }, 362{ "Name","Name" },
363{ "Size","Größe" }, 363{ "Size","Größe" },
364{ "Date","Datum" }, 364{ "Date","Datum" },
365{ "Mime Type","Mime Typ" }, 365{ "Mime Type","Mime Typ" },
366{ "Geo Data Input","Geo Dateneingabe" }, 366{ "Geo Data Input","Geo Dateneingabe" },
367{ "Sexagesimal","Sexagesimal" }, 367{ "Sexagesimal","Sexagesimal" },
368{ "North","Nord" }, 368{ "North","Nord" },
369{ "South","Süd" }, 369{ "South","Süd" },
370{ "East","Ost" }, 370{ "East","Ost" },
371{ "West","West" }, 371{ "West","West" },
372{ "Undefined","Unbestimmt" }, 372{ "Undefined","Unbestimmt" },
373{ "Edit Address","Bearbeite Adresse" }, 373{ "Edit Address","Bearbeite Adresse" },
374{ "Street:","Strasse:" }, 374{ "Street:","Strasse:" },
375{ "Post office box:","Postfach:" }, 375{ "Post office box:","Postfach:" },
376{ "Locality:","Stadt:" }, 376{ "Locality:","Stadt:" },
377{ "Region:","Region:" }, 377{ "Region:","Region:" },
378{ "Postal code:","PLZ:" }, 378{ "Postal code:","PLZ:" },
379{ "Country:","Staat:" }, 379{ "Country:","Staat:" },
380{ "This is the preferred address","Dies ist die bevorzugte Adresse" }, 380{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
381{ "New...","Neu..." }, 381{ "New...","Neu..." },
382{ "Change Type","Ändere Art" }, 382{ "Change Type","Ändere Art" },
383{ "Edit Address Type","Ändere Address Art" }, 383{ "Edit Address Type","Ändere Address Art" },
384{ "Address Types","Address Art" }, 384{ "Address Types","Address Art" },
385{ "Domestic","Inland" }, 385{ "Domestic","Inland" },
386{ "International","International" }, 386{ "International","International" },
387{ "Parcel","Paket" }, 387{ "Parcel","Paket" },
388{ "Edit Contact Name","Ändere Kontakt Name" }, 388{ "Edit Contact Name","Ändere Kontakt Name" },
389{ "Honorific prefixes:","Namensprefixes:" }, 389{ "Honorific prefixes:","Namensprefixes:" },
390{ "Given name:","Vorname:" }, 390{ "Given name:","Vorname:" },
391{ "Additional names:","Mittelnamen:" }, 391{ "Additional names:","Mittelnamen:" },
392{ "Family names:","Nachname:" }, 392{ "Family names:","Nachname:" },
393{ "Honorific suffixes:","Namenssuffixe:" }, 393{ "Honorific suffixes:","Namenssuffixe:" },
394{ "Parse name automatically","Setze Namen automatisch" }, 394{ "Parse name automatically","Setze Namen automatisch" },
395{ "Edit Phone Numbers","Bearbeite Telefonnummern" }, 395{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
396{ "Number","Nummer" }, 396{ "Number","Nummer" },
397{ "Type","Typ" }, 397{ "Type","Typ" },
398{ "Edit Phone Number","Bearbeite Telefonnummer" }, 398{ "Edit Phone Number","Bearbeite Telefonnummer" },
399{ "Number:","Nummer:" }, 399{ "Number:","Nummer:" },
400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" }, 400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
401{ "Types","Typen" }, 401{ "Types","Typen" },
402{ "Messenger","Messenger" }, 402{ "Messenger","Messenger" },
403{ "Other","Anderes" }, 403{ "Other","Anderes" },
404{ "Video","Video" }, 404{ "Video","Video" },
405{ "Mailbox","Mailbox" }, 405{ "Mailbox","Mailbox" },
406{ "Modem","Modem" }, 406{ "Modem","Modem" },
407{ "Car","Auto" }, 407{ "Car","Auto" },
408{ "PCS","PCS" }, 408{ "PCS","PCS" },
409{ "Category","Kategorie" }, 409{ "Category","Kategorie" },
410{ "Select Categories","Wähle Kategorien" }, 410{ "Select Categories","Wähle Kategorien" },
411{ " &Deselect All "," &Deselektiere alle " }, 411{ " &Deselect All "," &Deselektiere alle " },
412{ " &Edit Categories "," B&earbeite Kategorien " }, 412{ " &Edit Categories "," B&earbeite Kategorien " },
413{ "&OK","&OK" }, 413{ "&OK","&OK" },
414{ "&Cancel","Abbre&chen" }, 414{ "&Cancel","Abbre&chen" },
415{ "Configure","Konfiguriere" }, 415{ "Configure","Konfiguriere" },
416{ "Default","Voreinstellungen" }, 416{ "Default","Voreinstellungen" },
417{ "Addressbook","Adressbuch" }, 417{ "Addressbook","Adressbuch" },
418{ "Details view font","Schriftart Detailansicht" }, 418{ "Details view font","Schriftart Detailansicht" },
419{ "phone:123","phone:123" }, 419{ "phone:123","phone:123" },
420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" }, 420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
421{ "Honor KDE single click","Benutze KDE Einzelklick" }, 421{ "Honor KDE single click","Benutze KDE Einzelklick" },
422{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" }, 422{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" },
423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" }, 423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" },
424{ "Ask for quit when closing Ka/Pi","Vor Beenden von Ka/Pi nachfragen" }, 424{ "Ask for quit when closing Ka/Pi","Vor Beenden von Ka/Pi nachfragen" },
425{ "General","Allgemein" }, 425{ "General","Allgemein" },
426{ "Extensions (restart)","Extensions (restart)" }, 426{ "Extensions (restart)","Extensions (restart)" },
427{ "Description","Beschreibungen" }, 427{ "Description","Beschreibungen" },
428{ "Extensions","Extensions" }, 428{ "Extensions","Extensions" },
429{ "Prefixes","Prefixe" }, 429{ "Prefixes","Prefixe" },
430{ "Inclusions","Inclusions" }, 430{ "Inclusions","Inclusions" },
431{ "Suffixes","Suffixe" }, 431{ "Suffixes","Suffixe" },
432{ "Default formatted name:","Default format. Name:" }, 432{ "Default formatted name:","Default format. Name:" },
433{ "Empty","Leer" }, 433{ "Empty","Leer" },
434{ "Simple Name","Einfacher Name" }, 434{ "Simple Name","Einfacher Name" },
435{ "Full Name","Voller Name" }, 435{ "Full Name","Voller Name" },
436{ "Reverse Name","Namen umdrehen" }, 436{ "Reverse Name","Namen umdrehen" },
437{ "Contact","Kontakt" }, 437{ "Contact","Kontakt" },
438{ "Global","Allgemein" }, 438{ "Global","Allgemein" },
439{ "Phone","Telefon" }, 439{ "Phone","Telefon" },
440{ "SMS","SMS" }, 440{ "SMS","SMS" },
441{ "Language:(needs restart)","Sprache:(Neustart)" }, 441{ "Language:(needs restart)","Sprache:(Neustart)" },
442{ "English","English" }, 442{ "English","English" },
443{ "German","Deutsch" }, 443{ "German","Deutsch" },
444{ "French","Französisch" }, 444{ "French","Französisch" },
445{ "Italian","Italienisch" }, 445{ "Italian","Italienisch" },
446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
447{ "Time Format(nr):","Zeit Format(nr):" }, 447{ "Time Format(nr):","Zeit Format(nr):" },
448{ "24:00","24:00" }, 448{ "24:00","24:00" },
449{ "12:00am","12:00am" }, 449{ "12:00am","12:00am" },
450{ "Week starts on Sunday","Woche beginnt Sonntags" }, 450{ "Week starts on Sunday","Woche beginnt Sonntags" },
451{ "Locale","Locale" }, 451{ "Locale","Locale" },
452{ "Date Format:","Datums Format:" }, 452{ "Date Format:","Datums Format:" },
453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
456{ "User defined","Benutzerdefiniert" }, 456{ "User defined","Benutzerdefiniert" },
457{ "User long date:","Format langes Datum:" }, 457{ "User long date:","Format langes Datum:" },
458{ "User short date:","Format kurzes Datum:" }, 458{ "User short date:","Format kurzes Datum:" },
459{ "Daylight start:","Sommerzeit Beginn:" }, 459{ "Daylight start:","Sommerzeit Beginn:" },
460{ "Daylight end:","Sommerzeit Ende:" }, 460{ "Daylight end:","Sommerzeit Ende:" },
461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
465{ "Date Format","Datums Format" }, 465{ "Date Format","Datums Format" },
466{ "Timezone:","Zeitzone:" }, 466{ "Timezone:","Zeitzone:" },
467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
470{ "Used Mail Client","Benutzter Mail Client" }, 470{ "Used Mail Client","Benutzter Mail Client" },
471{ "Channel:","Channel:" }, 471{ "Channel:","Channel:" },
472{ "Message:","Message:" }, 472{ "Message:","Message:" },
473{ "Parameters:","Parameter:" }, 473{ "Parameters:","Parameter:" },
474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
475{ "extra Message:","extra Message:" }, 475{ "extra Message:","extra Message:" },
476{ "extra Parameters:","extra Parameter:" }, 476{ "extra Parameters:","extra Parameter:" },
477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
478{ "External Apps.","Externe Appl." }, 478{ "External Apps.","Externe Appl." },
479{ "Used %1 Client","Benutzer %1 Client" }, 479{ "Used %1 Client","Benutzer %1 Client" },
480{ "No email client installed","Keine Email Client installiert" }, 480{ "No email client installed","Keine Email Client installiert" },
481{ "Userdefined email client","Benutzerdef. Email Client" }, 481{ "Userdefined email client","Benutzerdef. Email Client" },
482{ "OM/Pi email client","OM/Pi Email Client" }, 482{ "OM/Pi email client","OM/Pi Email Client" },
483{ "Close KA/Pi?","Schließe KA/Pi?" }, 483{ "Close KA/Pi?","Schließe KA/Pi?" },
484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" }, 484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" },
485{ "Yes!","Ja!" }, 485{ "Yes!","Ja!" },
486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " }, 486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " },
487{ "Saving addressbook ... ","Speichere Adressbuch ... " }, 487{ "Saving addressbook ... ","Speichere Adressbuch ... " },
488{ "Addressbook saved!","Adressbuch gespeichert!" }, 488{ "Addressbook saved!","Adressbuch gespeichert!" },
489{ "Default Table View","Default Tabellenansicht" }, 489{ "Default Table View","Default Tabellenansicht" },
490{ "Merge and Remove","Zusammenfügen/entfernen" }, 490{ "Merge and Remove","Zusammenfügen/entfernen" },
491{ "Merge","Zusammenfügen" }, 491{ "Merge","Zusammenfügen" },
492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" }, 492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" },
493{ "New List...","Neue Liste..." }, 493{ "New List...","Neue Liste..." },
494{ "Rename List...","Ändere Namen..." }, 494{ "Rename List...","Ändere Namen..." },
495{ "Remove List","Lösche Liste" }, 495{ "Remove List","Lösche Liste" },
496{ "Add Contact","Kontakt hinzu" }, 496{ "Add Contact","Kontakt hinzu" },
497{ "Change Email...","Ändere Email..." }, 497{ "Change Email...","Ändere Email..." },
498{ "Remove Contact","Entferne Kontakt" }, 498{ "Remove Contact","Entferne Kontakt" },
499{ "Use Preferred","Nutze Preferred" }, 499{ "Use Preferred","Nutze Preferred" },
500{ "Distribution List Editor","Distribution List Editor" }, 500{ "Distribution List Editor","Distribution List Editor" },
501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" }, 501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" },
502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" }, 502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" },
503{ "Contact Selection","Kontaktauswahl" }, 503{ "Contact Selection","Kontaktauswahl" },
504{ "&All","&Alle" }, 504{ "&All","&Alle" },
505{ "Export the entire address book","Exportiere das komplette Addressbuch" }, 505{ "Export the entire address book","Exportiere das komplette Addressbuch" },
506{ "&Selected","Au&sgewählte" }, 506{ "&Selected","Au&sgewählte" },
507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." }, 507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." },
508{ "By matching &filter","Zutreffender &Filter" }, 508{ "By matching &filter","Zutreffender &Filter" },
509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" }, 509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" },
510{ "By Cate&gories","Kategorien" }, 510{ "By Cate&gories","Kategorien" },
511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." }, 511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." },
512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." }, 512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." },
513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." }, 513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." },
514{ "Sorting","Sortieren" }, 514{ "Sorting","Sortieren" },
515{ "Criterion:","Merkmal:" }, 515{ "Criterion:","Merkmal:" },
516{ "Order:","Reihenfolge:" }, 516{ "Order:","Reihenfolge:" },
517{ "Ascending","Aufsteigend" }, 517{ "Ascending","Aufsteigend" },
518{ "Descending","Absteigend" }, 518{ "Descending","Absteigend" },
519{ "Save file","Datei speichern" }, 519{ "Save file","Datei speichern" },
520{ "Error","Fehler" }, 520{ "Error","Fehler" },
521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." }, 521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." },
522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" }, 522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" },
523{ "Manage new categories...","Verwalte neue Kategorien..." }, 523{ "Manage new categories...","Verwalte neue Kategorien..." },
524{ "&File","Datei" }, 524{ "&File","Datei" },
525{ "&Edit","Bearbeite" }, 525{ "&Edit","Bearbeite" },
526{ "&View","Ansichten" }, 526{ "&View","Ansichten" },
527{ "&Settings","Konfiguration" }, 527{ "&Settings","Konfiguration" },
528{ "&Change selected","Ändere Selekt." }, 528{ "&Change selected","Ändere Selekt." },
529{ "&Help","Hilfe" }, 529{ "&Help","Hilfe" },
530{ "Remove sync info","Entferne Sync Info" }, 530{ "Remove sync info","Entferne Sync Info" },
531{ "For all profiles","Für alle Profile" }, 531{ "For all profiles","Für alle Profile" },
532{ "&Change","Ändere" }, 532{ "&Change","Ändere" },
533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." }, 533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." },
534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." }, 534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." },
535{ "Export to phone","Exportiere aufs Handy..." }, 535{ "Export to phone","Exportiere aufs Handy..." },
536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" }, 536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" },
537{ "&Modify","Ändere" }, 537{ "&Modify","Ändere" },
538{ "Choose which contacts to select","Bitte Kontakte auswählen!" }, 538{ "Choose which contacts to select","Bitte Kontakte auswählen!" },
539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
540{ "Manage new Categories","Verwalte neue Kategorien" }, 540{ "Manage new Categories","Verwalte neue Kategorien" },
541{ "Add to category list","Füge zur Kategorieliste hinzu" }, 541{ "Add to category list","Füge zur Kategorieliste hinzu" },
542{ "Remove from addressees","Entferne von den Kontakten" }, 542{ "Remove from addressees","Entferne von den Kontakten" },
543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
544{ "A&dd","Hinzufügen" }, 544{ "A&dd","Hinzufügen" },
545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" }, 546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" },
547{ "Export to mobile phone!","Exportiere auf das Handy!" }, 547{ "Export to mobile phone!","Exportiere auf das Handy!" },
548{ "Export to phone options","Export ans Handy Optionen" }, 548{ "Export to phone options","Export ans Handy Optionen" },
549{ "Writing to phone...","Sende Daten ans Handy..." }, 549{ "Writing to phone...","Sende Daten ans Handy..." },
550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
551{ "Retry","Nochmal versuchen" }, 551{ "Retry","Nochmal versuchen" },
552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
555{ "&Print View","Drucke Ansicht" }, 555{ "&Print View","Drucke Ansicht" },
556{ "&Print Details","Drucke Details" }, 556{ "&Print Details","Drucke Details" },
557{ "Beam v&Card(s)...","Beame v&Card(s)..." }, 557{ "Beam v&Card(s)...","Beame v&Card(s)..." },
558{ "Set formatted name...","Setze formatierten Namen..." }, 558{ "Set formatted name...","Setze formatierten Namen..." },
559{ "Kde Sync HowTo","Kde Sync HowTo" }, 559{ "Kde Sync HowTo","Kde Sync HowTo" },
560{ "Multi Sync HowTo","Multi Sync HowTo" }, 560{ "Multi Sync HowTo","Multi Sync HowTo" },
561{ "&Beam","&Beame" }, 561{ "&Beam","&Beame" },
562{ "Edit Email Addresses","Editiere Email Adressen" }, 562{ "Edit Email Addresses","Editiere Email Adressen" },
563{ "Email address:","Email Adresse:" }, 563{ "Email address:","Email Adresse:" },
564{ "Change","Ändere" }, 564{ "Change","Ändere" },
565{ "Set Standard","Setze Standard" }, 565{ "Set Standard","Setze Standard" },
566{ "New Contact","Neuer Contact" }, 566{ "New Contact","Neuer Contact" },
567{ "Undo %1","Rückgängig %1" }, 567{ "Undo %1","Rückgängig %1" },
568{ "Redo","Wiederholen" }, 568{ "Redo","Wiederholen" },
569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " }, 569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " },
570{ "CSV Import Dialog","CSV Import Dialog" }, 570{ "CSV Import Dialog","CSV Import Dialog" },
571{ "File to import:","Datei zum Import:" }, 571{ "File to import:","Datei zum Import:" },
572{ "Delimiter","Trennzeichen" }, 572{ "Delimiter","Trennzeichen" },
573{ "Comma","Komma" }, 573{ "Comma","Komma" },
574{ "Semicolon","Semikolon" }, 574{ "Semicolon","Semikolon" },
575{ "Tabulator","Tabulator" }, 575{ "Tabulator","Tabulator" },
576{ "Space","Leerzeichen" }, 576{ "Space","Leerzeichen" },
577{ "1","1" }, 577{ "1","1" },
578{ """,""" }, 578{ """,""" },
579{ "'","'" }, 579{ "'","'" },
580{ "Start at line:","Beginne mit Zeile:" }, 580{ "Start at line:","Beginne mit Zeile:" },
581{ "Textquote:","Textquote:" }, 581{ "Textquote:","Textquote:" },
582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, 582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" },
583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, 583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" },
584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, 584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" },
585{ "Select vCard to Import","Selektiere zu importierende vCard" }, 585{ "Select vCard to Import","Selektiere zu importierende vCard" },
586{ "Information","Information" }, 586{ "Information","Information" },
587{ "contacts successfully imported.","Kontakte erfolgreich importiert." }, 587{ "contacts successfully imported.","Kontakte erfolgreich importiert." },
588{ "Import xml file","Importiere xml Datei" }, 588{ "Import xml file","Importiere xml Datei" },
589{ "Choose contact selection","Wähle Kontakt Auswahl" }, 589{ "Choose contact selection","Wähle Kontakt Auswahl" },
590{ "Select the entire address book","Wähle das ganze Adressbuch" }, 590{ "Select the entire address book","Wähle das ganze Adressbuch" },
591{ "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." }, 591{ "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." },
592{ "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." }, 592{ "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." },
593{ "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." }, 593{ "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." },
594{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." }, 594{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." },
595{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." }, 595{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." },
596{ "I/O device: ","I/O device: " }, 596{ "I/O device: ","I/O device: " },
597{ "Connection: ","Connection: " }, 597{ "Connection: ","Connection: " },
598{ "Model(opt.): ","Model(opt.): " }, 598{ "Model(opt.): ","Model(opt.): " },
599{ "Exporting to phone...","Exportiere aufs Handy..." }, 599{ "Exporting to phone...","Exportiere aufs Handy..." },
600{ "Error exporting to phone","Fehler beim Export aufs Handy" }, 600{ "Error exporting to phone","Fehler beim Export aufs Handy" },
601{ "contacts successfully exported.","Kontakte erfolgreich exportiert." }, 601{ "contacts successfully exported.","Kontakte erfolgreich exportiert." },
602{ "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" }, 602{ "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" },
603{ "Set formatted name","Setze formatierten Namen" }, 603{ "Set formatted name","Setze formatierten Namen" },
604{ "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." }, 604{ "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." },
605{ "Set formatted name to:","Setze formatierten Name auf:" }, 605{ "Set formatted name to:","Setze formatierten Name auf:" },
606{ "Simple: James Bond","Einfach: James Bond" }, 606{ "Simple: James Bond","Einfach: James Bond" },
607{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" }, 607{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" },
608{ "Reverse: Bond, James","Umgekehrt: Bond, James" }, 608{ "Reverse: Bond, James","Umgekehrt: Bond, James" },
609{ "Organization: MI6","Organisation: MI6" }, 609{ "Organization: MI6","Organisation: MI6" },
610{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." }, 610{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." },
611{ "Select contact list","Selektiere Kontakt Liste" }, 611{ "Select contact list","Selektiere Kontakt Liste" },
612{ "Changing contact #%1","Ändere Kontakt #%1" }, 612{ "Changing contact #%1","Ändere Kontakt #%1" },
613{ "Refreshing view...","Lade Ansicht neu..." }, 613{ "Refreshing view...","Lade Ansicht neu..." },
614{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" }, 614{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" },
615{ "Removing voice...","Entferne voice..." }, 615{ "Removing voice...","Entferne voice..." },
616{ "Remove voice completed!","Entferne voice beendet!" }, 616{ "Remove voice completed!","Entferne voice beendet!" },
617{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" }, 617{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" },
618{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" }, 618{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" },
619{ "Setting categories completed!","Setzen der Kategorien beendet!" }, 619{ "Setting categories completed!","Setzen der Kategorien beendet!" },
620{ "OK","OK" }, 620{ "OK","OK" },
621{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." }, 621{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." },
622{ "Processing contact #%1","Bearbeite Kontakt #%1" }, 622{ "Processing contact #%1","Bearbeite Kontakt #%1" },
623{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 623{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " },
624{ "%1: %2","%1: %2" }, 624{ "%1: %2","%1: %2" },
625{ "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" }, 625{ "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" },
626{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" }, 626{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" },
627{ "Cut","Ausschneiden" }, 627{ "Cut","Ausschneiden" },
628{ "Paste","Einfügen" }, 628{ "Paste","Einfügen" },
629{ "Delete","Löschen" }, 629{ "Delete","Löschen" },
630{ "Choose...","Wähle..." }, 630{ "Choose...","Wähle..." },
631{ "Add View","Ansicht hinzufügen" }, 631{ "Add View","Ansicht hinzufügen" },
632{ "View name:","Ansicht Name:" }, 632{ "View name:","Ansicht Name:" },
633{ "View Type","Ainsicht Typ" }, 633{ "View Type","Ainsicht Typ" },
634{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." }, 634{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." },
635{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." }, 635{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." },
636{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." }, 636{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." },
637{ "Draw &separators","Zeichne &Trennlinie" }, 637{ "Draw &separators","Zeichne &Trennlinie" },
638{ "Separator &width:","Trennlinien &Breite:" }, 638{ "Separator &width:","Trennlinien &Breite:" },
639{ "&Padding:","Füllung:" }, 639{ "&Padding:","Füllung:" },
640{ "Cards","Karten" }, 640{ "Cards","Karten" },
641{ "&Margin:","&Rand:" }, 641{ "&Margin:","&Rand:" },
642{ "Draw &borders","Zeichne Ränder" }, 642{ "Draw &borders","Zeichne Ränder" },
643{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." }, 643{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." },
644{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." }, 644{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." },
645{ "Sets the width of column separators","Sets the width of column separators" }, 645{ "Sets the width of column separators","Sets the width of column separators" },
646{ "&Layout","&Layout" }, 646{ "&Layout","&Layout" },
647{ "Show &empty fields","Zeige leere Felder" }, 647{ "Show &empty fields","Zeige leere Felder" },
648{ "Show field &labels","Zeige Feld Label" }, 648{ "Show field &labels","Zeige Feld Label" },
649{ "Be&havior","Ver&halten" }, 649{ "Be&havior","Ver&halten" },
650{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" }, 650{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" },
651{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" }, 651{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" },
652{ "Confirm Delete","Bestätige Löschen" }, 652{ "Confirm Delete","Bestätige Löschen" },
653{ "Edit Address Book Filter","Editiere Adressbuch Filter" }, 653{ "Edit Address Book Filter","Editiere Adressbuch Filter" },
654{ "Category rule","Kategorie Regel" }, 654{ "Category rule","Kategorie Regel" },
655{ "Include categories","Inklusive" }, 655{ "Include categories","Inklusive" },
656{ "Exclude categories","Exclusive" }, 656{ "Exclude categories","Exclusive" },
657{ "Include contacts, that are:","Schließe folgende Kontakte ein:" }, 657{ "Include contacts, that are:","Schließe folgende Kontakte ein:" },
658{ "public","Öffentlich" }, 658{ "public","Öffentlich" },
659{ "private","Privat" }, 659{ "private","Privat" },
660{ "confidential","Vertraulich" }, 660{ "confidential","Vertraulich" },
661{ "Configure Resources","Konfiguriere Resourcen" }, 661{ "Configure Resources","Konfiguriere Resourcen" },
662{ "Resource Configuration","Resource Konfiguration" }, 662{ "Resource Configuration","Resource Konfiguration" },
663{ "Resources","Resourcen" }, 663{ "Resources","Resourcen" },
664{ "Standard","Standard" }, 664{ "Standard","Standard" },
665{ "&Use as Standard","Setze als Standard" }, 665{ "&Use as Standard","Setze als Standard" },
666{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" }, 666{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" },
667{ "General Settings","Allgemeine Einstellungen" }, 667{ "General Settings","Allgemeine Einstellungen" },
668{ "Read-only","Nur-Lesen" }, 668{ "Read-only","Nur-Lesen" },
669{ "Include in sync","Schließe in Sync mit ein" }, 669{ "Include in sync","Schließe in Sync mit ein" },
670{ "%1 Resource Settings","%1 Resource Einstellungen" }, 670{ "%1 Resource Settings","%1 Resource Einstellungen" },
671{ "Format:","Format:" }, 671{ "Format:","Format:" },
672{ "Location:","Ort:" }, 672{ "Location:","Ort:" },
673{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" }, 673{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" },
674{ "Language","Sprache" }, 674{ "Language","Sprache" },
675{ "Time Format","Zeit Format" }, 675{ "Time Format","Zeit Format" },
676{ "Time Zone","Zeit Zone" }, 676{ "Time Zone","Zeit Zone" },
677{ "Data storage path","Daten Speicherpfad" }, 677{ "Data storage path","Daten Speicherpfad" },
678{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 678{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
681{ "Save settings","Speichere Einstellungen" }, 681{ "Save settings","Speichere Einstellungen" },
682{ "Save standard","Speichere Standard" }, 682{ "Save standard","Speichere Standard" },
683{ "Save","Speichern" }, 683{ "Save","Speichern" },
684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
686{ "Multiple Sync options","Multi Sync Optionen" }, 686{ "Multiple Sync options","Multi Sync Optionen" },
687{ "Sync algo options","Sync Ablauf Optionen" }, 687{ "Sync algo options","Sync Ablauf Optionen" },
688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
689{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 689{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
691{ "Write back options","Optionen zum Zurückschreiben" }, 691{ "Write back options","Optionen zum Zurückschreiben" },
692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
697{ "Time period","Zeitspanne" }, 697{ "Time period","Zeitspanne" },
698{ "From ","Von " }, 698{ "From ","Von " },
699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
700{ " weeks in the future "," Wochen in der Zukunft " }, 700{ " weeks in the future "," Wochen in der Zukunft " },
701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
702{ "Local temp file:","Lokale temp Datei:" }, 702{ "Local temp file:","Lokale temp Datei:" },
703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
705{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." }, 705{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." },
706{ "Sorry","Tut mir leid" }, 706{ "Sorry","Tut mir leid" },
707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, 707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" },
708{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" }, 708{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" },
709{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" }, 709{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" },
710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, 710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" },
711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, 711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" },
712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
715{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 715{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
717{ "Error","Fehler" }, 717{ "Error","Fehler" },
718{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 718{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
720{ "Warning","Warnung" }, 720{ "Warning","Warnung" },
721{ "Select week number","Wähle Wochen Nummer" }, 721{ "Select week number","Wähle Wochen Nummer" },
722{ "Februar","Februar" }, 722{ "Februar","Februar" },
723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
724{ "Password for remote access:","Passwort für fernen Zugriff:" }, 724{ "Password for remote access:","Passwort für fernen Zugriff:" },
725{ "Remote IP address:","Ferne IP Adresse:" }, 725{ "Remote IP address:","Ferne IP Adresse:" },
726{ "Remote port number:","Ferne Port Nummer:" }, 726{ "Remote port number:","Ferne Port Nummer:" },
727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
728{ "Remote from: ","Fern von: " }, 728{ "Remote from: ","Fern von: " },
729{ "Local from: ","Lokal von: " }, 729{ "Local from: ","Lokal von: " },
730{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 730{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
732{ "Write back","Schreibe zurück" }, 732{ "Write back","Schreibe zurück" },
733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
734{ "Received sync request","Sync Anfrage erhalten" }, 734{ "Received sync request","Sync Anfrage erhalten" },
735{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 735{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
738{ "Sending file...","Sende Datei..." }, 738{ "Sending file...","Sende Datei..." },
739{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 739{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
740{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 740{ "Receiving synced file...","Gesyncte Daten erhalten..." },
741{ "Received %1 bytes","%1 Bytes erhalten" }, 741{ "Received %1 bytes","%1 Bytes erhalten" },
742{ "Writing file to disk...","Speichere Datei..." }, 742{ "Writing file to disk...","Speichere Datei..." },
743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
745{ "Synchronize!","Synchronisiere!" }, 745{ "Synchronize!","Synchronisiere!" },
746{ "High clock skew!","Großer Uhrzeitunterschied!" }, 746{ "High clock skew!","Großer Uhrzeitunterschied!" },
747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
748{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 748{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
749{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, 749{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
750{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, 750{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" },
751{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, 751{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" },
752{ "Edit new contact","Bearbeite neuen Kontakt" }, 752{ "Edit new contact","Bearbeite neuen Kontakt" },
753{ "Edit ","Bearbeite " }, 753{ "Edit ","Bearbeite " },
754{ "No contact changed!","Kein Kontakt verändert" }, 754{ "No contact changed!","Kein Kontakt verändert" },
755{ "%1 contacts changed!","%1 Kontakte geändert!" }, 755{ "%1 contacts changed!","%1 Kontakte geändert!" },
756{ "","" }, 756{ "Mobile (home)","Handy (Arbeit)" },
757{ "","" }, 757{ "Mobile (work)","Handy (Privat)" },
758{ "","" }, 758{ "Def.Formatted Name","Def. Format. Name" },
759{ "","" }, 759{ "","" },
760{ "","" }, 760{ "","" },
761{ "","" }, 761{ "","" },
762{ "","" }, \ No newline at end of file 762{ "","" }, \ No newline at end of file
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 39d14bb..7f592e9 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -1,1494 +1,1519 @@
1/*** Warning! This file has been generated by the script makeaddressee ***/ 1/*** Warning! This file has been generated by the script makeaddressee ***/
2/* 2/*
3 This file is part of libkabc. 3 This file is part of libkabc.
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#include <kconfig.h> 29#include <kconfig.h>
30 30
31#include <ksharedptr.h> 31#include <ksharedptr.h>
32#include <kdebug.h> 32#include <kdebug.h>
33#include <kapplication.h> 33#include <kapplication.h>
34#include <klocale.h> 34#include <klocale.h>
35#include <kidmanager.h> 35#include <kidmanager.h>
36//US 36//US
37#include <kstandarddirs.h> 37#include <kstandarddirs.h>
38#include <libkcal/syncdefines.h> 38#include <libkcal/syncdefines.h>
39 39
40//US #include "resource.h" 40//US #include "resource.h"
41#include "addressee.h" 41#include "addressee.h"
42 42
43using namespace KABC; 43using namespace KABC;
44 44
45static bool matchBinaryPattern( int value, int pattern ); 45static bool matchBinaryPattern( int value, int pattern );
46static bool matchBinaryPatternA( int value, int pattern ); 46static bool matchBinaryPatternA( int value, int pattern );
47static bool matchBinaryPatternP( int value, int pattern ); 47static bool matchBinaryPatternP( int value, int pattern );
48 48
49struct Addressee::AddresseeData : public KShared 49struct Addressee::AddresseeData : public KShared
50{ 50{
51 QString uid; 51 QString uid;
52 QString name; 52 QString name;
53 QString formattedName; 53 QString formattedName;
54 QString defaultFormattedName;
54 QString familyName; 55 QString familyName;
55 QString givenName; 56 QString givenName;
56 QString additionalName; 57 QString additionalName;
57 QString prefix; 58 QString prefix;
58 QString suffix; 59 QString suffix;
59 QString nickName; 60 QString nickName;
60 QDateTime birthday; 61 QDateTime birthday;
61 QString mailer; 62 QString mailer;
62 TimeZone timeZone; 63 TimeZone timeZone;
63 Geo geo; 64 Geo geo;
64 QString title; 65 QString title;
65 QString role; 66 QString role;
66 QString organization; 67 QString organization;
67 QString note; 68 QString note;
68 QString productId; 69 QString productId;
69 QDateTime revision; 70 QDateTime revision;
70 QString sortString; 71 QString sortString;
71 QString externalUID; 72 QString externalUID;
72 QString originalExternalUID; 73 QString originalExternalUID;
73 KURL url; 74 KURL url;
74 Secrecy secrecy; 75 Secrecy secrecy;
75 Picture logo; 76 Picture logo;
76 Picture photo; 77 Picture photo;
77 Sound sound; 78 Sound sound;
78 Agent agent; 79 Agent agent;
79 QString mExternalId; 80 QString mExternalId;
80 PhoneNumber::List phoneNumbers; 81 PhoneNumber::List phoneNumbers;
81 Address::List addresses; 82 Address::List addresses;
82 Key::List keys; 83 Key::List keys;
83 QStringList emails; 84 QStringList emails;
84 QStringList categories; 85 QStringList categories;
85 QStringList custom; 86 QStringList custom;
86 int mTempSyncStat; 87 int mTempSyncStat;
87 Resource *resource; 88 Resource *resource;
88 89
89 bool empty :1; 90 bool empty :1;
90 bool changed :1; 91 bool changed :1;
91 bool tagged :1; 92 bool tagged :1;
92}; 93};
93 94
94Addressee::Addressee() 95Addressee::Addressee()
95{ 96{
96 mData = new AddresseeData; 97 mData = new AddresseeData;
97 mData->empty = true; 98 mData->empty = true;
98 mData->changed = false; 99 mData->changed = false;
99 mData->resource = 0; 100 mData->resource = 0;
100 mData->mExternalId = ":"; 101 mData->mExternalId = ":";
101 mData->revision = QDateTime ( QDate( 2003,1,1)); 102 mData->revision = QDateTime ( QDate( 2003,1,1));
102 mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL; 103 mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL;
103} 104}
104 105
105Addressee::~Addressee() 106Addressee::~Addressee()
106{ 107{
107} 108}
108 109
109Addressee::Addressee( const Addressee &a ) 110Addressee::Addressee( const Addressee &a )
110{ 111{
111 mData = a.mData; 112 mData = a.mData;
112} 113}
113 114
114Addressee &Addressee::operator=( const Addressee &a ) 115Addressee &Addressee::operator=( const Addressee &a )
115{ 116{
116 mData = a.mData; 117 mData = a.mData;
117 return (*this); 118 return (*this);
118} 119}
119 120
120Addressee Addressee::copy() 121Addressee Addressee::copy()
121{ 122{
122 Addressee a; 123 Addressee a;
123 *(a.mData) = *mData; 124 *(a.mData) = *mData;
124 return a; 125 return a;
125} 126}
126 127
127void Addressee::detach() 128void Addressee::detach()
128{ 129{
129 if ( mData.count() == 1 ) return; 130 if ( mData.count() == 1 ) return;
130 *this = copy(); 131 *this = copy();
131} 132}
132 133
133bool Addressee::operator==( const Addressee &a ) const 134bool Addressee::operator==( const Addressee &a ) const
134{ 135{
135 if ( uid() != a.uid() ) return false; 136 if ( uid() != a.uid() ) return false;
136 if ( mData->name != a.mData->name ) return false; 137 if ( mData->name != a.mData->name ) return false;
137 if ( mData->formattedName != a.mData->formattedName ) return false; 138 if ( mData->formattedName != a.mData->formattedName ) return false;
138 if ( mData->familyName != a.mData->familyName ) return false; 139 if ( mData->familyName != a.mData->familyName ) return false;
139 if ( mData->givenName != a.mData->givenName ) return false; 140 if ( mData->givenName != a.mData->givenName ) return false;
140 if ( mData->additionalName != a.mData->additionalName ) return false; 141 if ( mData->additionalName != a.mData->additionalName ) return false;
141 if ( mData->prefix != a.mData->prefix ) return false; 142 if ( mData->prefix != a.mData->prefix ) return false;
142 if ( mData->suffix != a.mData->suffix ) return false; 143 if ( mData->suffix != a.mData->suffix ) return false;
143 if ( mData->nickName != a.mData->nickName ) return false; 144 if ( mData->nickName != a.mData->nickName ) return false;
144 if ( mData->birthday != a.mData->birthday ) return false; 145 if ( mData->birthday != a.mData->birthday ) return false;
145 if ( mData->mailer != a.mData->mailer ) return false; 146 if ( mData->mailer != a.mData->mailer ) return false;
146 if ( mData->timeZone != a.mData->timeZone ) return false; 147 if ( mData->timeZone != a.mData->timeZone ) return false;
147 if ( mData->geo != a.mData->geo ) return false; 148 if ( mData->geo != a.mData->geo ) return false;
148 if ( mData->title != a.mData->title ) return false; 149 if ( mData->title != a.mData->title ) return false;
149 if ( mData->role != a.mData->role ) return false; 150 if ( mData->role != a.mData->role ) return false;
150 if ( mData->organization != a.mData->organization ) return false; 151 if ( mData->organization != a.mData->organization ) return false;
151 if ( mData->note != a.mData->note ) return false; 152 if ( mData->note != a.mData->note ) return false;
152 if ( mData->productId != a.mData->productId ) return false; 153 if ( mData->productId != a.mData->productId ) return false;
153 //if ( mData->revision != a.mData->revision ) return false; 154 //if ( mData->revision != a.mData->revision ) return false;
154 if ( mData->sortString != a.mData->sortString ) return false; 155 if ( mData->sortString != a.mData->sortString ) return false;
155 if ( mData->secrecy != a.mData->secrecy ) return false; 156 if ( mData->secrecy != a.mData->secrecy ) return false;
156 if ( mData->logo != a.mData->logo ) return false; 157 if ( mData->logo != a.mData->logo ) return false;
157 if ( mData->photo != a.mData->photo ) return false; 158 if ( mData->photo != a.mData->photo ) return false;
158 if ( mData->sound != a.mData->sound ) return false; 159 if ( mData->sound != a.mData->sound ) return false;
159 if ( mData->agent != a.mData->agent ) return false; 160 if ( mData->agent != a.mData->agent ) return false;
160 if ( ( mData->url.isValid() || a.mData->url.isValid() ) && 161 if ( ( mData->url.isValid() || a.mData->url.isValid() ) &&
161 ( mData->url != a.mData->url ) ) return false; 162 ( mData->url != a.mData->url ) ) return false;
162 if ( mData->phoneNumbers != a.mData->phoneNumbers ) return false; 163 if ( mData->phoneNumbers != a.mData->phoneNumbers ) return false;
163 if ( mData->addresses != a.mData->addresses ) return false; 164 if ( mData->addresses != a.mData->addresses ) return false;
164 if ( mData->keys != a.mData->keys ) return false; 165 if ( mData->keys != a.mData->keys ) return false;
165 if ( mData->emails != a.mData->emails ) return false; 166 if ( mData->emails != a.mData->emails ) return false;
166 if ( mData->categories != a.mData->categories ) return false; 167 if ( mData->categories != a.mData->categories ) return false;
167 if ( mData->custom != a.mData->custom ) return false; 168 if ( mData->custom != a.mData->custom ) return false;
168 169
169 return true; 170 return true;
170} 171}
171 172
172bool Addressee::operator!=( const Addressee &a ) const 173bool Addressee::operator!=( const Addressee &a ) const
173{ 174{
174 return !( a == *this ); 175 return !( a == *this );
175} 176}
176 177
177bool Addressee::isEmpty() const 178bool Addressee::isEmpty() const
178{ 179{
179 return mData->empty; 180 return mData->empty;
180} 181}
181ulong Addressee::getCsum4List( const QStringList & attList) 182ulong Addressee::getCsum4List( const QStringList & attList)
182{ 183{
183 int max = attList.count(); 184 int max = attList.count();
184 ulong cSum = 0; 185 ulong cSum = 0;
185 int j,k,i; 186 int j,k,i;
186 int add; 187 int add;
187 for ( i = 0; i < max ; ++i ) { 188 for ( i = 0; i < max ; ++i ) {
188 QString s = attList[i]; 189 QString s = attList[i];
189 if ( ! s.isEmpty() ){ 190 if ( ! s.isEmpty() ){
190 j = s.length(); 191 j = s.length();
191 for ( k = 0; k < j; ++k ) { 192 for ( k = 0; k < j; ++k ) {
192 int mul = k +1; 193 int mul = k +1;
193 add = s[k].unicode (); 194 add = s[k].unicode ();
194 if ( k < 16 ) 195 if ( k < 16 )
195 mul = mul * mul; 196 mul = mul * mul;
196 int ii = i+1; 197 int ii = i+1;
197 add = add * mul *ii*ii*ii; 198 add = add * mul *ii*ii*ii;
198 cSum += add; 199 cSum += add;
199 //qDebug("csum: %d %d %d", i,k,cSum); 200 //qDebug("csum: %d %d %d", i,k,cSum);
200 } 201 }
201 } 202 }
202 203
203 } 204 }
204 //QString dump = attList.join(","); 205 //QString dump = attList.join(",");
205 //qDebug("csum: %d %s", cSum,dump.latin1()); 206 //qDebug("csum: %d %s", cSum,dump.latin1());
206 207
207 return cSum; 208 return cSum;
208 209
209} 210}
210void Addressee::computeCsum(const QString &dev) 211void Addressee::computeCsum(const QString &dev)
211{ 212{
212 QStringList l; 213 QStringList l;
213 //if ( !mData->name.isEmpty() ) l.append(mData->name); 214 //if ( !mData->name.isEmpty() ) l.append(mData->name);
214 //if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); 215 //if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName );
215 if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); 216 if ( !mData->familyName.isEmpty() ) l.append( mData->familyName );
216 if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); 217 if ( !mData->givenName.isEmpty() ) l.append(mData->givenName );
217 if ( !mData->additionalName.isEmpty() ) l.append( mData->additionalName ); 218 if ( !mData->additionalName.isEmpty() ) l.append( mData->additionalName );
218 if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); 219 if ( !mData->prefix.isEmpty() ) l.append( mData->prefix );
219 if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); 220 if ( !mData->suffix.isEmpty() ) l.append( mData->suffix );
220 if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); 221 if ( !mData->nickName.isEmpty() ) l.append( mData->nickName );
221 if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); 222 if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() );
222 if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); 223 if ( !mData->mailer.isEmpty() ) l.append( mData->mailer );
223 if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); 224 if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() );
224 if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); 225 if ( mData->geo.isValid() ) l.append( mData->geo.asString() );
225 if ( !mData->title .isEmpty() ) l.append( mData->title ); 226 if ( !mData->title .isEmpty() ) l.append( mData->title );
226 if ( !mData->role.isEmpty() ) l.append( mData->role ); 227 if ( !mData->role.isEmpty() ) l.append( mData->role );
227 if ( !mData->organization.isEmpty() ) l.append( mData->organization ); 228 if ( !mData->organization.isEmpty() ) l.append( mData->organization );
228 if ( !mData->note.isEmpty() ) l.append( mData->note ); 229 if ( !mData->note.isEmpty() ) l.append( mData->note );
229 if ( !mData->productId.isEmpty() ) l.append(mData->productId ); 230 if ( !mData->productId.isEmpty() ) l.append(mData->productId );
230 if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); 231 if ( !mData->sortString.isEmpty() ) l.append( mData->sortString );
231 if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); 232 if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString());
232 if ( !mData->logo.undefined() ) { 233 if ( !mData->logo.undefined() ) {
233 if ( !mData->logo.isIntern() ) 234 if ( !mData->logo.isIntern() )
234 l.append( mData->logo.url() ); 235 l.append( mData->logo.url() );
235 else 236 else
236 l.append( QString::number(mData->logo.data().width()* mData->logo.data().height())); 237 l.append( QString::number(mData->logo.data().width()* mData->logo.data().height()));
237 } else { 238 } else {
238 l.append( "nologo"); 239 l.append( "nologo");
239 } 240 }
240 if ( !mData->photo.undefined() ) { 241 if ( !mData->photo.undefined() ) {
241 if ( !mData->photo.isIntern() ) 242 if ( !mData->photo.isIntern() )
242 l.append( mData->photo.url() ); 243 l.append( mData->photo.url() );
243 else 244 else
244 l.append( QString::number(mData->photo.data().width()* mData->photo.data().height())); 245 l.append( QString::number(mData->photo.data().width()* mData->photo.data().height()));
245 } else { 246 } else {
246 l.append( "nophoto"); 247 l.append( "nophoto");
247 } 248 }
248#if 0 249#if 0
249 if ( !mData->sound.undefined() ) { 250 if ( !mData->sound.undefined() ) {
250 if ( !mData->sound.isIntern() ) 251 if ( !mData->sound.isIntern() )
251 l.append( mData->sound.url() ); 252 l.append( mData->sound.url() );
252 else 253 else
253 l.append( QString(mData->sound.data().with()* mData->sound.data().height())); 254 l.append( QString(mData->sound.data().with()* mData->sound.data().height()));
254 } else { 255 } else {
255 l.append( "nosound"); 256 l.append( "nosound");
256 } 257 }
257#endif 258#endif
258 //if ( !mData->agent.isEmpty() ) l.append( ); 259 //if ( !mData->agent.isEmpty() ) l.append( );
259 if ( mData->url.isValid() ) 260 if ( mData->url.isValid() )
260 if ( ! mData->url.path().isEmpty()) l.append( mData->url.path() ); 261 if ( ! mData->url.path().isEmpty()) l.append( mData->url.path() );
261 KABC::PhoneNumber::List phoneNumbers; 262 KABC::PhoneNumber::List phoneNumbers;
262 KABC::PhoneNumber::List::Iterator phoneIter; 263 KABC::PhoneNumber::List::Iterator phoneIter;
263 264
264 QStringList t; 265 QStringList t;
265 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); 266 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
266 ++phoneIter ) 267 ++phoneIter )
267 t.append( ( *phoneIter ).number()+QString::number( ( *phoneIter ).type() ) ); 268 t.append( ( *phoneIter ).number()+QString::number( ( *phoneIter ).type() ) );
268 t.sort(); 269 t.sort();
269 uint iii; 270 uint iii;
270 for ( iii = 0; iii < t.count(); ++iii) 271 for ( iii = 0; iii < t.count(); ++iii)
271 l.append( t[iii] ); 272 l.append( t[iii] );
272 t = mData->emails; 273 t = mData->emails;
273 t.sort(); 274 t.sort();
274 for ( iii = 0; iii < t.count(); ++iii) 275 for ( iii = 0; iii < t.count(); ++iii)
275 l.append( t[iii] ); 276 l.append( t[iii] );
276 t = mData->categories; 277 t = mData->categories;
277 t.sort(); 278 t.sort();
278 for ( iii = 0; iii < t.count(); ++iii) 279 for ( iii = 0; iii < t.count(); ++iii)
279 l.append( t[iii] ); 280 l.append( t[iii] );
280 t = mData->custom; 281 t = mData->custom;
281 t.sort(); 282 t.sort();
282 for ( iii = 0; iii < t.count(); ++iii) 283 for ( iii = 0; iii < t.count(); ++iii)
283 if ( t[iii].left( 25 ) != "KADDRESSBOOK-X-ExternalID" ) { 284 if ( t[iii].left( 25 ) != "KADDRESSBOOK-X-ExternalID" ) {
284 int find = t[iii].find (':')+1; 285 int find = t[iii].find (':')+1;
285 //qDebug("lennnn %d %d ", find, t[iii].length()); 286 //qDebug("lennnn %d %d ", find, t[iii].length());
286 if ( find < t[iii].length()) 287 if ( find < t[iii].length())
287 l.append( t[iii] ); 288 l.append( t[iii] );
288 289
289 } 290 }
290 KABC::Address::List::Iterator addressIter; 291 KABC::Address::List::Iterator addressIter;
291 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); 292 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end();
292 ++addressIter ) { 293 ++addressIter ) {
293 t = (*addressIter).asList(); 294 t = (*addressIter).asList();
294 t.sort(); 295 t.sort();
295 for ( iii = 0; iii < t.count(); ++iii) 296 for ( iii = 0; iii < t.count(); ++iii)
296 l.append( t[iii] ); 297 l.append( t[iii] );
297 } 298 }
298 uint cs = getCsum4List(l); 299 uint cs = getCsum4List(l);
299 300
300#if 0 301#if 0
301 for ( iii = 0; iii < l.count(); ++iii) 302 for ( iii = 0; iii < l.count(); ++iii)
302 qDebug("%d***%s***",iii,l[iii].latin1()); 303 qDebug("%d***%s***",iii,l[iii].latin1());
303 qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); 304 qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() );
304#endif 305#endif
305 306
306 307
307 setCsum( dev, QString::number (cs )); 308 setCsum( dev, QString::number (cs ));
308} 309}
309 310
310void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) 311void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false)
311{ 312{
312 // merge all standard non-outlook fields. 313 // merge all standard non-outlook fields.
313 //if isSubSet (e.g. mobile phone sync) merge all fields 314 //if isSubSet (e.g. mobile phone sync) merge all fields
314 315
315 detach(); 316 detach();
316 if ( isSubSet ) { 317 if ( isSubSet ) {
317 if ( mData->name.isEmpty() ) mData->name = ad.mData->name; 318 if ( mData->name.isEmpty() ) mData->name = ad.mData->name;
318 if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; 319 if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName;
319 if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; 320 if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName;
320 if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; 321 if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ;
321 if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; 322 if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName;
322 if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; 323 if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix;
323 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; 324 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix;
324 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; 325 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ;
325 if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; 326 if ( mData->role.isEmpty() ) mData->role = ad.mData->role ;
326 if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; 327 if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName;
327 if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; 328 if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ;
328 if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; 329 if ( mData->note.isEmpty() ) mData->note = ad.mData->note ;
329 if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; 330 if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy;
330 if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; 331 if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ;
331 if ( !mData->birthday.isValid() ) 332 if ( !mData->birthday.isValid() )
332 if ( ad.mData->birthday.isValid()) 333 if ( ad.mData->birthday.isValid())
333 mData->birthday = ad.mData->birthday; 334 mData->birthday = ad.mData->birthday;
334 335
335 } 336 }
336 if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; 337 if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer;
337 if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; 338 if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone;
338 if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; 339 if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo;
339 if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; 340 if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId;
340 if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; 341 if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString;
341 QStringList t; 342 QStringList t;
342 QStringList tAD; 343 QStringList tAD;
343 uint iii; 344 uint iii;
344 345
345 // ********** phone numbers 346 // ********** phone numbers
346 if ( isSubSet ) { 347 if ( isSubSet ) {
347 PhoneNumber::List phoneAD = ad.phoneNumbers(); 348 PhoneNumber::List phoneAD = ad.phoneNumbers();
348 PhoneNumber::List::Iterator phoneItAD; 349 PhoneNumber::List::Iterator phoneItAD;
349 for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { 350 for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) {
350 bool found = false; 351 bool found = false;
351 PhoneNumber::List::Iterator it; 352 PhoneNumber::List::Iterator it;
352 for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { 353 for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) {
353 if ( ( *phoneItAD ).contains( (*it) ) ) { 354 if ( ( *phoneItAD ).contains( (*it) ) ) {
354 found = true; 355 found = true;
355 (*it).setType( ( *phoneItAD ).type() ); 356 (*it).setType( ( *phoneItAD ).type() );
356 (*it).setNumber( ( *phoneItAD ).number() ); 357 (*it).setNumber( ( *phoneItAD ).number() );
357 break; 358 break;
358 } 359 }
359 } 360 }
360 // if ( isSubSet && ! found ) 361 // if ( isSubSet && ! found )
361 if ( ! found ) // LR try this one... 362 if ( ! found ) // LR try this one...
362 mData->phoneNumbers.append( *phoneItAD ); 363 mData->phoneNumbers.append( *phoneItAD );
363 } 364 }
364 } else { 365 } else {
365 PhoneNumber::List phoneAD = ad.phoneNumbers(); 366 PhoneNumber::List phoneAD = ad.phoneNumbers();
366 PhoneNumber::List::Iterator phoneItAD; 367 PhoneNumber::List::Iterator phoneItAD;
367 for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { 368 for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) {
368 bool found = false; 369 bool found = false;
369 PhoneNumber::List::Iterator it; 370 PhoneNumber::List::Iterator it;
370 for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { 371 for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) {
371 if ( ( *phoneItAD ).contains( (*it) ) ) { 372 if ( ( *phoneItAD ).contains( (*it) ) ) {
372 found = true; 373 found = true;
373 (*it).setType( ( *phoneItAD ).type() ); 374 (*it).setType( ( *phoneItAD ).type() );
374 (*it).setNumber( ( *phoneItAD ).number() ); 375 (*it).setNumber( ( *phoneItAD ).number() );
375 break; 376 break;
376 } 377 }
377 } 378 }
378 if ( ! found ) { // append numbers which do not have work or home type 379 if ( ! found ) { // append numbers which do not have work or home type
379 if ( ! ( ( *phoneItAD ).type() & (PhoneNumber::Work | PhoneNumber::Home) ) ) 380 if ( ! ( ( *phoneItAD ).type() & (PhoneNumber::Work | PhoneNumber::Home) ) )
380 mData->phoneNumbers.append( *phoneItAD ); 381 mData->phoneNumbers.append( *phoneItAD );
381 } 382 }
382 } 383 }
383 } 384 }
384 if ( isSubSet ) { 385 if ( isSubSet ) {
385 // ************* emails; 386 // ************* emails;
386 t = mData->emails; 387 t = mData->emails;
387 tAD = ad.mData->emails; 388 tAD = ad.mData->emails;
388 for ( iii = 0; iii < tAD.count(); ++iii) 389 for ( iii = 0; iii < tAD.count(); ++iii)
389 if ( !t.contains(tAD[iii] ) ) 390 if ( !t.contains(tAD[iii] ) )
390 mData->emails.append( tAD[iii] ); 391 mData->emails.append( tAD[iii] );
391 } 392 }
392 393
393 // ************* categories; 394 // ************* categories;
394 if ( isSubSet ) { 395 if ( isSubSet ) {
395 t = mData->categories; 396 t = mData->categories;
396 tAD = ad.mData->categories; 397 tAD = ad.mData->categories;
397 for ( iii = 0; iii < tAD.count(); ++iii) 398 for ( iii = 0; iii < tAD.count(); ++iii)
398 if ( !t.contains(tAD[iii] ) ) 399 if ( !t.contains(tAD[iii] ) )
399 mData->categories.append( tAD[iii] ); 400 mData->categories.append( tAD[iii] );
400 } 401 }
401 QStringList::ConstIterator it; 402 QStringList::ConstIterator it;
402 for( it = ad.mData->custom.begin(); it != ad.mData->custom.end(); ++it ) { 403 for( it = ad.mData->custom.begin(); it != ad.mData->custom.end(); ++it ) {
403 QString qualifiedName = (*it).left( (*it).find( ":" )); 404 QString qualifiedName = (*it).left( (*it).find( ":" ));
404 bool found = false; 405 bool found = false;
405 QStringList::ConstIterator itL; 406 QStringList::ConstIterator itL;
406 for( itL = mData->custom.begin(); itL != mData->custom.end(); ++itL ) { 407 for( itL = mData->custom.begin(); itL != mData->custom.end(); ++itL ) {
407 if ( (*itL).startsWith( qualifiedName ) ) { 408 if ( (*itL).startsWith( qualifiedName ) ) {
408 found = true; 409 found = true;
409 break; 410 break;
410 } 411 }
411 } 412 }
412 if ( ! found ) { 413 if ( ! found ) {
413 mData->custom.append( *it ); 414 mData->custom.append( *it );
414 } 415 }
415 } 416 }
416 if ( mData->logo.undefined() && !ad.mData->logo.undefined() ) mData->logo = ad.mData->logo; 417 if ( mData->logo.undefined() && !ad.mData->logo.undefined() ) mData->logo = ad.mData->logo;
417 if ( mData->photo.undefined() && !ad.mData->photo.undefined() ) mData->photo = ad.mData->photo; 418 if ( mData->photo.undefined() && !ad.mData->photo.undefined() ) mData->photo = ad.mData->photo;
418 if ( !mData->sound.isIntern() ) { 419 if ( !mData->sound.isIntern() ) {
419 if ( mData->sound.url().isEmpty() ) { 420 if ( mData->sound.url().isEmpty() ) {
420 mData->sound = ad.mData->sound; 421 mData->sound = ad.mData->sound;
421 } 422 }
422 } 423 }
423 if ( !mData->agent.isIntern() ) { 424 if ( !mData->agent.isIntern() ) {
424 if ( mData->agent.url().isEmpty() ) { 425 if ( mData->agent.url().isEmpty() ) {
425 mData->agent = ad.mData->agent; 426 mData->agent = ad.mData->agent;
426 } 427 }
427 } 428 }
428 { 429 {
429 Key::List::Iterator itA; 430 Key::List::Iterator itA;
430 for( itA = ad.mData->keys.begin(); itA != ad.mData->keys.end(); ++itA ) { 431 for( itA = ad.mData->keys.begin(); itA != ad.mData->keys.end(); ++itA ) {
431 bool found = false; 432 bool found = false;
432 Key::List::Iterator it; 433 Key::List::Iterator it;
433 for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { 434 for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) {
434 if ( (*it) == (*itA)) { 435 if ( (*it) == (*itA)) {
435 found = true; 436 found = true;
436 break; 437 break;
437 438
438 } 439 }
439 } 440 }
440 if ( ! found ) { 441 if ( ! found ) {
441 mData->keys.append( *itA ); 442 mData->keys.append( *itA );
442 } 443 }
443 } 444 }
444 } 445 }
445 if ( isSubSet ) { 446 if ( isSubSet ) {
446 KABC::Address::List::Iterator addressIterA; 447 KABC::Address::List::Iterator addressIterA;
447 for ( addressIterA = ad.mData->addresses.begin(); addressIterA != ad.mData->addresses.end(); ++addressIterA ) { 448 for ( addressIterA = ad.mData->addresses.begin(); addressIterA != ad.mData->addresses.end(); ++addressIterA ) {
448 bool found = false; 449 bool found = false;
449 KABC::Address::List::Iterator addressIter; 450 KABC::Address::List::Iterator addressIter;
450 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); 451 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end();
451 ++addressIter ) { 452 ++addressIter ) {
452 if ( (*addressIter) == (*addressIterA)) { 453 if ( (*addressIter) == (*addressIterA)) {
453 found = true; 454 found = true;
454 (*addressIter).setType( (*addressIterA).type() ); 455 (*addressIter).setType( (*addressIterA).type() );
455 break; 456 break;
456 } 457 }
457 458
458 } 459 }
459 if ( isSubSet && ! found ) { 460 if ( isSubSet && ! found ) {
460 mData->addresses.append( *addressIterA ); 461 mData->addresses.append( *addressIterA );
461 } 462 }
462 } 463 }
463 } 464 }
464 //qDebug("merge contact %s ", ad.uid().latin1()); 465 //qDebug("merge contact %s ", ad.uid().latin1());
465 setUid( ad.uid() ); 466 setUid( ad.uid() );
466 setRevision( ad.revision() ); 467 setRevision( ad.revision() );
467} 468}
468 469
469bool Addressee::removeVoice() 470bool Addressee::removeVoice()
470{ 471{
471 PhoneNumber::List phoneN = phoneNumbers(); 472 PhoneNumber::List phoneN = phoneNumbers();
472 PhoneNumber::List::Iterator phoneIt; 473 PhoneNumber::List::Iterator phoneIt;
473 bool found = false; 474 bool found = false;
474 for ( phoneIt = phoneN.begin(); phoneIt != phoneN.end(); ++phoneIt ) { 475 for ( phoneIt = phoneN.begin(); phoneIt != phoneN.end(); ++phoneIt ) {
475 if ( (*phoneIt).type() & PhoneNumber::Voice) { // voice found 476 if ( (*phoneIt).type() & PhoneNumber::Voice) { // voice found
476 if ((*phoneIt).type() - PhoneNumber::Voice ) { 477 if ((*phoneIt).type() - PhoneNumber::Voice ) {
477 (*phoneIt).setType((*phoneIt).type() - PhoneNumber::Voice ); 478 (*phoneIt).setType((*phoneIt).type() - PhoneNumber::Voice );
478 insertPhoneNumber( (*phoneIt) ); 479 insertPhoneNumber( (*phoneIt) );
479 found = true; 480 found = true;
480 } 481 }
481 } 482 }
482 483
483 } 484 }
484 return found; 485 return found;
485} 486}
486 487
487bool Addressee::containsAdr(const Addressee& ad ) 488bool Addressee::containsAdr(const Addressee& ad )
488{ 489{
489 if ( ! ad.mData->familyName.isEmpty() ) if ( mData->familyName != ad.mData->familyName) return false; 490 if ( ! ad.mData->familyName.isEmpty() ) if ( mData->familyName != ad.mData->familyName) return false;
490 if ( ! ad.mData->givenName.isEmpty() )if ( mData->givenName != ad.mData->givenName ) return false; 491 if ( ! ad.mData->givenName.isEmpty() )if ( mData->givenName != ad.mData->givenName ) return false;
491 if ( ad.mData->url.isValid() ) if (mData->url != ad.mData->url) return false ; 492 if ( ad.mData->url.isValid() ) if (mData->url != ad.mData->url) return false ;
492 if ( ! ad.mData->role.isEmpty() ) if (mData->role != ad.mData->role) return false ; 493 if ( ! ad.mData->role.isEmpty() ) if (mData->role != ad.mData->role) return false ;
493 if ( ! ad.mData->organization.isEmpty() ) if (mData->organization != ad.mData->organization) return false ; 494 if ( ! ad.mData->organization.isEmpty() ) if (mData->organization != ad.mData->organization) return false ;
494 if ( ! ad.mData->note.isEmpty() ) if (mData->note != ad.mData->note) return false ; 495 if ( ! ad.mData->note.isEmpty() ) if (mData->note != ad.mData->note) return false ;
495 if ( ! ad.mData->title .isEmpty() ) if (mData->title != ad.mData->title ) return false ; 496 if ( ! ad.mData->title .isEmpty() ) if (mData->title != ad.mData->title ) return false ;
496 497
497 // compare phone numbers 498 // compare phone numbers
498 PhoneNumber::List phoneN = ad.phoneNumbers(); 499 PhoneNumber::List phoneN = ad.phoneNumbers();
499 PhoneNumber::List::Iterator phoneIt; 500 PhoneNumber::List::Iterator phoneIt;
500 bool found = false; 501 bool found = false;
501 for ( phoneIt = phoneN.begin(); phoneIt != phoneN.end(); ++phoneIt ) { 502 for ( phoneIt = phoneN.begin(); phoneIt != phoneN.end(); ++phoneIt ) {
502 bool found = false; 503 bool found = false;
503 PhoneNumber::List phoneL = ad.phoneNumbers(); 504 PhoneNumber::List phoneL = ad.phoneNumbers();
504 PhoneNumber::List::Iterator phoneItL; 505 PhoneNumber::List::Iterator phoneItL;
505 for ( phoneItL = phoneL.begin(); phoneItL != phoneL.end(); ++phoneItL ) { 506 for ( phoneItL = phoneL.begin(); phoneItL != phoneL.end(); ++phoneItL ) {
506 if ( ( *phoneItL ).number() == ( *phoneIt ).number() ) { 507 if ( ( *phoneItL ).number() == ( *phoneIt ).number() ) {
507 found = true; 508 found = true;
508 break; 509 break;
509 } 510 }
510 } 511 }
511 if ( ! found ) 512 if ( ! found )
512 return false; 513 return false;
513 } 514 }
514 return true; 515 return true;
515 516
516} 517}
517void Addressee::simplifyAddresses() 518void Addressee::simplifyAddresses()
518{ 519{
519 520
520 521
521 Address::List list; 522 Address::List list;
522 Address::List::Iterator it; 523 Address::List::Iterator it;
523 Address::List::Iterator it2; 524 Address::List::Iterator it2;
524 for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { 525 for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) {
525 it2 = it; 526 it2 = it;
526 ++it2; 527 ++it2;
527 for( ; it2 != mData->addresses.end(); ++it2 ) { 528 for( ; it2 != mData->addresses.end(); ++it2 ) {
528 if ( (*it) == (*it2) ) { 529 if ( (*it) == (*it2) ) {
529 list.append( *it ); 530 list.append( *it );
530 break; 531 break;
531 } 532 }
532 } 533 }
533 } 534 }
534 for( it = list.begin(); it != list.end(); ++it ) { 535 for( it = list.begin(); it != list.end(); ++it ) {
535 removeAddress( (*it) ); 536 removeAddress( (*it) );
536 } 537 }
537 538
538 list.clear(); 539 list.clear();
539 int max = 2; 540 int max = 2;
540 if ( mData->url.isValid() ) 541 if ( mData->url.isValid() )
541 max = 1; 542 max = 1;
542 if ( mData->addresses.count() <= max ) return ; 543 if ( mData->addresses.count() <= max ) return ;
543 int count = 0; 544 int count = 0;
544 for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { 545 for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) {
545 if ( count >= max ) 546 if ( count >= max )
546 list.append( *it ); 547 list.append( *it );
547 ++count; 548 ++count;
548 } 549 }
549 for( it = list.begin(); it != list.end(); ++it ) { 550 for( it = list.begin(); it != list.end(); ++it ) {
550 removeAddress( (*it) ); 551 removeAddress( (*it) );
551 } 552 }
552} 553}
553 554
554// removes all emails but the first 555// removes all emails but the first
555// needed by phone sync 556// needed by phone sync
556void Addressee::simplifyEmails() 557void Addressee::simplifyEmails()
557{ 558{
558 if ( mData->emails.count() == 0 ) return ; 559 if ( mData->emails.count() == 0 ) return ;
559 QString email = mData->emails.first(); 560 QString email = mData->emails.first();
560 detach(); 561 detach();
561 mData->emails.clear(); 562 mData->emails.clear();
562 mData->emails.append( email ); 563 mData->emails.append( email );
563} 564}
564 565
565void Addressee::simplifyPhoneNumbers() 566void Addressee::simplifyPhoneNumbers()
566{ 567{
567 int max = 4; 568 int max = 4;
568 int inList = mData->phoneNumbers.count(); 569 int inList = mData->phoneNumbers.count();
569 KABC::PhoneNumber::List removeNumbers; 570 KABC::PhoneNumber::List removeNumbers;
570 KABC::PhoneNumber::List::Iterator phoneIter; 571 KABC::PhoneNumber::List::Iterator phoneIter;
571 if ( inList > max ) { 572 if ( inList > max ) {
572 // delete non-preferred numbers 573 // delete non-preferred numbers
573 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); 574 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
574 ++phoneIter ) { 575 ++phoneIter ) {
575 if ( inList > max ) { 576 if ( inList > max ) {
576 if ( ! (( *phoneIter ).type() & PhoneNumber::Pref )) { 577 if ( ! (( *phoneIter ).type() & PhoneNumber::Pref )) {
577 removeNumbers.append( ( *phoneIter ) ); 578 removeNumbers.append( ( *phoneIter ) );
578 --inList; 579 --inList;
579 } 580 }
580 } else 581 } else
581 break; 582 break;
582 } 583 }
583 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end(); 584 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end();
584 ++phoneIter ) { 585 ++phoneIter ) {
585 removePhoneNumber(( *phoneIter )); 586 removePhoneNumber(( *phoneIter ));
586 } 587 }
587 // delete preferred numbers 588 // delete preferred numbers
588 if ( inList > max ) { 589 if ( inList > max ) {
589 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); 590 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
590 ++phoneIter ) { 591 ++phoneIter ) {
591 if ( inList > max ) { 592 if ( inList > max ) {
592 removeNumbers.append( ( *phoneIter ) ); 593 removeNumbers.append( ( *phoneIter ) );
593 --inList; 594 --inList;
594 } else 595 } else
595 break; 596 break;
596 } 597 }
597 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end(); 598 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end();
598 ++phoneIter ) { 599 ++phoneIter ) {
599 removePhoneNumber(( *phoneIter )); 600 removePhoneNumber(( *phoneIter ));
600 } 601 }
601 } 602 }
602 } 603 }
603 // remove non-numeric characters 604 // remove non-numeric characters
604 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); 605 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
605 ++phoneIter ) { 606 ++phoneIter ) {
606 if ( ! ( *phoneIter ).simplifyNumber() ) 607 if ( ! ( *phoneIter ).simplifyNumber() )
607 removeNumbers.append( ( *phoneIter ) ); 608 removeNumbers.append( ( *phoneIter ) );
608 } 609 }
609 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end(); 610 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end();
610 ++phoneIter ) { 611 ++phoneIter ) {
611 removePhoneNumber(( *phoneIter )); 612 removePhoneNumber(( *phoneIter ));
612 } 613 }
613} 614}
614void Addressee::simplifyPhoneNumberTypes() 615void Addressee::simplifyPhoneNumberTypes()
615{ 616{
616 KABC::PhoneNumber::List::Iterator phoneIter; 617 KABC::PhoneNumber::List::Iterator phoneIter;
617 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); 618 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
618 ++phoneIter ) 619 ++phoneIter )
619 ( *phoneIter ).simplifyType(); 620 ( *phoneIter ).simplifyType();
620} 621}
621void Addressee::removeID(const QString &prof) 622void Addressee::removeID(const QString &prof)
622{ 623{
623 detach(); 624 detach();
624 if ( prof.isEmpty() ) 625 if ( prof.isEmpty() )
625 mData->mExternalId = ":"; 626 mData->mExternalId = ":";
626 else 627 else
627 mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); 628 mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof);
628 629
629} 630}
630void Addressee::setID( const QString & prof , const QString & id ) 631void Addressee::setID( const QString & prof , const QString & id )
631{ 632{
632 detach(); 633 detach();
633 mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); 634 mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id );
634 //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); 635 //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
635} 636}
636void Addressee::setTempSyncStat( int id ) 637void Addressee::setTempSyncStat( int id )
637{ 638{
638 if ( mData->mTempSyncStat == id ) return; 639 if ( mData->mTempSyncStat == id ) return;
639 detach(); 640 detach();
640 mData->mTempSyncStat = id; 641 mData->mTempSyncStat = id;
641} 642}
642int Addressee::tempSyncStat() const 643int Addressee::tempSyncStat() const
643{ 644{
644 return mData->mTempSyncStat; 645 return mData->mTempSyncStat;
645} 646}
646 647
647const QString Addressee::getID( const QString & prof) const 648const QString Addressee::getID( const QString & prof) const
648{ 649{
649 return KIdManager::getId ( mData->mExternalId, prof ); 650 return KIdManager::getId ( mData->mExternalId, prof );
650} 651}
651 652
652void Addressee::setCsum( const QString & prof , const QString & id ) 653void Addressee::setCsum( const QString & prof , const QString & id )
653{ 654{
654 detach(); 655 detach();
655 //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); 656 //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
656 mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); 657 mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id );
657 //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); 658 //qDebug("setcsum2 %s ",mData->mExternalId.latin1() );
658} 659}
659 660
660const QString Addressee::getCsum( const QString & prof) const 661const QString Addressee::getCsum( const QString & prof) const
661{ 662{
662 return KIdManager::getCsum ( mData->mExternalId, prof ); 663 return KIdManager::getCsum ( mData->mExternalId, prof );
663} 664}
664 665
665void Addressee::setIDStr( const QString & s ) 666void Addressee::setIDStr( const QString & s )
666{ 667{
667 detach(); 668 detach();
668 mData->mExternalId = s; 669 mData->mExternalId = s;
669} 670}
670 671
671const QString Addressee::IDStr() const 672const QString Addressee::IDStr() const
672{ 673{
673 return mData->mExternalId; 674 return mData->mExternalId;
674} 675}
675 676
676void Addressee::setExternalUID( const QString &id ) 677void Addressee::setExternalUID( const QString &id )
677{ 678{
678 if ( id == mData->externalUID ) return; 679 if ( id == mData->externalUID ) return;
679 detach(); 680 detach();
680 mData->empty = false; 681 mData->empty = false;
681 mData->externalUID = id; 682 mData->externalUID = id;
682} 683}
683 684
684const QString Addressee::externalUID() const 685const QString Addressee::externalUID() const
685{ 686{
686 return mData->externalUID; 687 return mData->externalUID;
687} 688}
688void Addressee::setOriginalExternalUID( const QString &id ) 689void Addressee::setOriginalExternalUID( const QString &id )
689{ 690{
690 if ( id == mData->originalExternalUID ) return; 691 if ( id == mData->originalExternalUID ) return;
691 detach(); 692 detach();
692 mData->empty = false; 693 mData->empty = false;
693 //qDebug("*******Set orig uid %s ", id.latin1()); 694 //qDebug("*******Set orig uid %s ", id.latin1());
694 mData->originalExternalUID = id; 695 mData->originalExternalUID = id;
695} 696}
696 697
697QString Addressee::originalExternalUID() const 698QString Addressee::originalExternalUID() const
698{ 699{
699 return mData->originalExternalUID; 700 return mData->originalExternalUID;
700} 701}
701 702
702void Addressee::setUid( const QString &id ) 703void Addressee::setUid( const QString &id )
703{ 704{
704 if ( id == mData->uid ) return; 705 if ( id == mData->uid ) return;
705 detach(); 706 detach();
706 //qDebug("****setuid %s ", id.latin1()); 707 //qDebug("****setuid %s ", id.latin1());
707 mData->empty = false; 708 mData->empty = false;
708 mData->uid = id; 709 mData->uid = id;
709} 710}
710 711
711const QString Addressee::uid() const 712const QString Addressee::uid() const
712{ 713{
713 if ( mData->uid.isEmpty() ) 714 if ( mData->uid.isEmpty() )
714 mData->uid = KApplication::randomString( 10 ); 715 mData->uid = KApplication::randomString( 10 );
715 716
716 return mData->uid; 717 return mData->uid;
717} 718}
718 719
719QString Addressee::uidLabel() 720QString Addressee::uidLabel()
720{ 721{
721 return i18n("Unique Identifier"); 722 return i18n("Unique Identifier");
722} 723}
723 724
724void Addressee::setName( const QString &name ) 725void Addressee::setName( const QString &name )
725{ 726{
726 if ( name == mData->name ) return; 727 if ( name == mData->name ) return;
727 detach(); 728 detach();
728 mData->empty = false; 729 mData->empty = false;
729 mData->name = name; 730 mData->name = name;
730} 731}
731 732
732QString Addressee::name() const 733QString Addressee::name() const
733{ 734{
734 return mData->name; 735 return mData->name;
735} 736}
736 737
737QString Addressee::nameLabel() 738QString Addressee::nameLabel()
738{ 739{
739 return i18n("Name"); 740 return i18n("Name");
740} 741}
741 742
742 743
743void Addressee::setFormattedName( const QString &formattedName ) 744void Addressee::setFormattedName( const QString &formattedName )
744{ 745{
745 if ( formattedName == mData->formattedName ) return; 746 if ( formattedName == mData->formattedName ) return;
746 detach(); 747 detach();
747 mData->empty = false; 748 mData->empty = false;
748 mData->formattedName = formattedName; 749 mData->formattedName = formattedName;
749} 750}
751void Addressee::setDefaultFormattedName( const QString &formattedName )
752{
753 if ( formattedName == mData->defaultFormattedName ) return;
754 detach();
755 mData->empty = false;
756 mData->defaultFormattedName = formattedName;
757}
750 758
751QString Addressee::formattedName() const 759QString Addressee::formattedName() const
752{ 760{
753 return mData->formattedName; 761 return mData->formattedName;
754} 762}
763QString Addressee::defaultFormattedName() const
764{
765 return mData->defaultFormattedName;
766}
755 767
756QString Addressee::formattedNameLabel() 768QString Addressee::formattedNameLabel()
757{ 769{
758 return i18n("Formatted Name"); 770 return i18n("Formatted Name");
759} 771}
760 772
773QString Addressee::defaultFormattedNameLabel()
774{
775 return i18n("Def.Formatted Name");
776}
777
761 778
762void Addressee::setFamilyName( const QString &familyName ) 779void Addressee::setFamilyName( const QString &familyName )
763{ 780{
764 if ( familyName == mData->familyName ) return; 781 if ( familyName == mData->familyName ) return;
765 detach(); 782 detach();
766 mData->empty = false; 783 mData->empty = false;
767 mData->familyName = familyName; 784 mData->familyName = familyName;
768} 785}
769 786
770QString Addressee::familyName() const 787QString Addressee::familyName() const
771{ 788{
772 return mData->familyName; 789 return mData->familyName;
773} 790}
774 791
775QString Addressee::familyNameLabel() 792QString Addressee::familyNameLabel()
776{ 793{
777 return i18n("Family Name"); 794 return i18n("Family Name");
778} 795}
779 796
780 797
781void Addressee::setGivenName( const QString &givenName ) 798void Addressee::setGivenName( const QString &givenName )
782{ 799{
783 if ( givenName == mData->givenName ) return; 800 if ( givenName == mData->givenName ) return;
784 detach(); 801 detach();
785 mData->empty = false; 802 mData->empty = false;
786 mData->givenName = givenName; 803 mData->givenName = givenName;
787} 804}
788 805
789QString Addressee::givenName() const 806QString Addressee::givenName() const
790{ 807{
791 return mData->givenName; 808 return mData->givenName;
792} 809}
793 810
794QString Addressee::givenNameLabel() 811QString Addressee::givenNameLabel()
795{ 812{
796 return i18n("Given Name"); 813 return i18n("Given Name");
797} 814}
798 815
799 816
800void Addressee::setAdditionalName( const QString &additionalName ) 817void Addressee::setAdditionalName( const QString &additionalName )
801{ 818{
802 if ( additionalName == mData->additionalName ) return; 819 if ( additionalName == mData->additionalName ) return;
803 detach(); 820 detach();
804 mData->empty = false; 821 mData->empty = false;
805 mData->additionalName = additionalName; 822 mData->additionalName = additionalName;
806} 823}
807 824
808QString Addressee::additionalName() const 825QString Addressee::additionalName() const
809{ 826{
810 return mData->additionalName; 827 return mData->additionalName;
811} 828}
812 829
813QString Addressee::additionalNameLabel() 830QString Addressee::additionalNameLabel()
814{ 831{
815 return i18n("Additional Names"); 832 return i18n("Additional Names");
816} 833}
817 834
818 835
819void Addressee::setPrefix( const QString &prefix ) 836void Addressee::setPrefix( const QString &prefix )
820{ 837{
821 if ( prefix == mData->prefix ) return; 838 if ( prefix == mData->prefix ) return;
822 detach(); 839 detach();
823 mData->empty = false; 840 mData->empty = false;
824 mData->prefix = prefix; 841 mData->prefix = prefix;
825} 842}
826 843
827QString Addressee::prefix() const 844QString Addressee::prefix() const
828{ 845{
829 return mData->prefix; 846 return mData->prefix;
830} 847}
831 848
832QString Addressee::prefixLabel() 849QString Addressee::prefixLabel()
833{ 850{
834 return i18n("Honorific Prefixes"); 851 return i18n("Honorific Prefixes");
835} 852}
836 853
837 854
838void Addressee::setSuffix( const QString &suffix ) 855void Addressee::setSuffix( const QString &suffix )
839{ 856{
840 if ( suffix == mData->suffix ) return; 857 if ( suffix == mData->suffix ) return;
841 detach(); 858 detach();
842 mData->empty = false; 859 mData->empty = false;
843 mData->suffix = suffix; 860 mData->suffix = suffix;
844} 861}
845 862
846QString Addressee::suffix() const 863QString Addressee::suffix() const
847{ 864{
848 return mData->suffix; 865 return mData->suffix;
849} 866}
850 867
851QString Addressee::suffixLabel() 868QString Addressee::suffixLabel()
852{ 869{
853 return i18n("Honorific Suffixes"); 870 return i18n("Honorific Suffixes");
854} 871}
855 872
856 873
857void Addressee::setNickName( const QString &nickName ) 874void Addressee::setNickName( const QString &nickName )
858{ 875{
859 if ( nickName == mData->nickName ) return; 876 if ( nickName == mData->nickName ) return;
860 detach(); 877 detach();
861 mData->empty = false; 878 mData->empty = false;
862 mData->nickName = nickName; 879 mData->nickName = nickName;
863} 880}
864 881
865QString Addressee::nickName() const 882QString Addressee::nickName() const
866{ 883{
867 return mData->nickName; 884 return mData->nickName;
868} 885}
869 886
870QString Addressee::nickNameLabel() 887QString Addressee::nickNameLabel()
871{ 888{
872 return i18n("Nick Name"); 889 return i18n("Nick Name");
873} 890}
874 891
875 892
876void Addressee::setBirthday( const QDateTime &birthday ) 893void Addressee::setBirthday( const QDateTime &birthday )
877{ 894{
878 if ( birthday == mData->birthday ) return; 895 if ( birthday == mData->birthday ) return;
879 detach(); 896 detach();
880 mData->empty = false; 897 mData->empty = false;
881 mData->birthday = birthday; 898 mData->birthday = birthday;
882} 899}
883 900
884QDateTime Addressee::birthday() const 901QDateTime Addressee::birthday() const
885{ 902{
886 return mData->birthday; 903 return mData->birthday;
887} 904}
888 905
889QString Addressee::birthdayLabel() 906QString Addressee::birthdayLabel()
890{ 907{
891 return i18n("Birthday"); 908 return i18n("Birthday");
892} 909}
893 910
894 911
895QString Addressee::homeAddressStreetLabel() 912QString Addressee::homeAddressStreetLabel()
896{ 913{
897 return i18n("Home Address Street"); 914 return i18n("Home Address Street");
898} 915}
899 916
900 917
901QString Addressee::homeAddressLocalityLabel() 918QString Addressee::homeAddressLocalityLabel()
902{ 919{
903 return i18n("Home Address Locality"); 920 return i18n("Home Address Locality");
904} 921}
905 922
906 923
907QString Addressee::homeAddressRegionLabel() 924QString Addressee::homeAddressRegionLabel()
908{ 925{
909 return i18n("Home Address Region"); 926 return i18n("Home Address Region");
910} 927}
911 928
912 929
913QString Addressee::homeAddressPostalCodeLabel() 930QString Addressee::homeAddressPostalCodeLabel()
914{ 931{
915 return i18n("Home Address Postal Code"); 932 return i18n("Home Address Postal Code");
916} 933}
917 934
918 935
919QString Addressee::homeAddressCountryLabel() 936QString Addressee::homeAddressCountryLabel()
920{ 937{
921 return i18n("Home Address Country"); 938 return i18n("Home Address Country");
922} 939}
923 940
924 941
925QString Addressee::homeAddressLabelLabel() 942QString Addressee::homeAddressLabelLabel()
926{ 943{
927 return i18n("Home Address Label"); 944 return i18n("Home Address Label");
928} 945}
929 946
930 947
931QString Addressee::businessAddressStreetLabel() 948QString Addressee::businessAddressStreetLabel()
932{ 949{
933 return i18n("Business Address Street"); 950 return i18n("Business Address Street");
934} 951}
935 952
936 953
937QString Addressee::businessAddressLocalityLabel() 954QString Addressee::businessAddressLocalityLabel()
938{ 955{
939 return i18n("Business Address Locality"); 956 return i18n("Business Address Locality");
940} 957}
941 958
942 959
943QString Addressee::businessAddressRegionLabel() 960QString Addressee::businessAddressRegionLabel()
944{ 961{
945 return i18n("Business Address Region"); 962 return i18n("Business Address Region");
946} 963}
947 964
948 965
949QString Addressee::businessAddressPostalCodeLabel() 966QString Addressee::businessAddressPostalCodeLabel()
950{ 967{
951 return i18n("Business Address Postal Code"); 968 return i18n("Business Address Postal Code");
952} 969}
953 970
954 971
955QString Addressee::businessAddressCountryLabel() 972QString Addressee::businessAddressCountryLabel()
956{ 973{
957 return i18n("Business Address Country"); 974 return i18n("Business Address Country");
958} 975}
959 976
960 977
961QString Addressee::businessAddressLabelLabel() 978QString Addressee::businessAddressLabelLabel()
962{ 979{
963 return i18n("Business Address Label"); 980 return i18n("Business Address Label");
964} 981}
965 982
966 983
967QString Addressee::homePhoneLabel() 984QString Addressee::homePhoneLabel()
968{ 985{
969 return i18n("Home Phone"); 986 return i18n("Home Phone");
970} 987}
971 988
972 989
973QString Addressee::businessPhoneLabel() 990QString Addressee::businessPhoneLabel()
974{ 991{
975 return i18n("Business Phone"); 992 return i18n("Business Phone");
976} 993}
977 994
978 995
979QString Addressee::mobilePhoneLabel() 996QString Addressee::mobilePhoneLabel()
980{ 997{
981 return i18n("Mobile Phone"); 998 return i18n("Mobile Phone");
982} 999}
1000QString Addressee::mobileWorkPhoneLabel()
1001{
1002 return i18n("Mobile (work)");
1003}
1004QString Addressee::mobileHomePhoneLabel()
1005{
1006 return i18n("Mobile (home)");
1007}
983 1008
984 1009
985QString Addressee::homeFaxLabel() 1010QString Addressee::homeFaxLabel()
986{ 1011{
987 return i18n("Home Fax"); 1012 return i18n("Home Fax");
988} 1013}
989 1014
990 1015
991QString Addressee::businessFaxLabel() 1016QString Addressee::businessFaxLabel()
992{ 1017{
993 return i18n("Business Fax"); 1018 return i18n("Business Fax");
994} 1019}
995 1020
996 1021
997QString Addressee::carPhoneLabel() 1022QString Addressee::carPhoneLabel()
998{ 1023{
999 return i18n("Car Phone"); 1024 return i18n("Car Phone");
1000} 1025}
1001 1026
1002 1027
1003QString Addressee::isdnLabel() 1028QString Addressee::isdnLabel()
1004{ 1029{
1005 return i18n("ISDN"); 1030 return i18n("ISDN");
1006} 1031}
1007 1032
1008 1033
1009QString Addressee::pagerLabel() 1034QString Addressee::pagerLabel()
1010{ 1035{
1011 return i18n("Pager"); 1036 return i18n("Pager");
1012} 1037}
1013 1038
1014QString Addressee::sipLabel() 1039QString Addressee::sipLabel()
1015{ 1040{
1016 return i18n("SIP"); 1041 return i18n("SIP");
1017} 1042}
1018 1043
1019QString Addressee::emailLabel() 1044QString Addressee::emailLabel()
1020{ 1045{
1021 return i18n("Email Address"); 1046 return i18n("Email Address");
1022} 1047}
1023 1048
1024 1049
1025void Addressee::setMailer( const QString &mailer ) 1050void Addressee::setMailer( const QString &mailer )
1026{ 1051{
1027 if ( mailer == mData->mailer ) return; 1052 if ( mailer == mData->mailer ) return;
1028 detach(); 1053 detach();
1029 mData->empty = false; 1054 mData->empty = false;
1030 mData->mailer = mailer; 1055 mData->mailer = mailer;
1031} 1056}
1032 1057
1033QString Addressee::mailer() const 1058QString Addressee::mailer() const
1034{ 1059{
1035 return mData->mailer; 1060 return mData->mailer;
1036} 1061}
1037 1062
1038QString Addressee::mailerLabel() 1063QString Addressee::mailerLabel()
1039{ 1064{
1040 return i18n("Mail Client"); 1065 return i18n("Mail Client");
1041} 1066}
1042 1067
1043 1068
1044void Addressee::setTimeZone( const TimeZone &timeZone ) 1069void Addressee::setTimeZone( const TimeZone &timeZone )
1045{ 1070{
1046 if ( timeZone == mData->timeZone ) return; 1071 if ( timeZone == mData->timeZone ) return;
1047 detach(); 1072 detach();
1048 mData->empty = false; 1073 mData->empty = false;
1049 mData->timeZone = timeZone; 1074 mData->timeZone = timeZone;
1050} 1075}
1051 1076
1052TimeZone Addressee::timeZone() const 1077TimeZone Addressee::timeZone() const
1053{ 1078{
1054 return mData->timeZone; 1079 return mData->timeZone;
1055} 1080}
1056 1081
1057QString Addressee::timeZoneLabel() 1082QString Addressee::timeZoneLabel()
1058{ 1083{
1059 return i18n("Time Zone"); 1084 return i18n("Time Zone");
1060} 1085}
1061 1086
1062 1087
1063void Addressee::setGeo( const Geo &geo ) 1088void Addressee::setGeo( const Geo &geo )
1064{ 1089{
1065 if ( geo == mData->geo ) return; 1090 if ( geo == mData->geo ) return;
1066 detach(); 1091 detach();
1067 mData->empty = false; 1092 mData->empty = false;
1068 mData->geo = geo; 1093 mData->geo = geo;
1069} 1094}
1070 1095
1071Geo Addressee::geo() const 1096Geo Addressee::geo() const
1072{ 1097{
1073 return mData->geo; 1098 return mData->geo;
1074} 1099}
1075 1100
1076QString Addressee::geoLabel() 1101QString Addressee::geoLabel()
1077{ 1102{
1078 return i18n("Geographic Position"); 1103 return i18n("Geographic Position");
1079} 1104}
1080 1105
1081 1106
1082void Addressee::setTitle( const QString &title ) 1107void Addressee::setTitle( const QString &title )
1083{ 1108{
1084 if ( title == mData->title ) return; 1109 if ( title == mData->title ) return;
1085 detach(); 1110 detach();
1086 mData->empty = false; 1111 mData->empty = false;
1087 mData->title = title; 1112 mData->title = title;
1088} 1113}
1089 1114
1090QString Addressee::title() const 1115QString Addressee::title() const
1091{ 1116{
1092 return mData->title; 1117 return mData->title;
1093} 1118}
1094 1119
1095QString Addressee::titleLabel() 1120QString Addressee::titleLabel()
1096{ 1121{
1097 return i18n("Title"); 1122 return i18n("Title");
1098} 1123}
1099 1124
1100 1125
1101void Addressee::setRole( const QString &role ) 1126void Addressee::setRole( const QString &role )
1102{ 1127{
1103 if ( role == mData->role ) return; 1128 if ( role == mData->role ) return;
1104 detach(); 1129 detach();
1105 mData->empty = false; 1130 mData->empty = false;
1106 mData->role = role; 1131 mData->role = role;
1107} 1132}
1108 1133
1109QString Addressee::role() const 1134QString Addressee::role() const
1110{ 1135{
1111 return mData->role; 1136 return mData->role;
1112} 1137}
1113 1138
1114QString Addressee::roleLabel() 1139QString Addressee::roleLabel()
1115{ 1140{
1116 return i18n("Role"); 1141 return i18n("Role");
1117} 1142}
1118 1143
1119 1144
1120void Addressee::setOrganization( const QString &organization ) 1145void Addressee::setOrganization( const QString &organization )
1121{ 1146{
1122 if ( organization == mData->organization ) return; 1147 if ( organization == mData->organization ) return;
1123 detach(); 1148 detach();
1124 mData->empty = false; 1149 mData->empty = false;
1125 mData->organization = organization; 1150 mData->organization = organization;
1126} 1151}
1127 1152
1128QString Addressee::organization() const 1153QString Addressee::organization() const
1129{ 1154{
1130 return mData->organization; 1155 return mData->organization;
1131} 1156}
1132 1157
1133QString Addressee::organizationLabel() 1158QString Addressee::organizationLabel()
1134{ 1159{
1135 return i18n("Organization"); 1160 return i18n("Organization");
1136} 1161}
1137 1162
1138 1163
1139void Addressee::setNote( const QString &note ) 1164void Addressee::setNote( const QString &note )
1140{ 1165{
1141 if ( note == mData->note ) return; 1166 if ( note == mData->note ) return;
1142 detach(); 1167 detach();
1143 mData->empty = false; 1168 mData->empty = false;
1144 mData->note = note; 1169 mData->note = note;
1145} 1170}
1146 1171
1147QString Addressee::note() const 1172QString Addressee::note() const
1148{ 1173{
1149 return mData->note; 1174 return mData->note;
1150} 1175}
1151 1176
1152QString Addressee::noteLabel() 1177QString Addressee::noteLabel()
1153{ 1178{
1154 return i18n("Note"); 1179 return i18n("Note");
1155} 1180}
1156 1181
1157 1182
1158void Addressee::setProductId( const QString &productId ) 1183void Addressee::setProductId( const QString &productId )
1159{ 1184{
1160 if ( productId == mData->productId ) return; 1185 if ( productId == mData->productId ) return;
1161 detach(); 1186 detach();
1162 mData->empty = false; 1187 mData->empty = false;
1163 mData->productId = productId; 1188 mData->productId = productId;
1164} 1189}
1165 1190
1166QString Addressee::productId() const 1191QString Addressee::productId() const
1167{ 1192{
1168 return mData->productId; 1193 return mData->productId;
1169} 1194}
1170 1195
1171QString Addressee::productIdLabel() 1196QString Addressee::productIdLabel()
1172{ 1197{
1173 return i18n("Product Identifier"); 1198 return i18n("Product Identifier");
1174} 1199}
1175 1200
1176 1201
1177void Addressee::setRevision( const QDateTime &revision ) 1202void Addressee::setRevision( const QDateTime &revision )
1178{ 1203{
1179 if ( revision == mData->revision ) return; 1204 if ( revision == mData->revision ) return;
1180 detach(); 1205 detach();
1181 mData->empty = false; 1206 mData->empty = false;
1182 mData->revision = QDateTime( revision.date(), 1207 mData->revision = QDateTime( revision.date(),
1183 QTime (revision.time().hour(), 1208 QTime (revision.time().hour(),
1184 revision.time().minute(), 1209 revision.time().minute(),
1185 revision.time().second())); 1210 revision.time().second()));
1186} 1211}
1187 1212
1188QDateTime Addressee::revision() const 1213QDateTime Addressee::revision() const
1189{ 1214{
1190 return mData->revision; 1215 return mData->revision;
1191} 1216}
1192 1217
1193QString Addressee::revisionLabel() 1218QString Addressee::revisionLabel()
1194{ 1219{
1195 return i18n("Revision Date"); 1220 return i18n("Revision Date");
1196} 1221}
1197 1222
1198 1223
1199void Addressee::setSortString( const QString &sortString ) 1224void Addressee::setSortString( const QString &sortString )
1200{ 1225{
1201 if ( sortString == mData->sortString ) return; 1226 if ( sortString == mData->sortString ) return;
1202 detach(); 1227 detach();
1203 mData->empty = false; 1228 mData->empty = false;
1204 mData->sortString = sortString; 1229 mData->sortString = sortString;
1205} 1230}
1206 1231
1207QString Addressee::sortString() const 1232QString Addressee::sortString() const
1208{ 1233{
1209 return mData->sortString; 1234 return mData->sortString;
1210} 1235}
1211 1236
1212QString Addressee::sortStringLabel() 1237QString Addressee::sortStringLabel()
1213{ 1238{
1214 return i18n("Sort String"); 1239 return i18n("Sort String");
1215} 1240}
1216 1241
1217 1242
1218void Addressee::setUrl( const KURL &url ) 1243void Addressee::setUrl( const KURL &url )
1219{ 1244{
1220 if ( url == mData->url ) return; 1245 if ( url == mData->url ) return;
1221 detach(); 1246 detach();
1222 mData->empty = false; 1247 mData->empty = false;
1223 mData->url = url; 1248 mData->url = url;
1224} 1249}
1225 1250
1226KURL Addressee::url() const 1251KURL Addressee::url() const
1227{ 1252{
1228 return mData->url; 1253 return mData->url;
1229} 1254}
1230 1255
1231QString Addressee::urlLabel() 1256QString Addressee::urlLabel()
1232{ 1257{
1233 return i18n("URL"); 1258 return i18n("URL");
1234} 1259}
1235 1260
1236 1261
1237void Addressee::setSecrecy( const Secrecy &secrecy ) 1262void Addressee::setSecrecy( const Secrecy &secrecy )
1238{ 1263{
1239 if ( secrecy == mData->secrecy ) return; 1264 if ( secrecy == mData->secrecy ) return;
1240 detach(); 1265 detach();
1241 mData->empty = false; 1266 mData->empty = false;
1242 mData->secrecy = secrecy; 1267 mData->secrecy = secrecy;
1243} 1268}
1244 1269
1245Secrecy Addressee::secrecy() const 1270Secrecy Addressee::secrecy() const
1246{ 1271{
1247 return mData->secrecy; 1272 return mData->secrecy;
1248} 1273}
1249 1274
1250QString Addressee::secrecyLabel() 1275QString Addressee::secrecyLabel()
1251{ 1276{
1252 return i18n("Security Class"); 1277 return i18n("Security Class");
1253} 1278}
1254 1279
1255 1280
1256void Addressee::setLogo( const Picture &logo ) 1281void Addressee::setLogo( const Picture &logo )
1257{ 1282{
1258 if ( logo == mData->logo ) return; 1283 if ( logo == mData->logo ) return;
1259 detach(); 1284 detach();
1260 mData->empty = false; 1285 mData->empty = false;
1261 mData->logo = logo; 1286 mData->logo = logo;
1262} 1287}
1263 1288
1264Picture Addressee::logo() const 1289Picture Addressee::logo() const
1265{ 1290{
1266 return mData->logo; 1291 return mData->logo;
1267} 1292}
1268 1293
1269QString Addressee::logoLabel() 1294QString Addressee::logoLabel()
1270{ 1295{
1271 return i18n("Logo"); 1296 return i18n("Logo");
1272} 1297}
1273 1298
1274 1299
1275void Addressee::setPhoto( const Picture &photo ) 1300void Addressee::setPhoto( const Picture &photo )
1276{ 1301{
1277 if ( photo == mData->photo ) return; 1302 if ( photo == mData->photo ) return;
1278 detach(); 1303 detach();
1279 mData->empty = false; 1304 mData->empty = false;
1280 mData->photo = photo; 1305 mData->photo = photo;
1281} 1306}
1282 1307
1283Picture Addressee::photo() const 1308Picture Addressee::photo() const
1284{ 1309{
1285 return mData->photo; 1310 return mData->photo;
1286} 1311}
1287 1312
1288QString Addressee::photoLabel() 1313QString Addressee::photoLabel()
1289{ 1314{
1290 return i18n("Photo"); 1315 return i18n("Photo");
1291} 1316}
1292 1317
1293 1318
1294void Addressee::setSound( const Sound &sound ) 1319void Addressee::setSound( const Sound &sound )
1295{ 1320{
1296 if ( sound == mData->sound ) return; 1321 if ( sound == mData->sound ) return;
1297 detach(); 1322 detach();
1298 mData->empty = false; 1323 mData->empty = false;
1299 mData->sound = sound; 1324 mData->sound = sound;
1300} 1325}
1301 1326
1302Sound Addressee::sound() const 1327Sound Addressee::sound() const
1303{ 1328{
1304 return mData->sound; 1329 return mData->sound;
1305} 1330}
1306 1331
1307QString Addressee::soundLabel() 1332QString Addressee::soundLabel()
1308{ 1333{
1309 return i18n("Sound"); 1334 return i18n("Sound");
1310} 1335}
1311 1336
1312 1337
1313void Addressee::setAgent( const Agent &agent ) 1338void Addressee::setAgent( const Agent &agent )
1314{ 1339{
1315 if ( agent == mData->agent ) return; 1340 if ( agent == mData->agent ) return;
1316 detach(); 1341 detach();
1317 mData->empty = false; 1342 mData->empty = false;
1318 mData->agent = agent; 1343 mData->agent = agent;
1319} 1344}
1320 1345
1321Agent Addressee::agent() const 1346Agent Addressee::agent() const
1322{ 1347{
1323 return mData->agent; 1348 return mData->agent;
1324} 1349}
1325 1350
1326QString Addressee::agentLabel() 1351QString Addressee::agentLabel()
1327{ 1352{
1328 return i18n("Agent"); 1353 return i18n("Agent");
1329} 1354}
1330 1355
1331 1356
1332 1357
1333void Addressee::setNameFromString( const QString &str ) 1358void Addressee::setNameFromString( const QString &str )
1334{ 1359{
1335 setFormattedName( str ); 1360 setFormattedName( str );
1336 setName( str ); 1361 setName( str );
1337 1362
1338 static bool first = true; 1363 static bool first = true;
1339 static QStringList titles; 1364 static QStringList titles;
1340 static QStringList suffixes; 1365 static QStringList suffixes;
1341 static QStringList prefixes; 1366 static QStringList prefixes;
1342 1367
1343 if ( first ) { 1368 if ( first ) {
1344 first = false; 1369 first = false;
1345 titles += i18n( "Dr." ); 1370 titles += i18n( "Dr." );
1346 titles += i18n( "Miss" ); 1371 titles += i18n( "Miss" );
1347 titles += i18n( "Mr." ); 1372 titles += i18n( "Mr." );
1348 titles += i18n( "Mrs." ); 1373 titles += i18n( "Mrs." );
1349 titles += i18n( "Ms." ); 1374 titles += i18n( "Ms." );
1350 titles += i18n( "Prof." ); 1375 titles += i18n( "Prof." );
1351 1376
1352 suffixes += i18n( "I" ); 1377 suffixes += i18n( "I" );
1353 suffixes += i18n( "II" ); 1378 suffixes += i18n( "II" );
1354 suffixes += i18n( "III" ); 1379 suffixes += i18n( "III" );
1355 suffixes += i18n( "Jr." ); 1380 suffixes += i18n( "Jr." );
1356 suffixes += i18n( "Sr." ); 1381 suffixes += i18n( "Sr." );
1357 1382
1358 prefixes += "van"; 1383 prefixes += "van";
1359 prefixes += "von"; 1384 prefixes += "von";
1360 prefixes += "de"; 1385 prefixes += "de";
1361 1386
1362 KConfig config( locateLocal( "config", "kabcrc") ); 1387 KConfig config( locateLocal( "config", "kabcrc") );
1363 config.setGroup( "General" ); 1388 config.setGroup( "General" );
1364 titles += config.readListEntry( "Prefixes" ); 1389 titles += config.readListEntry( "Prefixes" );
1365 titles.remove( "" ); 1390 titles.remove( "" );
1366 prefixes += config.readListEntry( "Inclusions" ); 1391 prefixes += config.readListEntry( "Inclusions" );
1367 prefixes.remove( "" ); 1392 prefixes.remove( "" );
1368 suffixes += config.readListEntry( "Suffixes" ); 1393 suffixes += config.readListEntry( "Suffixes" );
1369 suffixes.remove( "" ); 1394 suffixes.remove( "" );
1370 } 1395 }
1371 1396
1372 // clear all name parts 1397 // clear all name parts
1373 setPrefix( "" ); 1398 setPrefix( "" );
1374 setGivenName( "" ); 1399 setGivenName( "" );
1375 setAdditionalName( "" ); 1400 setAdditionalName( "" );
1376 setFamilyName( "" ); 1401 setFamilyName( "" );
1377 setSuffix( "" ); 1402 setSuffix( "" );
1378 1403
1379 if ( str.isEmpty() ) 1404 if ( str.isEmpty() )
1380 return; 1405 return;
1381 1406
1382 int i = str.find(','); 1407 int i = str.find(',');
1383 if( i < 0 ) { 1408 if( i < 0 ) {
1384 QStringList parts = QStringList::split( " ", str ); 1409 QStringList parts = QStringList::split( " ", str );
1385 int leftOffset = 0; 1410 int leftOffset = 0;
1386 int rightOffset = parts.count() - 1; 1411 int rightOffset = parts.count() - 1;
1387 1412
1388 QString suffix; 1413 QString suffix;
1389 while ( rightOffset >= 0 ) { 1414 while ( rightOffset >= 0 ) {
1390 if ( suffixes.contains( parts[ rightOffset ] ) ) { 1415 if ( suffixes.contains( parts[ rightOffset ] ) ) {
1391 suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? "" : " ")); 1416 suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? "" : " "));
1392 rightOffset--; 1417 rightOffset--;
1393 } else 1418 } else
1394 break; 1419 break;
1395 } 1420 }
1396 setSuffix( suffix ); 1421 setSuffix( suffix );
1397 1422
1398 if ( rightOffset < 0 ) 1423 if ( rightOffset < 0 )
1399 return; 1424 return;
1400 1425
1401 if ( rightOffset - 1 >= 0 && prefixes.contains( parts[ rightOffset - 1 ].lower() ) ) { 1426 if ( rightOffset - 1 >= 0 && prefixes.contains( parts[ rightOffset - 1 ].lower() ) ) {
1402 setFamilyName( parts[ rightOffset - 1 ] + " " + parts[ rightOffset ] ); 1427 setFamilyName( parts[ rightOffset - 1 ] + " " + parts[ rightOffset ] );
1403 rightOffset--; 1428 rightOffset--;
1404 } else 1429 } else
1405 setFamilyName( parts[ rightOffset ] ); 1430 setFamilyName( parts[ rightOffset ] );
1406 1431
1407 QString prefix; 1432 QString prefix;
1408 while ( leftOffset < rightOffset ) { 1433 while ( leftOffset < rightOffset ) {
1409 if ( titles.contains( parts[ leftOffset ] ) ) { 1434 if ( titles.contains( parts[ leftOffset ] ) ) {
1410 prefix.append( ( prefix.isEmpty() ? "" : " ") + parts[ leftOffset ] ); 1435 prefix.append( ( prefix.isEmpty() ? "" : " ") + parts[ leftOffset ] );
1411 leftOffset++; 1436 leftOffset++;
1412 } else 1437 } else
1413 break; 1438 break;
1414 } 1439 }
1415 setPrefix( prefix ); 1440 setPrefix( prefix );
1416 1441
1417 if ( leftOffset < rightOffset ) { 1442 if ( leftOffset < rightOffset ) {
1418 setGivenName( parts[ leftOffset ] ); 1443 setGivenName( parts[ leftOffset ] );
1419 leftOffset++; 1444 leftOffset++;
1420 } 1445 }
1421 1446
1422 QString additionalName; 1447 QString additionalName;
1423 while ( leftOffset < rightOffset ) { 1448 while ( leftOffset < rightOffset ) {
1424 additionalName.append( ( additionalName.isEmpty() ? "" : " ") + parts[ leftOffset ] ); 1449 additionalName.append( ( additionalName.isEmpty() ? "" : " ") + parts[ leftOffset ] );
1425 leftOffset++; 1450 leftOffset++;
1426 } 1451 }
1427 setAdditionalName( additionalName ); 1452 setAdditionalName( additionalName );
1428 } else { 1453 } else {
1429 QString part1 = str.left( i ); 1454 QString part1 = str.left( i );
1430 QString part2 = str.mid( i + 1 ); 1455 QString part2 = str.mid( i + 1 );
1431 1456
1432 QStringList parts = QStringList::split( " ", part1 ); 1457 QStringList parts = QStringList::split( " ", part1 );
1433 int leftOffset = 0; 1458 int leftOffset = 0;
1434 int rightOffset = parts.count() - 1; 1459 int rightOffset = parts.count() - 1;
1435 1460
1436 QString suffix; 1461 QString suffix;
1437 while ( rightOffset >= 0 ) { 1462 while ( rightOffset >= 0 ) {
1438 if ( suffixes.contains( parts[ rightOffset ] ) ) { 1463 if ( suffixes.contains( parts[ rightOffset ] ) ) {
1439 suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? "" : " ")); 1464 suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? "" : " "));
1440 rightOffset--; 1465 rightOffset--;
1441 } else 1466 } else
1442 break; 1467 break;
1443 } 1468 }
1444 setSuffix( suffix ); 1469 setSuffix( suffix );
1445 1470
1446 if ( rightOffset - 1 >= 0 && prefixes.contains( parts[ rightOffset - 1 ].lower() ) ) { 1471 if ( rightOffset - 1 >= 0 && prefixes.contains( parts[ rightOffset - 1 ].lower() ) ) {
1447 setFamilyName( parts[ rightOffset - 1 ] + " " + parts[ rightOffset ] ); 1472 setFamilyName( parts[ rightOffset - 1 ] + " " + parts[ rightOffset ] );
1448 rightOffset--; 1473 rightOffset--;
1449 } else 1474 } else
1450 setFamilyName( parts[ rightOffset ] ); 1475 setFamilyName( parts[ rightOffset ] );
1451 1476
1452 QString prefix; 1477 QString prefix;
1453 while ( leftOffset < rightOffset ) { 1478 while ( leftOffset < rightOffset ) {
1454 if ( titles.contains( parts[ leftOffset ] ) ) { 1479 if ( titles.contains( parts[ leftOffset ] ) ) {
1455 prefix.append( ( prefix.isEmpty() ? "" : " ") + parts[ leftOffset ] ); 1480 prefix.append( ( prefix.isEmpty() ? "" : " ") + parts[ leftOffset ] );
1456 leftOffset++; 1481 leftOffset++;
1457 } else 1482 } else
1458 break; 1483 break;
1459 } 1484 }
1460 1485
1461 parts = QStringList::split( " ", part2 ); 1486 parts = QStringList::split( " ", part2 );
1462 1487
1463 leftOffset = 0; 1488 leftOffset = 0;
1464 rightOffset = parts.count(); 1489 rightOffset = parts.count();
1465 1490
1466 while ( leftOffset < rightOffset ) { 1491 while ( leftOffset < rightOffset ) {
1467 if ( titles.contains( parts[ leftOffset ] ) ) { 1492 if ( titles.contains( parts[ leftOffset ] ) ) {
1468 prefix.append( ( prefix.isEmpty() ? "" : " ") + parts[ leftOffset ] ); 1493 prefix.append( ( prefix.isEmpty() ? "" : " ") + parts[ leftOffset ] );
1469 leftOffset++; 1494 leftOffset++;
1470 } else 1495 } else
1471 break; 1496 break;
1472 } 1497 }
1473 setPrefix( prefix ); 1498 setPrefix( prefix );
1474 1499
1475 if ( leftOffset < rightOffset ) { 1500 if ( leftOffset < rightOffset ) {
1476 setGivenName( parts[ leftOffset ] ); 1501 setGivenName( parts[ leftOffset ] );
1477 leftOffset++; 1502 leftOffset++;
1478 } 1503 }
1479 1504
1480 QString additionalName; 1505 QString additionalName;
1481 while ( leftOffset < rightOffset ) { 1506 while ( leftOffset < rightOffset ) {
1482 additionalName.append( ( additionalName.isEmpty() ? "" : " ") + parts[ leftOffset ] ); 1507 additionalName.append( ( additionalName.isEmpty() ? "" : " ") + parts[ leftOffset ] );
1483 leftOffset++; 1508 leftOffset++;
1484 } 1509 }
1485 setAdditionalName( additionalName ); 1510 setAdditionalName( additionalName );
1486 } 1511 }
1487} 1512}
1488 1513
1489QString Addressee::realName() const 1514QString Addressee::realName() const
1490{ 1515{
1491 if ( !formattedName().isEmpty() ) 1516 if ( !formattedName().isEmpty() )
1492 return formattedName(); 1517 return formattedName();
1493 1518
1494 QString n = assembledName(); 1519 QString n = assembledName();
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 8051fec..0d688f8 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -1,842 +1,847 @@
1/*** Warning! This file has been generated by the script makeaddressee ***/ 1/*** Warning! This file has been generated by the script makeaddressee ***/
2/* 2/*
3 This file is part of libkabc. 3 This file is part of libkabc.
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_ADDRESSEE_H 29#ifndef KABC_ADDRESSEE_H
30#define KABC_ADDRESSEE_H 30#define KABC_ADDRESSEE_H
31 31
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qstring.h> 33#include <qstring.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qvaluelist.h> 35#include <qvaluelist.h>
36 36
37#include <ksharedptr.h> 37#include <ksharedptr.h>
38#include <kurl.h> 38#include <kurl.h>
39 39
40#include "address.h" 40#include "address.h"
41#include "agent.h" 41#include "agent.h"
42#include "geo.h" 42#include "geo.h"
43#include "key.h" 43#include "key.h"
44#include "phonenumber.h" 44#include "phonenumber.h"
45#include "picture.h" 45#include "picture.h"
46#include "secrecy.h" 46#include "secrecy.h"
47#include "sound.h" 47#include "sound.h"
48#include "timezone.h" 48#include "timezone.h"
49 49
50namespace KABC { 50namespace KABC {
51 51
52class Resource; 52class Resource;
53 53
54/** 54/**
55 @short address book entry 55 @short address book entry
56 56
57 This class represents an entry in the address book. 57 This class represents an entry in the address book.
58 58
59 The data of this class is implicitly shared. You can pass this class by value. 59 The data of this class is implicitly shared. You can pass this class by value.
60 60
61 If you need the name of a field for presenting it to the user you should use 61 If you need the name of a field for presenting it to the user you should use
62 the functions ending in Label(). They return a translated string which can be 62 the functions ending in Label(). They return a translated string which can be
63 used as label for the corresponding field. 63 used as label for the corresponding field.
64 64
65 About the name fields: 65 About the name fields:
66 66
67 givenName() is the first name and familyName() the last name. In some 67 givenName() is the first name and familyName() the last name. In some
68 countries the family name comes first, that's the reason for the 68 countries the family name comes first, that's the reason for the
69 naming. formattedName() is the full name with the correct formatting. 69 naming. formattedName() is the full name with the correct formatting.
70 It is used as an override, when the correct formatting can't be generated 70 It is used as an override, when the correct formatting can't be generated
71 from the other name fields automatically. 71 from the other name fields automatically.
72 72
73 realName() returns a fully formatted name(). It uses formattedName, if set, 73 realName() returns a fully formatted name(). It uses formattedName, if set,
74 otherwise it constucts the name from the name fields. As fallback, if 74 otherwise it constucts the name from the name fields. As fallback, if
75 nothing else is set it uses name(). 75 nothing else is set it uses name().
76 76
77 name() is the NAME type of RFC2426. It can be used as internal name for the 77 name() is the NAME type of RFC2426. It can be used as internal name for the
78 data enty, but shouldn't be used for displaying the data to the user. 78 data enty, but shouldn't be used for displaying the data to the user.
79 */ 79 */
80class Addressee 80class Addressee
81{ 81{
82 friend QDataStream &operator<<( QDataStream &, const Addressee & ); 82 friend QDataStream &operator<<( QDataStream &, const Addressee & );
83 friend QDataStream &operator>>( QDataStream &, Addressee & ); 83 friend QDataStream &operator>>( QDataStream &, Addressee & );
84 84
85 public: 85 public:
86 typedef QValueList<Addressee> List; 86 typedef QValueList<Addressee> List;
87 87
88 /** 88 /**
89 Construct an empty address book entry. 89 Construct an empty address book entry.
90 */ 90 */
91 Addressee(); 91 Addressee();
92 ~Addressee(); 92 ~Addressee();
93 93
94 Addressee( const Addressee & ); 94 Addressee( const Addressee & );
95 Addressee &operator=( const Addressee & ); 95 Addressee &operator=( const Addressee & );
96 96
97 bool operator==( const Addressee & ) const; 97 bool operator==( const Addressee & ) const;
98 bool operator!=( const Addressee & ) const; 98 bool operator!=( const Addressee & ) const;
99 // sync stuff 99 // sync stuff
100 void setTempSyncStat(int id); 100 void setTempSyncStat(int id);
101 int tempSyncStat() const; 101 int tempSyncStat() const;
102 void setIDStr( const QString & ); 102 void setIDStr( const QString & );
103 const QString IDStr() const; 103 const QString IDStr() const;
104 void setID( const QString &, const QString & ); 104 void setID( const QString &, const QString & );
105 const QString getID( const QString & ) const; 105 const QString getID( const QString & ) const;
106 void setCsum( const QString &, const QString & ); 106 void setCsum( const QString &, const QString & );
107 const QString getCsum( const QString & ) const ; 107 const QString getCsum( const QString & ) const ;
108 void removeID(const QString &); 108 void removeID(const QString &);
109 void computeCsum(const QString &dev); 109 void computeCsum(const QString &dev);
110 ulong getCsum4List( const QStringList & attList); 110 ulong getCsum4List( const QStringList & attList);
111 /** 111 /**
112 Return, if the address book entry is empty. 112 Return, if the address book entry is empty.
113 */ 113 */
114 bool isEmpty() const; 114 bool isEmpty() const;
115 void setExternalUID( const QString &id ); 115 void setExternalUID( const QString &id );
116 const QString externalUID() const; 116 const QString externalUID() const;
117 void setOriginalExternalUID( const QString &id ); 117 void setOriginalExternalUID( const QString &id );
118 QString originalExternalUID() const; 118 QString originalExternalUID() const;
119 void mergeContact( const Addressee& ad, bool isSubSet ); 119 void mergeContact( const Addressee& ad, bool isSubSet );
120 void simplifyEmails(); 120 void simplifyEmails();
121 void simplifyAddresses(); 121 void simplifyAddresses();
122 void simplifyPhoneNumbers(); 122 void simplifyPhoneNumbers();
123 void simplifyPhoneNumberTypes(); 123 void simplifyPhoneNumberTypes();
124 bool removeVoice(); 124 bool removeVoice();
125 bool containsAdr(const Addressee& addr ); 125 bool containsAdr(const Addressee& addr );
126 126
127 /** 127 /**
128 Set unique identifier. 128 Set unique identifier.
129 */ 129 */
130 void setUid( const QString &uid ); 130 void setUid( const QString &uid );
131 /** 131 /**
132 Return unique identifier. 132 Return unique identifier.
133 */ 133 */
134 const QString uid() const; 134 const QString uid() const;
135 /** 135 /**
136 Return translated label for uid field. 136 Return translated label for uid field.
137 */ 137 */
138 static QString uidLabel(); 138 static QString uidLabel();
139 139
140 /** 140 /**
141 Set name. 141 Set name.
142 */ 142 */
143 void setName( const QString &name ); 143 void setName( const QString &name );
144 /** 144 /**
145 Return name. 145 Return name.
146 */ 146 */
147 QString name() const; 147 QString name() const;
148 /** 148 /**
149 Return translated label for name field. 149 Return translated label for name field.
150 */ 150 */
151 static QString nameLabel(); 151 static QString nameLabel();
152 152
153 /** 153 /**
154 Set formatted name. 154 Set formatted name.
155 */ 155 */
156 void setFormattedName( const QString &formattedName ); 156 void setFormattedName( const QString &formattedName );
157 void setDefaultFormattedName( const QString &formattedName );
157 /** 158 /**
158 Return formatted name. 159 Return formatted name.
159 */ 160 */
160 QString formattedName() const; 161 QString formattedName() const;
162 QString defaultFormattedName() const;
161 /** 163 /**
162 Return translated label for formattedName field. 164 Return translated label for formattedName field.
163 */ 165 */
164 static QString formattedNameLabel(); 166 static QString formattedNameLabel();
167 static QString defaultFormattedNameLabel();
165 168
166 /** 169 /**
167 Set family name. 170 Set family name.
168 */ 171 */
169 void setFamilyName( const QString &familyName ); 172 void setFamilyName( const QString &familyName );
170 /** 173 /**
171 Return family name. 174 Return family name.
172 */ 175 */
173 QString familyName() const; 176 QString familyName() const;
174 /** 177 /**
175 Return translated label for familyName field. 178 Return translated label for familyName field.
176 */ 179 */
177 static QString familyNameLabel(); 180 static QString familyNameLabel();
178 181
179 /** 182 /**
180 Set given name. 183 Set given name.
181 */ 184 */
182 void setGivenName( const QString &givenName ); 185 void setGivenName( const QString &givenName );
183 /** 186 /**
184 Return given name. 187 Return given name.
185 */ 188 */
186 QString givenName() const; 189 QString givenName() const;
187 /** 190 /**
188 Return translated label for givenName field. 191 Return translated label for givenName field.
189 */ 192 */
190 static QString givenNameLabel(); 193 static QString givenNameLabel();
191 194
192 /** 195 /**
193 Set additional names. 196 Set additional names.
194 */ 197 */
195 void setAdditionalName( const QString &additionalName ); 198 void setAdditionalName( const QString &additionalName );
196 /** 199 /**
197 Return additional names. 200 Return additional names.
198 */ 201 */
199 QString additionalName() const; 202 QString additionalName() const;
200 /** 203 /**
201 Return translated label for additionalName field. 204 Return translated label for additionalName field.
202 */ 205 */
203 static QString additionalNameLabel(); 206 static QString additionalNameLabel();
204 207
205 /** 208 /**
206 Set honorific prefixes. 209 Set honorific prefixes.
207 */ 210 */
208 void setPrefix( const QString &prefix ); 211 void setPrefix( const QString &prefix );
209 /** 212 /**
210 Return honorific prefixes. 213 Return honorific prefixes.
211 */ 214 */
212 QString prefix() const; 215 QString prefix() const;
213 /** 216 /**
214 Return translated label for prefix field. 217 Return translated label for prefix field.
215 */ 218 */
216 static QString prefixLabel(); 219 static QString prefixLabel();
217 220
218 /** 221 /**
219 Set honorific suffixes. 222 Set honorific suffixes.
220 */ 223 */
221 void setSuffix( const QString &suffix ); 224 void setSuffix( const QString &suffix );
222 /** 225 /**
223 Return honorific suffixes. 226 Return honorific suffixes.
224 */ 227 */
225 QString suffix() const; 228 QString suffix() const;
226 /** 229 /**
227 Return translated label for suffix field. 230 Return translated label for suffix field.
228 */ 231 */
229 static QString suffixLabel(); 232 static QString suffixLabel();
230 233
231 /** 234 /**
232 Set nick name. 235 Set nick name.
233 */ 236 */
234 void setNickName( const QString &nickName ); 237 void setNickName( const QString &nickName );
235 /** 238 /**
236 Return nick name. 239 Return nick name.
237 */ 240 */
238 QString nickName() const; 241 QString nickName() const;
239 /** 242 /**
240 Return translated label for nickName field. 243 Return translated label for nickName field.
241 */ 244 */
242 static QString nickNameLabel(); 245 static QString nickNameLabel();
243 246
244 /** 247 /**
245 Set birthday. 248 Set birthday.
246 */ 249 */
247 void setBirthday( const QDateTime &birthday ); 250 void setBirthday( const QDateTime &birthday );
248 /** 251 /**
249 Return birthday. 252 Return birthday.
250 */ 253 */
251 QDateTime birthday() const; 254 QDateTime birthday() const;
252 /** 255 /**
253 Return translated label for birthday field. 256 Return translated label for birthday field.
254 */ 257 */
255 static QString birthdayLabel(); 258 static QString birthdayLabel();
256 259
257 /** 260 /**
258 Return translated label for homeAddressStreet field. 261 Return translated label for homeAddressStreet field.
259 */ 262 */
260 static QString homeAddressStreetLabel(); 263 static QString homeAddressStreetLabel();
261 264
262 /** 265 /**
263 Return translated label for homeAddressLocality field. 266 Return translated label for homeAddressLocality field.
264 */ 267 */
265 static QString homeAddressLocalityLabel(); 268 static QString homeAddressLocalityLabel();
266 269
267 /** 270 /**
268 Return translated label for homeAddressRegion field. 271 Return translated label for homeAddressRegion field.
269 */ 272 */
270 static QString homeAddressRegionLabel(); 273 static QString homeAddressRegionLabel();
271 274
272 /** 275 /**
273 Return translated label for homeAddressPostalCode field. 276 Return translated label for homeAddressPostalCode field.
274 */ 277 */
275 static QString homeAddressPostalCodeLabel(); 278 static QString homeAddressPostalCodeLabel();
276 279
277 /** 280 /**
278 Return translated label for homeAddressCountry field. 281 Return translated label for homeAddressCountry field.
279 */ 282 */
280 static QString homeAddressCountryLabel(); 283 static QString homeAddressCountryLabel();
281 284
282 /** 285 /**
283 Return translated label for homeAddressLabel field. 286 Return translated label for homeAddressLabel field.
284 */ 287 */
285 static QString homeAddressLabelLabel(); 288 static QString homeAddressLabelLabel();
286 289
287 /** 290 /**
288 Return translated label for businessAddressStreet field. 291 Return translated label for businessAddressStreet field.
289 */ 292 */
290 static QString businessAddressStreetLabel(); 293 static QString businessAddressStreetLabel();
291 294
292 /** 295 /**
293 Return translated label for businessAddressLocality field. 296 Return translated label for businessAddressLocality field.
294 */ 297 */
295 static QString businessAddressLocalityLabel(); 298 static QString businessAddressLocalityLabel();
296 299
297 /** 300 /**
298 Return translated label for businessAddressRegion field. 301 Return translated label for businessAddressRegion field.
299 */ 302 */
300 static QString businessAddressRegionLabel(); 303 static QString businessAddressRegionLabel();
301 304
302 /** 305 /**
303 Return translated label for businessAddressPostalCode field. 306 Return translated label for businessAddressPostalCode field.
304 */ 307 */
305 static QString businessAddressPostalCodeLabel(); 308 static QString businessAddressPostalCodeLabel();
306 309
307 /** 310 /**
308 Return translated label for businessAddressCountry field. 311 Return translated label for businessAddressCountry field.
309 */ 312 */
310 static QString businessAddressCountryLabel(); 313 static QString businessAddressCountryLabel();
311 314
312 /** 315 /**
313 Return translated label for businessAddressLabel field. 316 Return translated label for businessAddressLabel field.
314 */ 317 */
315 static QString businessAddressLabelLabel(); 318 static QString businessAddressLabelLabel();
316 319
317 /** 320 /**
318 Return translated label for homePhone field. 321 Return translated label for homePhone field.
319 */ 322 */
320 static QString homePhoneLabel(); 323 static QString homePhoneLabel();
321 324
322 /** 325 /**
323 Return translated label for businessPhone field. 326 Return translated label for businessPhone field.
324 */ 327 */
325 static QString businessPhoneLabel(); 328 static QString businessPhoneLabel();
326 329
327 /** 330 /**
328 Return translated label for mobilePhone field. 331 Return translated label for mobilePhone field.
329 */ 332 */
330 static QString mobilePhoneLabel(); 333 static QString mobilePhoneLabel();
334 static QString mobileWorkPhoneLabel();
335 static QString mobileHomePhoneLabel();
331 336
332 /** 337 /**
333 Return translated label for homeFax field. 338 Return translated label for homeFax field.
334 */ 339 */
335 static QString homeFaxLabel(); 340 static QString homeFaxLabel();
336 341
337 /** 342 /**
338 Return translated label for businessFax field. 343 Return translated label for businessFax field.
339 */ 344 */
340 static QString businessFaxLabel(); 345 static QString businessFaxLabel();
341 346
342 /** 347 /**
343 Return translated label for carPhone field. 348 Return translated label for carPhone field.
344 */ 349 */
345 static QString carPhoneLabel(); 350 static QString carPhoneLabel();
346 351
347 /** 352 /**
348 Return translated label for isdn field. 353 Return translated label for isdn field.
349 */ 354 */
350 static QString isdnLabel(); 355 static QString isdnLabel();
351 356
352 /** 357 /**
353 Return translated label for pager field. 358 Return translated label for pager field.
354 */ 359 */
355 static QString pagerLabel(); 360 static QString pagerLabel();
356 361
357 /** 362 /**
358 Return translated label for sip field. 363 Return translated label for sip field.
359 */ 364 */
360 static QString sipLabel(); 365 static QString sipLabel();
361 366
362 /** 367 /**
363 Return translated label for email field. 368 Return translated label for email field.
364 */ 369 */
365 static QString emailLabel(); 370 static QString emailLabel();
366 371
367 /** 372 /**
368 Set mail client. 373 Set mail client.
369 */ 374 */
370 void setMailer( const QString &mailer ); 375 void setMailer( const QString &mailer );
371 /** 376 /**
372 Return mail client. 377 Return mail client.
373 */ 378 */
374 QString mailer() const; 379 QString mailer() const;
375 /** 380 /**
376 Return translated label for mailer field. 381 Return translated label for mailer field.
377 */ 382 */
378 static QString mailerLabel(); 383 static QString mailerLabel();
379 384
380 /** 385 /**
381 Set time zone. 386 Set time zone.
382 */ 387 */
383 void setTimeZone( const TimeZone &timeZone ); 388 void setTimeZone( const TimeZone &timeZone );
384 /** 389 /**
385 Return time zone. 390 Return time zone.
386 */ 391 */
387 TimeZone timeZone() const; 392 TimeZone timeZone() const;
388 /** 393 /**
389 Return translated label for timeZone field. 394 Return translated label for timeZone field.
390 */ 395 */
391 static QString timeZoneLabel(); 396 static QString timeZoneLabel();
392 397
393 /** 398 /**
394 Set geographic position. 399 Set geographic position.
395 */ 400 */
396 void setGeo( const Geo &geo ); 401 void setGeo( const Geo &geo );
397 /** 402 /**
398 Return geographic position. 403 Return geographic position.
399 */ 404 */
400 Geo geo() const; 405 Geo geo() const;
401 /** 406 /**
402 Return translated label for geo field. 407 Return translated label for geo field.
403 */ 408 */
404 static QString geoLabel(); 409 static QString geoLabel();
405 410
406 /** 411 /**
407 Set title. 412 Set title.
408 */ 413 */
409 void setTitle( const QString &title ); 414 void setTitle( const QString &title );
410 /** 415 /**
411 Return title. 416 Return title.
412 */ 417 */
413 QString title() const; 418 QString title() const;
414 /** 419 /**
415 Return translated label for title field. 420 Return translated label for title field.
416 */ 421 */
417 static QString titleLabel(); 422 static QString titleLabel();
418 423
419 /** 424 /**
420 Set role. 425 Set role.
421 */ 426 */
422 void setRole( const QString &role ); 427 void setRole( const QString &role );
423 /** 428 /**
424 Return role. 429 Return role.
425 */ 430 */
426 QString role() const; 431 QString role() const;
427 /** 432 /**
428 Return translated label for role field. 433 Return translated label for role field.
429 */ 434 */
430 static QString roleLabel(); 435 static QString roleLabel();
431 436
432 /** 437 /**
433 Set organization. 438 Set organization.
434 */ 439 */
435 void setOrganization( const QString &organization ); 440 void setOrganization( const QString &organization );
436 /** 441 /**
437 Return organization. 442 Return organization.
438 */ 443 */
439 QString organization() const; 444 QString organization() const;
440 /** 445 /**
441 Return translated label for organization field. 446 Return translated label for organization field.
442 */ 447 */
443 static QString organizationLabel(); 448 static QString organizationLabel();
444 449
445 /** 450 /**
446 Set note. 451 Set note.
447 */ 452 */
448 void setNote( const QString &note ); 453 void setNote( const QString &note );
449 /** 454 /**
450 Return note. 455 Return note.
451 */ 456 */
452 QString note() const; 457 QString note() const;
453 /** 458 /**
454 Return translated label for note field. 459 Return translated label for note field.
455 */ 460 */
456 static QString noteLabel(); 461 static QString noteLabel();
457 462
458 /** 463 /**
459 Set product identifier. 464 Set product identifier.
460 */ 465 */
461 void setProductId( const QString &productId ); 466 void setProductId( const QString &productId );
462 /** 467 /**
463 Return product identifier. 468 Return product identifier.
464 */ 469 */
465 QString productId() const; 470 QString productId() const;
466 /** 471 /**
467 Return translated label for productId field. 472 Return translated label for productId field.
468 */ 473 */
469 static QString productIdLabel(); 474 static QString productIdLabel();
470 475
471 /** 476 /**
472 Set revision date. 477 Set revision date.
473 */ 478 */
474 void setRevision( const QDateTime &revision ); 479 void setRevision( const QDateTime &revision );
475 /** 480 /**
476 Return revision date. 481 Return revision date.
477 */ 482 */
478 QDateTime revision() const; 483 QDateTime revision() const;
479 /** 484 /**
480 Return translated label for revision field. 485 Return translated label for revision field.
481 */ 486 */
482 static QString revisionLabel(); 487 static QString revisionLabel();
483 488
484 /** 489 /**
485 Set sort string. 490 Set sort string.
486 */ 491 */
487 void setSortString( const QString &sortString ); 492 void setSortString( const QString &sortString );
488 /** 493 /**
489 Return sort string. 494 Return sort string.
490 */ 495 */
491 QString sortString() const; 496 QString sortString() const;
492 /** 497 /**
493 Return translated label for sortString field. 498 Return translated label for sortString field.
494 */ 499 */
495 static QString sortStringLabel(); 500 static QString sortStringLabel();
496 501
497 /** 502 /**
498 Set URL. 503 Set URL.
499 */ 504 */
500 void setUrl( const KURL &url ); 505 void setUrl( const KURL &url );
501 /** 506 /**
502 Return URL. 507 Return URL.
503 */ 508 */
504 KURL url() const; 509 KURL url() const;
505 /** 510 /**
506 Return translated label for url field. 511 Return translated label for url field.
507 */ 512 */
508 static QString urlLabel(); 513 static QString urlLabel();
509 514
510 /** 515 /**
511 Set security class. 516 Set security class.
512 */ 517 */
513 void setSecrecy( const Secrecy &secrecy ); 518 void setSecrecy( const Secrecy &secrecy );
514 /** 519 /**
515 Return security class. 520 Return security class.
516 */ 521 */
517 Secrecy secrecy() const; 522 Secrecy secrecy() const;
518 /** 523 /**
519 Return translated label for secrecy field. 524 Return translated label for secrecy field.
520 */ 525 */
521 static QString secrecyLabel(); 526 static QString secrecyLabel();
522 527
523 /** 528 /**
524 Set logo. 529 Set logo.
525 */ 530 */
526 void setLogo( const Picture &logo ); 531 void setLogo( const Picture &logo );
527 /** 532 /**
528 Return logo. 533 Return logo.
529 */ 534 */
530 Picture logo() const; 535 Picture logo() const;
531 /** 536 /**
532 Return translated label for logo field. 537 Return translated label for logo field.
533 */ 538 */
534 static QString logoLabel(); 539 static QString logoLabel();
535 540
536 /** 541 /**
537 Set photo. 542 Set photo.
538 */ 543 */
539 void setPhoto( const Picture &photo ); 544 void setPhoto( const Picture &photo );
540 /** 545 /**
541 Return photo. 546 Return photo.
542 */ 547 */
543 Picture photo() const; 548 Picture photo() const;
544 /** 549 /**
545 Return translated label for photo field. 550 Return translated label for photo field.
546 */ 551 */
547 static QString photoLabel(); 552 static QString photoLabel();
548 553
549 /** 554 /**
550 Set sound. 555 Set sound.
551 */ 556 */
552 void setSound( const Sound &sound ); 557 void setSound( const Sound &sound );
553 /** 558 /**
554 Return sound. 559 Return sound.
555 */ 560 */
556 Sound sound() const; 561 Sound sound() const;
557 /** 562 /**
558 Return translated label for sound field. 563 Return translated label for sound field.
559 */ 564 */
560 static QString soundLabel(); 565 static QString soundLabel();
561 566
562 /** 567 /**
563 Set agent. 568 Set agent.
564 */ 569 */
565 void setAgent( const Agent &agent ); 570 void setAgent( const Agent &agent );
566 /** 571 /**
567 Return agent. 572 Return agent.
568 */ 573 */
569 Agent agent() const; 574 Agent agent() const;
570 /** 575 /**
571 Return translated label for agent field. 576 Return translated label for agent field.
572 */ 577 */
573 static QString agentLabel(); 578 static QString agentLabel();
574 579
575 /** 580 /**
576 Set name fields by parsing the given string and trying to associate the 581 Set name fields by parsing the given string and trying to associate the
577 parts of the string with according fields. This function should probably 582 parts of the string with according fields. This function should probably
578 be a bit more clever. 583 be a bit more clever.
579 */ 584 */
580 void setNameFromString( const QString & ); 585 void setNameFromString( const QString & );
581 586
582 /** 587 /**
583 Return the name of the addressee. This is calculated from all the name 588 Return the name of the addressee. This is calculated from all the name
584 fields. 589 fields.
585 */ 590 */
586 QString realName() const; 591 QString realName() const;
587 592
588 /** 593 /**
589 Return the name that consists of all name parts. 594 Return the name that consists of all name parts.
590 */ 595 */
591 QString assembledName() const; 596 QString assembledName() const;
592 597
593 /** 598 /**
594 Return email address including real name. 599 Return email address including real name.
595 600
596 @param email Email address to be used to construct the full email string. 601 @param email Email address to be used to construct the full email string.
597 If this is QString::null the preferred email address is used. 602 If this is QString::null the preferred email address is used.
598 */ 603 */
599 QString fullEmail( const QString &email=QString::null ) const; 604 QString fullEmail( const QString &email=QString::null ) const;
600 605
601 /** 606 /**
602 Insert an email address. If the email address already exists in this 607 Insert an email address. If the email address already exists in this
603 addressee it is not duplicated. 608 addressee it is not duplicated.
604 609
605 @param email Email address 610 @param email Email address
606 @param preferred Set to true, if this is the preferred email address of 611 @param preferred Set to true, if this is the preferred email address of
607 the addressee. 612 the addressee.
608 */ 613 */
609 void insertEmail( const QString &email, bool preferred=false ); 614 void insertEmail( const QString &email, bool preferred=false );
610 615
611 /** 616 /**
612 Remove email address. If the email address doesn't exist, nothing happens. 617 Remove email address. If the email address doesn't exist, nothing happens.
613 */ 618 */
614 void removeEmail( const QString &email ); 619 void removeEmail( const QString &email );
615 620
616 /** 621 /**
617 Return preferred email address. This is the first email address or the 622 Return preferred email address. This is the first email address or the
618 last one added with @ref insertEmail() with a set preferred parameter. 623 last one added with @ref insertEmail() with a set preferred parameter.
619 */ 624 */
620 QString preferredEmail() const; 625 QString preferredEmail() const;
621 626
622 /** 627 /**
623 Return list of all email addresses. 628 Return list of all email addresses.
624 */ 629 */
625 QStringList emails() const; 630 QStringList emails() const;
626 631
627 /** 632 /**
628 Set the emails to @param. 633 Set the emails to @param.
629 The first email address gets the preferred one! 634 The first email address gets the preferred one!
630 @param list The list of email addresses. 635 @param list The list of email addresses.
631 */ 636 */
632 void setEmails( const QStringList& list); 637 void setEmails( const QStringList& list);
633 638
634 /** 639 /**
635 Insert a phone number. If a phone number with the same id already exists 640 Insert a phone number. If a phone number with the same id already exists
636 in this addressee it is not duplicated. 641 in this addressee it is not duplicated.
637 */ 642 */
638 void insertPhoneNumber( const PhoneNumber &phoneNumber ); 643 void insertPhoneNumber( const PhoneNumber &phoneNumber );
639 644
640 /** 645 /**
641 Remove phone number. If no phone number with the given id exists for this 646 Remove phone number. If no phone number with the given id exists for this
642 addresse nothing happens. 647 addresse nothing happens.
643 */ 648 */
644 void removePhoneNumber( const PhoneNumber &phoneNumber ); 649 void removePhoneNumber( const PhoneNumber &phoneNumber );
645 650
646 /** 651 /**
647 Return phone number, which matches the given type. 652 Return phone number, which matches the given type.
648 */ 653 */
649 PhoneNumber phoneNumber( int type ) const; 654 PhoneNumber phoneNumber( int type ) const;
650 655
651 /** 656 /**
652 Return list of all phone numbers. 657 Return list of all phone numbers.
653 */ 658 */
654 PhoneNumber::List phoneNumbers() const; 659 PhoneNumber::List phoneNumbers() const;
655 660
656 /** 661 /**
657 Return list of phone numbers with a special type. 662 Return list of phone numbers with a special type.
658 */ 663 */
659 PhoneNumber::List phoneNumbers( int type ) const; 664 PhoneNumber::List phoneNumbers( int type ) const;
660 665
661 /** 666 /**
662 Return phone number with the given id. 667 Return phone number with the given id.
663 */ 668 */
664 PhoneNumber findPhoneNumber( const QString &id ) const; 669 PhoneNumber findPhoneNumber( const QString &id ) const;
665 670
666 /** 671 /**
667 Insert a key. If a key with the same id already exists 672 Insert a key. If a key with the same id already exists
668 in this addressee it is not duplicated. 673 in this addressee it is not duplicated.
669 */ 674 */
670 void insertKey( const Key &key ); 675 void insertKey( const Key &key );
671 676
672 /** 677 /**
673 Remove a key. If no key with the given id exists for this 678 Remove a key. If no key with the given id exists for this
674 addresse nothing happens. 679 addresse nothing happens.
675 */ 680 */
676 void removeKey( const Key &key ); 681 void removeKey( const Key &key );
677 682
678 /** 683 /**
679 Return key, which matches the given type. 684 Return key, which matches the given type.
680 If @p type == Key::Custom you can specify a string 685 If @p type == Key::Custom you can specify a string
681 that should match. If you leave the string empty, the first 686 that should match. If you leave the string empty, the first
682 key with a custom value is returned. 687 key with a custom value is returned.
683 */ 688 */
684 Key key( int type, QString customTypeString = QString::null ) const; 689 Key key( int type, QString customTypeString = QString::null ) const;
685 690
686 /** 691 /**
687 Return list of all keys. 692 Return list of all keys.
688 */ 693 */
689 Key::List keys() const; 694 Key::List keys() const;
690 695
691 /** 696 /**
692 Set the list of keys 697 Set the list of keys
693 @param keys The keys to be set. 698 @param keys The keys to be set.
694 */ 699 */
695 void setKeys( const Key::List& keys); 700 void setKeys( const Key::List& keys);
696 701
697 /** 702 /**
698 Return list of keys with a special type. 703 Return list of keys with a special type.
699 If @p type == Key::Custom you can specify a string 704 If @p type == Key::Custom you can specify a string
700 that should match. If you leave the string empty, all custom 705 that should match. If you leave the string empty, all custom
701 keys will be returned. 706 keys will be returned.
702 */ 707 */
703 Key::List keys( int type, QString customTypeString = QString::null ) const; 708 Key::List keys( int type, QString customTypeString = QString::null ) const;
704 709
705 /** 710 /**
706 Return key with the given id. 711 Return key with the given id.
707 */ 712 */
708 Key findKey( const QString &id ) const; 713 Key findKey( const QString &id ) const;
709 714
710 /** 715 /**
711 Insert an address. If an address with the same id already exists 716 Insert an address. If an address with the same id already exists
712 in this addressee it is not duplicated. 717 in this addressee it is not duplicated.
713 */ 718 */
714 void insertAddress( const Address &address ); 719 void insertAddress( const Address &address );
715 720
716 /** 721 /**
717 Remove address. If no address with the given id exists for this 722 Remove address. If no address with the given id exists for this
718 addresse nothing happens. 723 addresse nothing happens.
719 */ 724 */
720 void removeAddress( const Address &address ); 725 void removeAddress( const Address &address );
721 726
722 /** 727 /**
723 Return address, which matches the given type. 728 Return address, which matches the given type.
724 */ 729 */
725 Address address( int type ) const; 730 Address address( int type ) const;
726 731
727 /** 732 /**
728 Return list of all addresses. 733 Return list of all addresses.
729 */ 734 */
730 Address::List addresses() const; 735 Address::List addresses() const;
731 736
732 /** 737 /**
733 Return list of addresses with a special type. 738 Return list of addresses with a special type.
734 */ 739 */
735 Address::List addresses( int type ) const; 740 Address::List addresses( int type ) const;
736 741
737 /** 742 /**
738 Return address with the given id. 743 Return address with the given id.
739 */ 744 */
740 Address findAddress( const QString &id ) const; 745 Address findAddress( const QString &id ) const;
741 746
742 /** 747 /**
743 Insert category. If the category already exists it is not duplicated. 748 Insert category. If the category already exists it is not duplicated.
744 */ 749 */
745 void insertCategory( const QString & ); 750 void insertCategory( const QString & );
746 751
747 /** 752 /**
748 Remove category. 753 Remove category.
749 */ 754 */
750 void removeCategory( const QString & ); 755 void removeCategory( const QString & );
751 756
752 /** 757 /**
753 Return, if addressee has the given category. 758 Return, if addressee has the given category.
754 */ 759 */
755 bool hasCategory( const QString & ) const; 760 bool hasCategory( const QString & ) const;
756 761
757 /** 762 /**
758 Set categories to given value. 763 Set categories to given value.
759 */ 764 */
760 void setCategories( const QStringList & ); 765 void setCategories( const QStringList & );
761 766
762 /** 767 /**
763 Return list of all set categories. 768 Return list of all set categories.
764 */ 769 */
765 QStringList categories() const; 770 QStringList categories() const;
766 771
767 /** 772 /**
768 Insert custom entry. The entry is identified by the name of the inserting 773 Insert custom entry. The entry is identified by the name of the inserting
769 application and a unique name. If an entry with the given app and name 774 application and a unique name. If an entry with the given app and name
770 already exists its value is replaced with the new given value. 775 already exists its value is replaced with the new given value.
771 */ 776 */
772 void insertCustom( const QString &app, const QString &name, 777 void insertCustom( const QString &app, const QString &name,
773 const QString &value ); 778 const QString &value );
774 779
775 /** 780 /**
776 Remove custom entry. 781 Remove custom entry.
777 */ 782 */
778 void removeCustom( const QString &app, const QString &name ); 783 void removeCustom( const QString &app, const QString &name );
779 784
780 /** 785 /**
781 Return value of custom entry, identified by app and entry name. 786 Return value of custom entry, identified by app and entry name.
782 */ 787 */
783 QString custom( const QString &app, const QString &name ) const; 788 QString custom( const QString &app, const QString &name ) const;
784 789
785 /** 790 /**
786 Set all custom entries. 791 Set all custom entries.
787 */ 792 */
788 void setCustoms( const QStringList & ); 793 void setCustoms( const QStringList & );
789 794
790 /** 795 /**
791 Return list of all custom entries. 796 Return list of all custom entries.
792 */ 797 */
793 QStringList customs() const; 798 QStringList customs() const;
794 799
795 /** 800 /**
796 Parse full email address. The result is given back in fullName and email. 801 Parse full email address. The result is given back in fullName and email.
797 */ 802 */
798 static void parseEmailAddress( const QString &rawEmail, QString &fullName, 803 static void parseEmailAddress( const QString &rawEmail, QString &fullName,
799 QString &email ); 804 QString &email );
800 805
801 /** 806 /**
802 Debug output. 807 Debug output.
803 */ 808 */
804 void dump() const; 809 void dump() const;
805 810
806 /** 811 /**
807 Returns string representation of the addressee. 812 Returns string representation of the addressee.
808 */ 813 */
809 QString asString() const; 814 QString asString() const;
810 815
811 /** 816 /**
812 Set resource where the addressee is from. 817 Set resource where the addressee is from.
813 */ 818 */
814 void setResource( Resource *resource ); 819 void setResource( Resource *resource );
815 820
816 /** 821 /**
817 Return pointer to resource. 822 Return pointer to resource.
818 */ 823 */
819 Resource *resource() const; 824 Resource *resource() const;
820 825
821 /** 826 /**
822 Return resourcelabel. 827 Return resourcelabel.
823 */ 828 */
824 //US 829 //US
825 static QString resourceLabel(); 830 static QString resourceLabel();
826 static QString categoryLabel(); 831 static QString categoryLabel();
827 /** 832 /**
828 Mark addressee as changed. 833 Mark addressee as changed.
829 */ 834 */
830 void setChanged( bool value ); 835 void setChanged( bool value );
831 836
832 /** 837 /**
833 Return whether the addressee is changed. 838 Return whether the addressee is changed.
834 */ 839 */
835 bool changed() const; 840 bool changed() const;
836 841
837 void setTagged( bool value ); 842 void setTagged( bool value );
838 bool tagged() const; 843 bool tagged() const;
839 844
840 private: 845 private:
841 Addressee copy(); 846 Addressee copy();
842 void detach(); 847 void detach();
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 89d0b77..5c561c3 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -1,578 +1,596 @@
1/*** Warning! This file has been generated by the script makeaddressee ***/ 1/*** Warning! This file has been generated by the script makeaddressee ***/
2/* 2/*
3 This file is part of libkabc. 3 This file is part of libkabc.
4 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#include <klocale.h> 29#include <klocale.h>
30#include <kconfig.h> 30#include <kconfig.h>
31#include <kconfigbase.h> 31#include <kconfigbase.h>
32#include <kglobal.h> 32#include <kglobal.h>
33 33
34#include "field.h" 34#include "field.h"
35#include "resource.h" 35#include "resource.h"
36 36
37using namespace KABC; 37using namespace KABC;
38 38
39class Field::FieldImpl 39class Field::FieldImpl
40{ 40{
41 public: 41 public:
42 FieldImpl( int fieldId, int category = 0, 42 FieldImpl( int fieldId, int category = 0,
43 const QString &label = QString::null, 43 const QString &label = QString::null,
44 const QString &key = QString::null, 44 const QString &key = QString::null,
45 const QString &app = QString::null ) 45 const QString &app = QString::null )
46 : mFieldId( fieldId ), mCategory( category ), mLabel( label ), 46 : mFieldId( fieldId ), mCategory( category ), mLabel( label ),
47 mKey( key ), mApp( app ) {} 47 mKey( key ), mApp( app ) {}
48 48
49 enum FieldId 49 enum FieldId
50 { 50 {
51 CustomField, 51 CustomField,
52 FormattedName, 52 FormattedName,
53 FamilyName, 53 FamilyName,
54 GivenName, 54 GivenName,
55 AdditionalName, 55 AdditionalName,
56 Prefix, 56 Prefix,
57 Suffix, 57 Suffix,
58 NickName, 58 NickName,
59 Birthday, 59 Birthday,
60 Category, 60 Category,
61 HomeAddressStreet, 61 HomeAddressStreet,
62 HomeAddressLocality, 62 HomeAddressLocality,
63 HomeAddressRegion, 63 HomeAddressRegion,
64 HomeAddressPostalCode, 64 HomeAddressPostalCode,
65 HomeAddressCountry, 65 HomeAddressCountry,
66 HomeAddressLabel, 66 HomeAddressLabel,
67 BusinessAddressStreet, 67 BusinessAddressStreet,
68 BusinessAddressLocality, 68 BusinessAddressLocality,
69 BusinessAddressRegion, 69 BusinessAddressRegion,
70 BusinessAddressPostalCode, 70 BusinessAddressPostalCode,
71 BusinessAddressCountry, 71 BusinessAddressCountry,
72 BusinessAddressLabel, 72 BusinessAddressLabel,
73 HomePhone, 73 HomePhone,
74 BusinessPhone, 74 BusinessPhone,
75 MobilePhone, 75 MobilePhone,
76 HomeFax, 76 HomeFax,
77 BusinessFax, 77 BusinessFax,
78 CarPhone, 78 CarPhone,
79 Isdn, 79 Isdn,
80 Pager, 80 Pager,
81 Email, 81 Email,
82 Mailer, 82 Mailer,
83 Title, 83 Title,
84 Role, 84 Role,
85 Organization, 85 Organization,
86 Note, 86 Note,
87 Url, 87 Url,
88 Resource, 88 Resource,
89 Sip 89 Sip,
90 DefaultFormattedName,
91 MobileWorkPhone,
92 MobileHomePhone
90 }; 93 };
91 94
92 int fieldId() { return mFieldId; } 95 int fieldId() { return mFieldId; }
93 int category() { return mCategory; } 96 int category() { return mCategory; }
94 97
95 QString label() { return mLabel; } 98 QString label() { return mLabel; }
96 QString key() { return mKey; } 99 QString key() { return mKey; }
97 QString app() { return mApp; } 100 QString app() { return mApp; }
98 101
99 private: 102 private:
100 int mFieldId; 103 int mFieldId;
101 int mCategory; 104 int mCategory;
102 105
103 QString mLabel; 106 QString mLabel;
104 QString mKey; 107 QString mKey;
105 QString mApp; 108 QString mApp;
106}; 109};
107 110
108 111
109Field::List Field::mAllFields; 112Field::List Field::mAllFields;
110Field::List Field::mDefaultFields; 113Field::List Field::mDefaultFields;
111Field::List Field::mCustomFields; 114Field::List Field::mCustomFields;
112 115
113 116
114Field::Field( FieldImpl *impl ) 117Field::Field( FieldImpl *impl )
115{ 118{
116 mImpl = impl; 119 mImpl = impl;
117} 120}
118 121
119Field::~Field() 122Field::~Field()
120{ 123{
121 delete mImpl; 124 delete mImpl;
122} 125}
123 126
124QString Field::label() 127QString Field::label()
125{ 128{
126 switch ( mImpl->fieldId() ) { 129 switch ( mImpl->fieldId() ) {
127 case FieldImpl::FormattedName: 130 case FieldImpl::FormattedName:
128 return Addressee::formattedNameLabel(); 131 return Addressee::formattedNameLabel();
132 case FieldImpl::DefaultFormattedName:
133 return Addressee::defaultFormattedNameLabel();
129 case FieldImpl::FamilyName: 134 case FieldImpl::FamilyName:
130 return Addressee::familyNameLabel(); 135 return Addressee::familyNameLabel();
131 case FieldImpl::GivenName: 136 case FieldImpl::GivenName:
132 return Addressee::givenNameLabel(); 137 return Addressee::givenNameLabel();
133 case FieldImpl::AdditionalName: 138 case FieldImpl::AdditionalName:
134 return Addressee::additionalNameLabel(); 139 return Addressee::additionalNameLabel();
135 case FieldImpl::Prefix: 140 case FieldImpl::Prefix:
136 return Addressee::prefixLabel(); 141 return Addressee::prefixLabel();
137 case FieldImpl::Suffix: 142 case FieldImpl::Suffix:
138 return Addressee::suffixLabel(); 143 return Addressee::suffixLabel();
139 case FieldImpl::NickName: 144 case FieldImpl::NickName:
140 return Addressee::nickNameLabel(); 145 return Addressee::nickNameLabel();
141 case FieldImpl::Birthday: 146 case FieldImpl::Birthday:
142 return Addressee::birthdayLabel(); 147 return Addressee::birthdayLabel();
143 case FieldImpl::HomeAddressStreet: 148 case FieldImpl::HomeAddressStreet:
144 return Addressee::homeAddressStreetLabel(); 149 return Addressee::homeAddressStreetLabel();
145 case FieldImpl::HomeAddressLocality: 150 case FieldImpl::HomeAddressLocality:
146 return Addressee::homeAddressLocalityLabel(); 151 return Addressee::homeAddressLocalityLabel();
147 case FieldImpl::HomeAddressRegion: 152 case FieldImpl::HomeAddressRegion:
148 return Addressee::homeAddressRegionLabel(); 153 return Addressee::homeAddressRegionLabel();
149 case FieldImpl::HomeAddressPostalCode: 154 case FieldImpl::HomeAddressPostalCode:
150 return Addressee::homeAddressPostalCodeLabel(); 155 return Addressee::homeAddressPostalCodeLabel();
151 case FieldImpl::HomeAddressCountry: 156 case FieldImpl::HomeAddressCountry:
152 return Addressee::homeAddressCountryLabel(); 157 return Addressee::homeAddressCountryLabel();
153 case FieldImpl::HomeAddressLabel: 158 case FieldImpl::HomeAddressLabel:
154 return Addressee::homeAddressLabelLabel(); 159 return Addressee::homeAddressLabelLabel();
155 case FieldImpl::BusinessAddressStreet: 160 case FieldImpl::BusinessAddressStreet:
156 return Addressee::businessAddressStreetLabel(); 161 return Addressee::businessAddressStreetLabel();
157 case FieldImpl::BusinessAddressLocality: 162 case FieldImpl::BusinessAddressLocality:
158 return Addressee::businessAddressLocalityLabel(); 163 return Addressee::businessAddressLocalityLabel();
159 case FieldImpl::BusinessAddressRegion: 164 case FieldImpl::BusinessAddressRegion:
160 return Addressee::businessAddressRegionLabel(); 165 return Addressee::businessAddressRegionLabel();
161 case FieldImpl::BusinessAddressPostalCode: 166 case FieldImpl::BusinessAddressPostalCode:
162 return Addressee::businessAddressPostalCodeLabel(); 167 return Addressee::businessAddressPostalCodeLabel();
163 case FieldImpl::BusinessAddressCountry: 168 case FieldImpl::BusinessAddressCountry:
164 return Addressee::businessAddressCountryLabel(); 169 return Addressee::businessAddressCountryLabel();
165 case FieldImpl::BusinessAddressLabel: 170 case FieldImpl::BusinessAddressLabel:
166 return Addressee::businessAddressLabelLabel(); 171 return Addressee::businessAddressLabelLabel();
167 case FieldImpl::HomePhone: 172 case FieldImpl::HomePhone:
168 return Addressee::homePhoneLabel(); 173 return Addressee::homePhoneLabel();
169 case FieldImpl::BusinessPhone: 174 case FieldImpl::BusinessPhone:
170 return Addressee::businessPhoneLabel(); 175 return Addressee::businessPhoneLabel();
171 case FieldImpl::MobilePhone: 176 case FieldImpl::MobilePhone:
172 return Addressee::mobilePhoneLabel(); 177 return Addressee::mobilePhoneLabel();
178 case FieldImpl::MobileHomePhone:
179 return Addressee::mobileHomePhoneLabel();
180 case FieldImpl::MobileWorkPhone:
181 return Addressee::mobileWorkPhoneLabel();
173 case FieldImpl::HomeFax: 182 case FieldImpl::HomeFax:
174 return Addressee::homeFaxLabel(); 183 return Addressee::homeFaxLabel();
175 case FieldImpl::BusinessFax: 184 case FieldImpl::BusinessFax:
176 return Addressee::businessFaxLabel(); 185 return Addressee::businessFaxLabel();
177 case FieldImpl::CarPhone: 186 case FieldImpl::CarPhone:
178 return Addressee::carPhoneLabel(); 187 return Addressee::carPhoneLabel();
179 case FieldImpl::Isdn: 188 case FieldImpl::Isdn:
180 return Addressee::isdnLabel(); 189 return Addressee::isdnLabel();
181 case FieldImpl::Pager: 190 case FieldImpl::Pager:
182 return Addressee::pagerLabel(); 191 return Addressee::pagerLabel();
183 case FieldImpl::Email: 192 case FieldImpl::Email:
184 return Addressee::emailLabel(); 193 return Addressee::emailLabel();
185 case FieldImpl::Mailer: 194 case FieldImpl::Mailer:
186 return Addressee::mailerLabel(); 195 return Addressee::mailerLabel();
187 case FieldImpl::Title: 196 case FieldImpl::Title:
188 return Addressee::titleLabel(); 197 return Addressee::titleLabel();
189 case FieldImpl::Role: 198 case FieldImpl::Role:
190 return Addressee::roleLabel(); 199 return Addressee::roleLabel();
191 case FieldImpl::Organization: 200 case FieldImpl::Organization:
192 return Addressee::organizationLabel(); 201 return Addressee::organizationLabel();
193 case FieldImpl::Note: 202 case FieldImpl::Note:
194 return Addressee::noteLabel(); 203 return Addressee::noteLabel();
195 case FieldImpl::Url: 204 case FieldImpl::Url:
196 return Addressee::urlLabel(); 205 return Addressee::urlLabel();
197 case FieldImpl::Resource: 206 case FieldImpl::Resource:
198 return Addressee::resourceLabel(); 207 return Addressee::resourceLabel();
199 case FieldImpl::Category: 208 case FieldImpl::Category:
200 return Addressee::categoryLabel(); 209 return Addressee::categoryLabel();
201 case FieldImpl::Sip: 210 case FieldImpl::Sip:
202 return Addressee::sipLabel(); 211 return Addressee::sipLabel();
203 case FieldImpl::CustomField: 212 case FieldImpl::CustomField:
204 return mImpl->label(); 213 return mImpl->label();
205 default: 214 default:
206 return i18n("Unknown Field"); 215 return i18n("Unknown Field");
207 } 216 }
208} 217}
209 218
210int Field::category() 219int Field::category()
211{ 220{
212 return mImpl->category(); 221 return mImpl->category();
213} 222}
214 223
215QString Field::categoryLabel( int category ) 224QString Field::categoryLabel( int category )
216{ 225{
217 switch ( category ) { 226 switch ( category ) {
218 case All: 227 case All:
219 return i18n("All"); 228 return i18n("All");
220 case Frequent: 229 case Frequent:
221 return i18n("Frequent"); 230 return i18n("Frequent");
222 case Address: 231 case Address:
223 return i18n("Address"); 232 return i18n("Address");
224 case Email: 233 case Email:
225 return i18n("Email"); 234 return i18n("Email");
226 case Personal: 235 case Personal:
227 return i18n("Personal"); 236 return i18n("Personal");
228 case Organization: 237 case Organization:
229 return i18n("Organization"); 238 return i18n("Organization");
230 case CustomCategory: 239 case CustomCategory:
231 return i18n("Custom"); 240 return i18n("Custom");
232 default: 241 default:
233 return i18n("Undefined"); 242 return i18n("Undefined");
234 } 243 }
235} 244}
236 245
237QString Field::value( const KABC::Addressee &a ) 246QString Field::value( const KABC::Addressee &a )
238{ 247{
239 switch ( mImpl->fieldId() ) { 248 switch ( mImpl->fieldId() ) {
240 case FieldImpl::FormattedName: 249 case FieldImpl::FormattedName:
241 return a.formattedName(); 250 return a.formattedName();
251 case FieldImpl::DefaultFormattedName:
252 return a.defaultFormattedName();
242 case FieldImpl::FamilyName: 253 case FieldImpl::FamilyName:
243 return a.familyName(); 254 return a.familyName();
244 case FieldImpl::GivenName: 255 case FieldImpl::GivenName:
245 return a.givenName(); 256 return a.givenName();
246 case FieldImpl::AdditionalName: 257 case FieldImpl::AdditionalName:
247 return a.additionalName(); 258 return a.additionalName();
248 case FieldImpl::Prefix: 259 case FieldImpl::Prefix:
249 return a.prefix(); 260 return a.prefix();
250 case FieldImpl::Suffix: 261 case FieldImpl::Suffix:
251 return a.suffix(); 262 return a.suffix();
252 case FieldImpl::NickName: 263 case FieldImpl::NickName:
253 return a.nickName(); 264 return a.nickName();
254 case FieldImpl::Mailer: 265 case FieldImpl::Mailer:
255 return a.mailer(); 266 return a.mailer();
256 case FieldImpl::Title: 267 case FieldImpl::Title:
257 return a.title(); 268 return a.title();
258 case FieldImpl::Role: 269 case FieldImpl::Role:
259 return a.role(); 270 return a.role();
260 case FieldImpl::Organization: 271 case FieldImpl::Organization:
261 return a.organization(); 272 return a.organization();
262 case FieldImpl::Note: 273 case FieldImpl::Note:
263 return a.note(); 274 return a.note();
264 case FieldImpl::Email: 275 case FieldImpl::Email:
265 return a.preferredEmail(); 276 return a.preferredEmail();
266 case FieldImpl::Birthday: 277 case FieldImpl::Birthday:
267 if ( a.birthday().isValid() ) { 278 if ( a.birthday().isValid() ) {
268//the generated code had the following format: return a.birthday().date().toString( Qt::ISODate ); 279//the generated code had the following format: return a.birthday().date().toString( Qt::ISODate );
269// But Qt::IsoDate was not specified. 280// But Qt::IsoDate was not specified.
270// QString _oldFormat = KGlobal::locale()->dateFormat(); 281// QString _oldFormat = KGlobal::locale()->dateFormat();
271// KGlobal::locale()->setDateFormat("%Y-%m-%d"); // = Qt::ISODate 282// KGlobal::locale()->setDateFormat("%Y-%m-%d"); // = Qt::ISODate
272 QString dt = KGlobal::locale()->formatDate(a.birthday().date(), false, KLocale::ISODate); 283 QString dt = KGlobal::locale()->formatDate(a.birthday().date(), false, KLocale::ISODate);
273// KGlobal::locale()->setDateFormat(_oldFormat); 284// KGlobal::locale()->setDateFormat(_oldFormat);
274 return dt; 285 return dt;
275 } 286 }
276 else 287 else
277 return QString::null; 288 return QString::null;
278 case FieldImpl::Url: 289 case FieldImpl::Url:
279 return a.url().prettyURL(); 290 return a.url().prettyURL();
280//US 291//US
281 case FieldImpl::Resource: 292 case FieldImpl::Resource:
282 return a.resource()->resourceName(); 293 return a.resource()->resourceName();
283 case FieldImpl::Category: 294 case FieldImpl::Category:
284 return a.categories().join(","); 295 return a.categories().join(",");
285 case FieldImpl::HomePhone: 296 case FieldImpl::HomePhone:
286 return a.phoneNumber( PhoneNumber::Home ).number(); 297 return a.phoneNumber( PhoneNumber::Home ).number();
287 case FieldImpl::BusinessPhone: 298 case FieldImpl::BusinessPhone:
288 return a.phoneNumber( PhoneNumber::Work ).number(); 299 return a.phoneNumber( PhoneNumber::Work ).number();
289 case FieldImpl::MobilePhone: 300 case FieldImpl::MobilePhone:
290 return a.phoneNumber( PhoneNumber::Cell ).number(); 301 return a.phoneNumber( PhoneNumber::Cell ).number();
302 case FieldImpl::MobileWorkPhone:
303 return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Work ).number();
304 case FieldImpl::MobileHomePhone:
305 return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Home ).number();
291 case FieldImpl::HomeFax: 306 case FieldImpl::HomeFax:
292 return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); 307 return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number();
293 case FieldImpl::BusinessFax: 308 case FieldImpl::BusinessFax:
294 return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); 309 return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number();
295 case FieldImpl::CarPhone: 310 case FieldImpl::CarPhone:
296 return a.phoneNumber( PhoneNumber::Car ).number(); 311 return a.phoneNumber( PhoneNumber::Car ).number();
297 case FieldImpl::Isdn: 312 case FieldImpl::Isdn:
298 return a.phoneNumber( PhoneNumber::Isdn ).number(); 313 return a.phoneNumber( PhoneNumber::Isdn ).number();
299 case FieldImpl::Pager: 314 case FieldImpl::Pager:
300 return a.phoneNumber( PhoneNumber::Pager ).number(); 315 return a.phoneNumber( PhoneNumber::Pager ).number();
301 case FieldImpl::Sip: 316 case FieldImpl::Sip:
302 return a.phoneNumber( PhoneNumber::Sip ).number(); 317 return a.phoneNumber( PhoneNumber::Sip ).number();
303 case FieldImpl::HomeAddressStreet: 318 case FieldImpl::HomeAddressStreet:
304 return a.address( Address::Home ).street(); 319 return a.address( Address::Home ).street();
305 case FieldImpl::HomeAddressLocality: 320 case FieldImpl::HomeAddressLocality:
306 return a.address( Address::Home ).locality(); 321 return a.address( Address::Home ).locality();
307 case FieldImpl::HomeAddressRegion: 322 case FieldImpl::HomeAddressRegion:
308 return a.address( Address::Home ).region(); 323 return a.address( Address::Home ).region();
309 case FieldImpl::HomeAddressPostalCode: 324 case FieldImpl::HomeAddressPostalCode:
310 return a.address( Address::Home ).postalCode(); 325 return a.address( Address::Home ).postalCode();
311 case FieldImpl::HomeAddressCountry: 326 case FieldImpl::HomeAddressCountry:
312 return a.address( Address::Home ).country(); 327 return a.address( Address::Home ).country();
313 case FieldImpl::BusinessAddressStreet: 328 case FieldImpl::BusinessAddressStreet:
314 return a.address( Address::Work ).street(); 329 return a.address( Address::Work ).street();
315 case FieldImpl::BusinessAddressLocality: 330 case FieldImpl::BusinessAddressLocality:
316 return a.address( Address::Work ).locality(); 331 return a.address( Address::Work ).locality();
317 case FieldImpl::BusinessAddressRegion: 332 case FieldImpl::BusinessAddressRegion:
318 return a.address( Address::Work ).region(); 333 return a.address( Address::Work ).region();
319 case FieldImpl::BusinessAddressPostalCode: 334 case FieldImpl::BusinessAddressPostalCode:
320 return a.address( Address::Work ).postalCode(); 335 return a.address( Address::Work ).postalCode();
321 case FieldImpl::BusinessAddressCountry: 336 case FieldImpl::BusinessAddressCountry:
322 return a.address( Address::Work ).country(); 337 return a.address( Address::Work ).country();
323 case FieldImpl::CustomField: 338 case FieldImpl::CustomField:
324 return a.custom( mImpl->app(), mImpl->key() ); 339 return a.custom( mImpl->app(), mImpl->key() );
325 default: 340 default:
326 return QString::null; 341 return QString::null;
327 } 342 }
328} 343}
329 344
330bool Field::setValue( KABC::Addressee &a, const QString &value ) 345bool Field::setValue( KABC::Addressee &a, const QString &value )
331{ 346{
332 switch ( mImpl->fieldId() ) { 347 switch ( mImpl->fieldId() ) {
333 case FieldImpl::FormattedName: 348 case FieldImpl::FormattedName:
334 a.setFormattedName( value ); 349 a.setFormattedName( value );
335 return true; 350 return true;
336 case FieldImpl::FamilyName: 351 case FieldImpl::FamilyName:
337 a.setFamilyName( value ); 352 a.setFamilyName( value );
338 return true; 353 return true;
339 case FieldImpl::GivenName: 354 case FieldImpl::GivenName:
340 a.setGivenName( value ); 355 a.setGivenName( value );
341 return true; 356 return true;
342 case FieldImpl::AdditionalName: 357 case FieldImpl::AdditionalName:
343 a.setAdditionalName( value ); 358 a.setAdditionalName( value );
344 return true; 359 return true;
345 case FieldImpl::Prefix: 360 case FieldImpl::Prefix:
346 a.setPrefix( value ); 361 a.setPrefix( value );
347 return true; 362 return true;
348 case FieldImpl::Suffix: 363 case FieldImpl::Suffix:
349 a.setSuffix( value ); 364 a.setSuffix( value );
350 return true; 365 return true;
351 case FieldImpl::NickName: 366 case FieldImpl::NickName:
352 a.setNickName( value ); 367 a.setNickName( value );
353 return true; 368 return true;
354 case FieldImpl::Mailer: 369 case FieldImpl::Mailer:
355 a.setMailer( value ); 370 a.setMailer( value );
356 return true; 371 return true;
357 case FieldImpl::Title: 372 case FieldImpl::Title:
358 a.setTitle( value ); 373 a.setTitle( value );
359 return true; 374 return true;
360 case FieldImpl::Role: 375 case FieldImpl::Role:
361 a.setRole( value ); 376 a.setRole( value );
362 return true; 377 return true;
363 case FieldImpl::Organization: 378 case FieldImpl::Organization:
364 a.setOrganization( value ); 379 a.setOrganization( value );
365 return true; 380 return true;
366 case FieldImpl::Note: 381 case FieldImpl::Note:
367 a.setNote( value ); 382 a.setNote( value );
368 return true; 383 return true;
369 case FieldImpl::Birthday: 384 case FieldImpl::Birthday:
370//US 385//US
371//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); 386//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
372// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? 387// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
373 { 388 {
374 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate 389 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
375 a.setBirthday(dt); 390 a.setBirthday(dt);
376 } 391 }
377 return true; 392 return true;
378 case FieldImpl::CustomField: 393 case FieldImpl::CustomField:
379 a.insertCustom( mImpl->app(), mImpl->key(), value ); 394 a.insertCustom( mImpl->app(), mImpl->key(), value );
380//US never copy the resourcename back to the adressee. 395//US never copy the resourcename back to the adressee.
381 case FieldImpl::Resource: 396 case FieldImpl::Resource:
382 default: 397 default:
383 return false; 398 return false;
384 } 399 }
385} 400}
386 401
387bool Field::isCustom() 402bool Field::isCustom()
388{ 403{
389 return mImpl->fieldId() == FieldImpl::CustomField; 404 return mImpl->fieldId() == FieldImpl::CustomField;
390} 405}
391 406
392Field::List Field::allFields() 407Field::List Field::allFields()
393{ 408{
394 if ( mAllFields.isEmpty() ) { 409 if ( mAllFields.isEmpty() ) {
395 createField( FieldImpl::FormattedName, Frequent ); 410 createField( FieldImpl::FormattedName, Frequent );
411 createField( FieldImpl::DefaultFormattedName, Frequent );
396 createField( FieldImpl::FamilyName, Frequent ); 412 createField( FieldImpl::FamilyName, Frequent );
397 createField( FieldImpl::GivenName, Frequent ); 413 createField( FieldImpl::GivenName, Frequent );
398 createField( FieldImpl::AdditionalName ); 414 createField( FieldImpl::AdditionalName );
399 createField( FieldImpl::Prefix ); 415 createField( FieldImpl::Prefix );
400 createField( FieldImpl::Suffix ); 416 createField( FieldImpl::Suffix );
401 createField( FieldImpl::NickName, Personal ); 417 createField( FieldImpl::NickName, Personal );
402 createField( FieldImpl::Birthday, Personal ); 418 createField( FieldImpl::Birthday, Personal );
403 createField( FieldImpl::Category ); 419 createField( FieldImpl::Category );
404 createField( FieldImpl::HomeAddressStreet, Address|Personal ); 420 createField( FieldImpl::HomeAddressStreet, Address|Personal );
405 createField( FieldImpl::HomeAddressLocality, Address|Personal ); 421 createField( FieldImpl::HomeAddressLocality, Address|Personal );
406 createField( FieldImpl::HomeAddressRegion, Address|Personal ); 422 createField( FieldImpl::HomeAddressRegion, Address|Personal );
407 createField( FieldImpl::HomeAddressPostalCode, Address|Personal ); 423 createField( FieldImpl::HomeAddressPostalCode, Address|Personal );
408 createField( FieldImpl::HomeAddressCountry, Address|Personal ); 424 createField( FieldImpl::HomeAddressCountry, Address|Personal );
409 createField( FieldImpl::HomeAddressLabel, Address|Personal ); 425 createField( FieldImpl::HomeAddressLabel, Address|Personal );
410 createField( FieldImpl::BusinessAddressStreet, Address|Organization ); 426 createField( FieldImpl::BusinessAddressStreet, Address|Organization );
411 createField( FieldImpl::BusinessAddressLocality, Address|Organization ); 427 createField( FieldImpl::BusinessAddressLocality, Address|Organization );
412 createField( FieldImpl::BusinessAddressRegion, Address|Organization ); 428 createField( FieldImpl::BusinessAddressRegion, Address|Organization );
413 createField( FieldImpl::BusinessAddressPostalCode, Address|Organization ); 429 createField( FieldImpl::BusinessAddressPostalCode, Address|Organization );
414 createField( FieldImpl::BusinessAddressCountry, Address|Organization ); 430 createField( FieldImpl::BusinessAddressCountry, Address|Organization );
415 createField( FieldImpl::BusinessAddressLabel, Address|Organization ); 431 createField( FieldImpl::BusinessAddressLabel, Address|Organization );
416 createField( FieldImpl::HomePhone, Personal|Frequent ); 432 createField( FieldImpl::HomePhone, Personal|Frequent );
417 createField( FieldImpl::BusinessPhone, Organization|Frequent ); 433 createField( FieldImpl::BusinessPhone, Organization|Frequent );
418 createField( FieldImpl::MobilePhone, Frequent ); 434 createField( FieldImpl::MobilePhone, Frequent );
435 createField( FieldImpl::MobileHomePhone, Frequent );
436 createField( FieldImpl::MobileWorkPhone, Frequent );
419 createField( FieldImpl::HomeFax ); 437 createField( FieldImpl::HomeFax );
420 createField( FieldImpl::BusinessFax ); 438 createField( FieldImpl::BusinessFax );
421 createField( FieldImpl::CarPhone ); 439 createField( FieldImpl::CarPhone );
422 createField( FieldImpl::Isdn ); 440 createField( FieldImpl::Isdn );
423 createField( FieldImpl::Pager ); 441 createField( FieldImpl::Pager );
424 createField( FieldImpl::Email, Email|Frequent ); 442 createField( FieldImpl::Email, Email|Frequent );
425 createField( FieldImpl::Mailer, Email ); 443 createField( FieldImpl::Mailer, Email );
426 createField( FieldImpl::Title, Organization ); 444 createField( FieldImpl::Title, Organization );
427 createField( FieldImpl::Role, Organization ); 445 createField( FieldImpl::Role, Organization );
428 createField( FieldImpl::Organization, Organization ); 446 createField( FieldImpl::Organization, Organization );
429 createField( FieldImpl::Note ); 447 createField( FieldImpl::Note );
430 createField( FieldImpl::Url ); 448 createField( FieldImpl::Url );
431 createField( FieldImpl::Resource ); 449 createField( FieldImpl::Resource );
432 createField( FieldImpl::Sip ); 450 createField( FieldImpl::Sip );
433 } 451 }
434 452
435 return mAllFields; 453 return mAllFields;
436} 454}
437 455
438Field::List Field::defaultFields() 456Field::List Field::defaultFields()
439{ 457{
440 if ( mDefaultFields.isEmpty() ) { 458 if ( mDefaultFields.isEmpty() ) {
441 createDefaultField( FieldImpl::GivenName ); 459 createDefaultField( FieldImpl::GivenName );
442 createDefaultField( FieldImpl::FamilyName ); 460 createDefaultField( FieldImpl::FamilyName );
443 createDefaultField( FieldImpl::Email ); 461 createDefaultField( FieldImpl::Email );
444 } 462 }
445 463
446 return mDefaultFields; 464 return mDefaultFields;
447} 465}
448 466
449void Field::createField( int id, int category ) 467void Field::createField( int id, int category )
450{ 468{
451 mAllFields.append( new Field( new FieldImpl( id, category ) ) ); 469 mAllFields.append( new Field( new FieldImpl( id, category ) ) );
452} 470}
453 471
454void Field::createDefaultField( int id, int category ) 472void Field::createDefaultField( int id, int category )
455{ 473{
456 mDefaultFields.append( new Field( new FieldImpl( id, category ) ) ); 474 mDefaultFields.append( new Field( new FieldImpl( id, category ) ) );
457} 475}
458 476
459void Field::deleteFields() 477void Field::deleteFields()
460{ 478{
461 Field::List::ConstIterator it; 479 Field::List::ConstIterator it;
462 480
463 for( it = mAllFields.begin(); it != mAllFields.end(); ++it ) { 481 for( it = mAllFields.begin(); it != mAllFields.end(); ++it ) {
464 delete (*it); 482 delete (*it);
465 } 483 }
466 mAllFields.clear(); 484 mAllFields.clear();
467 485
468 for( it = mDefaultFields.begin(); it != mDefaultFields.end(); ++it ) { 486 for( it = mDefaultFields.begin(); it != mDefaultFields.end(); ++it ) {
469 delete (*it); 487 delete (*it);
470 } 488 }
471 mDefaultFields.clear(); 489 mDefaultFields.clear();
472 490
473 for( it = mCustomFields.begin(); it != mCustomFields.end(); ++it ) { 491 for( it = mCustomFields.begin(); it != mCustomFields.end(); ++it ) {
474 delete (*it); 492 delete (*it);
475 } 493 }
476 mCustomFields.clear(); 494 mCustomFields.clear();
477} 495}
478 496
479void Field::saveFields( const QString &identifier, 497void Field::saveFields( const QString &identifier,
480 const Field::List &fields ) 498 const Field::List &fields )
481{ 499{
482 KConfig *cfg = KGlobal::config(); 500 KConfig *cfg = KGlobal::config();
483 KConfigGroupSaver( cfg, "KABCFields" ); 501 KConfigGroupSaver( cfg, "KABCFields" );
484 saveFields( cfg, identifier, fields ); 502 saveFields( cfg, identifier, fields );
485} 503}
486 504
487void Field::saveFields( KConfig *cfg, const QString &identifier, 505void Field::saveFields( KConfig *cfg, const QString &identifier,
488 const Field::List &fields ) 506 const Field::List &fields )
489{ 507{
490 QValueList<int> fieldIds; 508 QValueList<int> fieldIds;
491 509
492//US 510//US
493// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1()); 511// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1());
494 512
495 int custom = 0; 513 int custom = 0;
496 Field::List::ConstIterator it; 514 Field::List::ConstIterator it;
497 for( it = fields.begin(); it != fields.end(); ++it ) { 515 for( it = fields.begin(); it != fields.end(); ++it ) {
498//US 516//US
499// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId()); 517// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId());
500 518
501 fieldIds.append( (*it)->mImpl->fieldId() ); 519 fieldIds.append( (*it)->mImpl->fieldId() );
502 if( (*it)->isCustom() ) { 520 if( (*it)->isCustom() ) {
503 QStringList customEntry; 521 QStringList customEntry;
504 customEntry << (*it)->mImpl->label(); 522 customEntry << (*it)->mImpl->label();
505 customEntry << (*it)->mImpl->key(); 523 customEntry << (*it)->mImpl->key();
506 customEntry << (*it)->mImpl->app(); 524 customEntry << (*it)->mImpl->app();
507 cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" + 525 cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" +
508 QString::number( custom++ ), customEntry ); 526 QString::number( custom++ ), customEntry );
509 } 527 }
510 } 528 }
511 cfg->writeEntry( identifier, fieldIds ); 529 cfg->writeEntry( identifier, fieldIds );
512} 530}
513 531
514Field::List Field::restoreFields( const QString &identifier ) 532Field::List Field::restoreFields( const QString &identifier )
515{ 533{
516//US 534//US
517// qDebug("Field::restoreFields, identifier: %s", identifier.latin1()); 535// qDebug("Field::restoreFields, identifier: %s", identifier.latin1());
518 536
519 KConfig *cfg = KGlobal::config(); 537 KConfig *cfg = KGlobal::config();
520 KConfigGroupSaver( cfg, "KABCFields" ); 538 KConfigGroupSaver( cfg, "KABCFields" );
521 cfg->setGroup( "KABCFields" ); 539 cfg->setGroup( "KABCFields" );
522 540
523 Field::List l = restoreFields( cfg, identifier ); 541 Field::List l = restoreFields( cfg, identifier );
524 542
525 return l; 543 return l;
526} 544}
527 545
528Field::List Field::restoreFields( KConfig *cfg, const QString &identifier ) 546Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
529{ 547{
530 QValueList<int> fieldIds = cfg->readIntListEntry( identifier); 548 QValueList<int> fieldIds = cfg->readIntListEntry( identifier);
531//US 549//US
532// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1()); 550// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1());
533 551
534 Field::List fields; 552 Field::List fields;
535 553
536 int custom = 0; 554 int custom = 0;
537 QValueList<int>::ConstIterator it; 555 QValueList<int>::ConstIterator it;
538 for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { 556 for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
539 FieldImpl *f = 0; 557 FieldImpl *f = 0;
540 if ( (*it) == FieldImpl::CustomField ) { 558 if ( (*it) == FieldImpl::CustomField ) {
541 QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" + 559 QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
542 identifier + "_" + 560 identifier + "_" +
543 QString::number( custom++ ) ); 561 QString::number( custom++ ) );
544 f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ], 562 f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ],
545 customEntry[ 1 ], customEntry[ 2 ] ); 563 customEntry[ 1 ], customEntry[ 2 ] );
546 } else { 564 } else {
547 f = new FieldImpl( *it ); 565 f = new FieldImpl( *it );
548 } 566 }
549 fields.append( new Field( f ) ); 567 fields.append( new Field( f ) );
550 } 568 }
551 569
552 return fields; 570 return fields;
553} 571}
554 572
555bool Field::equals( Field *field ) 573bool Field::equals( Field *field )
556{ 574{
557 bool sameId = ( mImpl->fieldId() == field->mImpl->fieldId() ); 575 bool sameId = ( mImpl->fieldId() == field->mImpl->fieldId() );
558 576
559 if ( !sameId ) return false; 577 if ( !sameId ) return false;
560 578
561 if ( mImpl->fieldId() != FieldImpl::CustomField ) return true; 579 if ( mImpl->fieldId() != FieldImpl::CustomField ) return true;
562 580
563 return mImpl->key() == field->mImpl->key(); 581 return mImpl->key() == field->mImpl->key();
564} 582}
565 583
566Field *Field::createCustomField( const QString &label, int category, 584Field *Field::createCustomField( const QString &label, int category,
567 const QString &key, const QString &app ) 585 const QString &key, const QString &app )
568{ 586{
569 Field *field = new Field( new FieldImpl( FieldImpl::CustomField, 587 Field *field = new Field( new FieldImpl( FieldImpl::CustomField,
570 category | CustomCategory, 588 category | CustomCategory,
571 label, key, app ) ); 589 label, key, app ) );
572//US 590//US
573// qDebug("Field::createCustomField label %s", label.latin1() ); 591// qDebug("Field::createCustomField label %s", label.latin1() );
574 592
575 mCustomFields.append( field ); 593 mCustomFields.append( field );
576 594
577 return field; 595 return field;
578} 596}
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp
index 041effc..4c6231d 100644
--- a/kabc/phonenumber.cpp
+++ b/kabc/phonenumber.cpp
@@ -1,236 +1,235 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library 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 GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <kapplication.h> 28#include <kapplication.h>
29#include <klocale.h> 29#include <klocale.h>
30 30
31#include "phonenumber.h" 31#include "phonenumber.h"
32 32
33using namespace KABC; 33using namespace KABC;
34 34
35PhoneNumber::PhoneNumber() : 35PhoneNumber::PhoneNumber() :
36 mType( Home ) 36 mType( Home )
37{ 37{
38 init(); 38 init();
39} 39}
40 40
41PhoneNumber::PhoneNumber( const QString &number, int type ) : 41PhoneNumber::PhoneNumber( const QString &number, int type ) :
42 mType( type ), mNumber( number ) 42 mType( type ), mNumber( number )
43{ 43{
44 init(); 44 init();
45} 45}
46 46
47PhoneNumber::~PhoneNumber() 47PhoneNumber::~PhoneNumber()
48{ 48{
49} 49}
50 50
51void PhoneNumber::init() 51void PhoneNumber::init()
52{ 52{
53 mId = KApplication::randomString( 8 ); 53 mId = KApplication::randomString( 8 );
54} 54}
55 55
56bool PhoneNumber::operator==( const PhoneNumber &p ) const 56bool PhoneNumber::operator==( const PhoneNumber &p ) const
57{ 57{
58 if ( mNumber != p.mNumber ) return false; 58 if ( mNumber != p.mNumber ) return false;
59 if ( mType != p.mType ) return false; 59 if ( mType != p.mType ) return false;
60 60
61 return true; 61 return true;
62} 62}
63 63
64bool PhoneNumber::operator!=( const PhoneNumber &p ) const 64bool PhoneNumber::operator!=( const PhoneNumber &p ) const
65{ 65{
66 return !( p == *this ); 66 return !( p == *this );
67} 67}
68 68
69bool PhoneNumber::simplifyNumber() 69bool PhoneNumber::simplifyNumber()
70{ 70{
71 QString Number; 71 QString Number;
72 int i; 72 int i;
73 Number = mNumber.stripWhiteSpace (); 73 Number = mNumber.stripWhiteSpace ();
74 mNumber = ""; 74 mNumber = "";
75 for ( i = 0; i < Number.length(); ++i) { 75 for ( i = 0; i < Number.length(); ++i) {
76 if ( Number.at(i).isDigit() || Number.at(i) == '+'|| Number.at(i) == '*'|| Number.at(i) == '#' ) 76 if ( Number.at(i).isDigit() || Number.at(i) == '+'|| Number.at(i) == '*'|| Number.at(i) == '#' )
77 mNumber += Number.at(i); 77 mNumber += Number.at(i);
78 } 78 }
79 return ( mNumber.length() > 0 ); 79 return ( mNumber.length() > 0 );
80} 80}
81// make cellphone compatible 81// make cellphone compatible
82void PhoneNumber::simplifyType() 82void PhoneNumber::simplifyType()
83{ 83{
84 if ( mType & Fax ) mType = Fax; 84 if ( mType & Fax ) mType = Fax;
85 else if ( mType & Cell ) mType = Cell; 85 else if ( mType & Cell ) mType = Cell;
86 else if ( mType & Work ) mType = Work ; 86 else if ( mType & Work ) mType = Work ;
87 else if ( mType & Home ) mType = Home; 87 else if ( mType & Home ) mType = Home;
88 else mType = Pref; 88 else mType = Pref;
89} 89}
90bool PhoneNumber::contains( const PhoneNumber &p ) 90bool PhoneNumber::contains( const PhoneNumber &p )
91{ 91{
92 PhoneNumber myself; 92 PhoneNumber myself;
93 PhoneNumber other; 93 PhoneNumber other;
94 myself = *this; 94 myself = *this;
95 other = p; 95 other = p;
96 myself.simplifyNumber(); 96 myself.simplifyNumber();
97 other.simplifyNumber(); 97 other.simplifyNumber();
98 if ( myself.number() != other.number ()) 98 if ( myself.number() != other.number ())
99 return false; 99 return false;
100 myself.simplifyType(); 100 myself.simplifyType();
101 other.simplifyType(); 101 other.simplifyType();
102 if ( myself.type() == other.type()) 102 if ( myself.type() == other.type())
103 return true; 103 return true;
104 return false; 104 return false;
105} 105}
106 106
107void PhoneNumber::setId( const QString &id ) 107void PhoneNumber::setId( const QString &id )
108{ 108{
109 mId = id; 109 mId = id;
110} 110}
111 111
112QString PhoneNumber::id() const 112QString PhoneNumber::id() const
113{ 113{
114 return mId; 114 return mId;
115} 115}
116 116
117void PhoneNumber::setNumber( const QString &number ) 117void PhoneNumber::setNumber( const QString &number )
118{ 118{
119 mNumber = number; 119 mNumber = number;
120} 120}
121 121
122QString PhoneNumber::number() const 122QString PhoneNumber::number() const
123{ 123{
124 return mNumber; 124 return mNumber;
125} 125}
126 126
127void PhoneNumber::setType( int type ) 127void PhoneNumber::setType( int type )
128{ 128{
129 mType = type; 129 mType = type;
130} 130}
131 131
132int PhoneNumber::type() const 132int PhoneNumber::type() const
133{ 133{
134 return mType; 134 return mType;
135} 135}
136 136
137QString PhoneNumber::typeLabel() const 137QString PhoneNumber::typeLabel() const
138{ 138{
139 QString label; 139 QString label;
140 bool first = true; 140 bool first = true;
141 141
142 TypeList list = typeList(); 142 TypeList list = typeList();
143 143
144 TypeList::Iterator it; 144 TypeList::Iterator it;
145 for ( it = list.begin(); it != list.end(); ++it ) { 145 for ( it = list.begin(); it != list.end(); ++it ) {
146 if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { 146 if ( ( type() & (*it) ) && ( (*it) != Pref ) ) {
147 label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); 147 label.append( ( first ? "" : "/" ) + typeLabel( *it ) );
148 if ( first ) 148 if ( first )
149 first = false; 149 first = false;
150 } 150 }
151 } 151 }
152 152
153 return label; 153 return label;
154} 154}
155 155
156QString PhoneNumber::label() const 156QString PhoneNumber::label() const
157{ 157{
158 return typeLabel( type() ); 158 return typeLabel( type() );
159} 159}
160 160
161PhoneNumber::TypeList PhoneNumber::typeList() 161PhoneNumber::TypeList PhoneNumber::typeList()
162{ 162{
163 TypeList list; 163 TypeList list;
164 164
165 list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video 165 list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video
166 << Bbs << Modem << Car << Isdn << Pcs << Pager << Sip; 166 << Bbs << Modem << Car << Isdn << Pcs << Pager << Sip;
167 167
168 return list; 168 return list;
169} 169}
170 170
171QString PhoneNumber::label( int type ) 171QString PhoneNumber::label( int type )
172{ 172{
173 return typeLabel( type ); 173 return typeLabel( type );
174} 174}
175 175
176QString PhoneNumber::typeLabel( int type ) 176QString PhoneNumber::typeLabel( int type )
177{ 177{
178 QString typeString; 178 QString typeString;
179 179
180
181 if ((type & Cell) == Cell)
182 typeString += i18n("Mobile") +" ";
180 if ((type & Home) == Home) 183 if ((type & Home) == Home)
181 typeString += i18n("Home"); 184 typeString += i18n("Home")+" ";
182 else if ((type & Work) == Work) 185 else if ((type & Work) == Work)
183 typeString += i18n("Work"); 186 typeString += i18n("Work")+" ";
184 187
185 if (!typeString.isEmpty()) 188 if ((type & Sip) == Sip)
186 typeString += " ";
187 if ((type & Cell) == Cell)
188 typeString += i18n("Mobile") +" ";
189 if ((type & Sip) == Sip)
190 typeString += i18n("SIP")+" "; 189 typeString += i18n("SIP")+" ";
191 if ((type & Car) == Car) 190 if ((type & Car) == Car)
192 typeString += i18n("Car")+" "; 191 typeString += i18n("Car")+" ";
193 192
194 if ((type & Fax) == Fax) 193 if ((type & Fax) == Fax)
195 typeString += i18n("Fax"); 194 typeString += i18n("Fax");
196 else if ((type & Msg) == Msg) 195 else if ((type & Msg) == Msg)
197 typeString += i18n("Messenger"); 196 typeString += i18n("Messenger");
198 else if ((type & Video) == Video) 197 else if ((type & Video) == Video)
199 typeString += i18n("Video"); 198 typeString += i18n("Video");
200 else if ((type & Bbs) == Bbs) 199 else if ((type & Bbs) == Bbs)
201 typeString += i18n("Mailbox"); 200 typeString += i18n("Mailbox");
202 else if ((type & Modem) == Modem) 201 else if ((type & Modem) == Modem)
203 typeString += i18n("Modem"); 202 typeString += i18n("Modem");
204 else if ((type & Isdn) == Isdn) 203 else if ((type & Isdn) == Isdn)
205 typeString += i18n("ISDN"); 204 typeString += i18n("ISDN");
206 else if ((type & Pcs) == Pcs) 205 else if ((type & Pcs) == Pcs)
207 typeString += i18n("PCS"); 206 typeString += i18n("PCS");
208 else if ((type & Pager) == Pager) 207 else if ((type & Pager) == Pager)
209 typeString += i18n("Pager"); 208 typeString += i18n("Pager");
210 // add the prefered flag 209 // add the prefered flag
211 /* 210 /*
212 if ((type & Pref) == Pref) 211 if ((type & Pref) == Pref)
213 typeString += i18n("(p)"); 212 typeString += i18n("(p)");
214 */ 213 */
215 //if we still have no match, return "other" 214 //if we still have no match, return "other"
216 if (typeString.isEmpty()) { 215 if (typeString.isEmpty()) {
217 if ((type & Voice) == Voice) 216 if ((type & Voice) == Voice)
218 return i18n("Voice"); 217 return i18n("Voice");
219 else 218 else
220 return i18n("Other"); 219 return i18n("Other");
221 } 220 }
222 221
223 return typeString.stripWhiteSpace(); 222 return typeString.stripWhiteSpace();
224} 223}
225 224
226QDataStream &KABC::operator<<( QDataStream &s, const PhoneNumber &phone ) 225QDataStream &KABC::operator<<( QDataStream &s, const PhoneNumber &phone )
227{ 226{
228 return s << phone.mId << phone.mType << phone.mNumber; 227 return s << phone.mId << phone.mType << phone.mNumber;
229} 228}
230 229
231QDataStream &KABC::operator>>( QDataStream &s, PhoneNumber &phone ) 230QDataStream &KABC::operator>>( QDataStream &s, PhoneNumber &phone )
232{ 231{
233 s >> phone.mId >> phone.mType >> phone.mNumber; 232 s >> phone.mId >> phone.mType >> phone.mNumber;
234 233
235 return s; 234 return s;
236} 235}
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index e322473..565cd1d 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -1,474 +1,474 @@
1// $Id$ 1// $Id$
2 2
3#include <qvbox.h> 3#include <qvbox.h>
4#include <qlistbox.h> 4#include <qlistbox.h>
5#include <qwidget.h> 5#include <qwidget.h>
6#include <qfile.h> 6#include <qfile.h>
7#include <qimage.h> 7#include <qimage.h>
8#include <qcombobox.h> 8#include <qcombobox.h>
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qdragobject.h> 10#include <qdragobject.h>
11#include <qevent.h> 11#include <qevent.h>
12#include <qurl.h> 12#include <qurl.h>
13#include <qpixmap.h> 13#include <qpixmap.h>
14 14
15#include <kabc/addressbook.h> 15#include <kabc/addressbook.h>
16#include <kapplication.h> 16#include <kapplication.h>
17#include <kconfig.h> 17#include <kconfig.h>
18#include <kcolorbutton.h> 18#include <kcolorbutton.h>
19#include <kdebug.h> 19#include <kdebug.h>
20#include <kglobal.h> 20#include <kglobal.h>
21#include <kiconloader.h> 21#include <kiconloader.h>
22#include <klineedit.h> 22#include <klineedit.h>
23#include <klocale.h> 23#include <klocale.h>
24#include <kmessagebox.h> 24#include <kmessagebox.h>
25#include <kurl.h> 25#include <kurl.h>
26#include <kurlrequester.h> 26#include <kurlrequester.h>
27 27
28//US#include "configuretableviewdialog.h" 28//US#include "configuretableviewdialog.h"
29#include "contactlistview.h" 29#include "contactlistview.h"
30#include "kabprefs.h" 30#include "kabprefs.h"
31#include "undocmds.h" 31#include "undocmds.h"
32#include "viewmanager.h" 32#include "viewmanager.h"
33 33
34#include <qlayout.h> 34#include <qlayout.h>
35#include <qheader.h> 35#include <qheader.h>
36#include <qregexp.h> 36#include <qregexp.h>
37 37
38#include "kaddressbooktableview.h" 38#include "kaddressbooktableview.h"
39 39
40 40
41KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, 41KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
42 QWidget *parent, const char *name ) 42 QWidget *parent, const char *name )
43 : KAddressBookView( ab, parent, name ) 43 : KAddressBookView( ab, parent, name )
44{ 44{
45 mainLayout = new QVBoxLayout( viewWidget(), 2 ); 45 mainLayout = new QVBoxLayout( viewWidget(), 2 );
46 46
47 // The list view will be created when the config is read. 47 // The list view will be created when the config is read.
48 mListView = 0; 48 mListView = 0;
49} 49}
50 50
51KAddressBookTableView::~KAddressBookTableView() 51KAddressBookTableView::~KAddressBookTableView()
52{ 52{
53} 53}
54void KAddressBookTableView::setFocusAV() 54void KAddressBookTableView::setFocusAV()
55{ 55{
56 if ( mListView ) 56 if ( mListView )
57 mListView->setFocus(); 57 mListView->setFocus();
58 58
59} 59}
60void KAddressBookTableView::scrollUP() 60void KAddressBookTableView::scrollUP()
61{ 61{
62 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); 62 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 );
63 QApplication::postEvent( mListView, ev ); 63 QApplication::postEvent( mListView, ev );
64 ev = new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Up, 0,0 ); 64 ev = new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Up, 0,0 );
65 QApplication::postEvent( mListView, ev ); 65 QApplication::postEvent( mListView, ev );
66} 66}
67void KAddressBookTableView::scrollDOWN() 67void KAddressBookTableView::scrollDOWN()
68{ 68{
69 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); 69 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 );
70 QApplication::postEvent( mListView, ev ); 70 QApplication::postEvent( mListView, ev );
71 ev = new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Down, 0,0 ); 71 ev = new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Down, 0,0 );
72 QApplication::postEvent( mListView, ev ); 72 QApplication::postEvent( mListView, ev );
73} 73}
74void KAddressBookTableView::reconstructListView() 74void KAddressBookTableView::reconstructListView()
75{ 75{
76 if (mListView) 76 if (mListView)
77 { 77 {
78 disconnect(mListView, SIGNAL(selectionChanged()), 78 disconnect(mListView, SIGNAL(selectionChanged()),
79 this, SLOT(addresseeSelected())); 79 this, SLOT(addresseeSelected()));
80 disconnect(mListView, SIGNAL(executed(QListViewItem*)), 80 disconnect(mListView, SIGNAL(executed(QListViewItem*)),
81 this, SLOT(addresseeExecuted(QListViewItem*))); 81 this, SLOT(addresseeExecuted(QListViewItem*)));
82 disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), 82 disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
83 this, SLOT(addresseeExecuted(QListViewItem*))); 83 this, SLOT(addresseeExecuted(QListViewItem*)));
84 disconnect(mListView, SIGNAL(startAddresseeDrag()), this, 84 disconnect(mListView, SIGNAL(startAddresseeDrag()), this,
85 SIGNAL(startDrag())); 85 SIGNAL(startDrag()));
86 disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), 86 disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)),
87 this, SLOT(addresseeExecuted(QListViewItem*))); 87 this, SLOT(addresseeExecuted(QListViewItem*)));
88 88
89 disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, 89 disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
90 SIGNAL(dropped(QDropEvent*))); 90 SIGNAL(dropped(QDropEvent*)));
91 delete mListView; 91 delete mListView;
92 } 92 }
93 93
94 mListView = new ContactListView( this, addressBook(), viewWidget() ); 94 mListView = new ContactListView( this, addressBook(), viewWidget() );
95 95
96 connect(this, SIGNAL(printView()), 96 connect(this, SIGNAL(printView()),
97 mListView , SLOT(printMe())); 97 mListView , SLOT(printMe()));
98 //US set singleClick manually, because it is no global configparameter in embedded space 98 //US set singleClick manually, because it is no global configparameter in embedded space
99 mListView->setSingleClick(KABPrefs::instance()->mHonorSingleClick); 99 mListView->setSingleClick(KABPrefs::instance()->mHonorSingleClick);
100 100
101 // Add the columns 101 // Add the columns
102 KABC::Field::List fieldList = fields(); 102 KABC::Field::List fieldList = fields();
103 KABC::Field::List::ConstIterator it; 103 KABC::Field::List::ConstIterator it;
104 104
105 int c = 0; 105 int c = 0;
106 for( it = fieldList.begin(); it != fieldList.end(); ++it ) { 106 for( it = fieldList.begin(); it != fieldList.end(); ++it ) {
107 mListView->addColumn( (*it)->label() ); 107 mListView->addColumn( (*it)->label() );
108 mListView->setColumnWidthMode(c++, QListView::Manual); 108 mListView->setColumnWidthMode(c++, QListView::Manual);
109//US 109//US
110 // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1()); 110 // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
111 } 111 }
112 112
113 connect(mListView, SIGNAL(selectionChanged()), 113 connect(mListView, SIGNAL(selectionChanged()),
114 this, SLOT(addresseeSelected())); 114 this, SLOT(addresseeSelected()));
115 connect(mListView, SIGNAL(startAddresseeDrag()), this, 115 connect(mListView, SIGNAL(startAddresseeDrag()), this,
116 SIGNAL(startDrag())); 116 SIGNAL(startDrag()));
117 connect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, 117 connect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
118 SIGNAL(dropped(QDropEvent*))); 118 SIGNAL(dropped(QDropEvent*)));
119 119
120 if (KABPrefs::instance()->mHonorSingleClick) { 120 if (KABPrefs::instance()->mHonorSingleClick) {
121 // qDebug("KAddressBookTableView::reconstructListView single"); 121 // qDebug("KAddressBookTableView::reconstructListView single");
122 connect(mListView, SIGNAL(executed(QListViewItem*)), 122 connect(mListView, SIGNAL(executed(QListViewItem*)),
123 this, SLOT(addresseeExecuted(QListViewItem*))); 123 this, SLOT(addresseeExecuted(QListViewItem*)));
124 } else { 124 } else {
125 // qDebug("KAddressBookTableView::reconstructListView double"); 125 // qDebug("KAddressBookTableView::reconstructListView double");
126 connect(mListView, SIGNAL(doubleClicked(QListViewItem*)), 126 connect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
127 this, SLOT(addresseeExecuted(QListViewItem*))); 127 this, SLOT(addresseeExecuted(QListViewItem*)));
128 } 128 }
129 connect(mListView, SIGNAL(returnPressed(QListViewItem*)), 129 connect(mListView, SIGNAL(returnPressed(QListViewItem*)),
130 this, SLOT(addresseeExecuted(QListViewItem*))); 130 this, SLOT(addresseeExecuted(QListViewItem*)));
131 connect(mListView, SIGNAL(signalDelete()), 131 connect(mListView, SIGNAL(signalDelete()),
132 this, SLOT(addresseeDeleted())); 132 this, SLOT(addresseeDeleted()));
133 133
134//US performceimprovement. Refresh is done from the outside 134//US performceimprovement. Refresh is done from the outside
135//US refresh(); 135//US refresh();
136 136
137 mListView->setSorting( 0, true ); 137 mListView->setSorting( 0, true );
138 mainLayout->addWidget( mListView ); 138 mainLayout->addWidget( mListView );
139 mainLayout->activate(); 139 mainLayout->activate();
140 mListView->show(); 140 mListView->show();
141} 141}
142 142
143void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field ) 143void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field )
144{ 144{
145 mListView->clear(); 145 mListView->clear();
146 if ( s.isEmpty() || s == "*" ) { 146 if ( s.isEmpty() || s == "*" ) {
147 refresh(); 147 refresh();
148 return; 148 return;
149 } 149 }
150 QRegExp re = getRegExp( s ); 150 QRegExp re = getRegExp( s );
151 if (!re.isValid()) 151 if (!re.isValid())
152 return; 152 return;
153 KABC::Addressee::List addresseeList = addressees(); 153 KABC::Addressee::List addresseeList = addressees();
154 KABC::Addressee::List::Iterator it; 154 KABC::Addressee::List::Iterator it;
155 if ( field ) { 155 if ( field ) {
156 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 156 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
157 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 157 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
158 continue; 158 continue;
159#if QT_VERSION >= 0x030000 159#if QT_VERSION >= 0x030000
160 if (re.search(field->value( *it ).lower()) == 0) 160 if (re.search(field->value( *it ).lower()) == 0)
161#else 161#else
162 if (re.match(field->value( *it ).lower()) != -1) 162 if (re.match(field->value( *it ).lower()) != -1)
163#endif 163#endif
164 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); 164 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields());
165 165
166 } 166 }
167 } else { 167 } else {
168 KABC::Field::List fieldList = allFields(); 168 KABC::Field::List fieldList = allFields();
169 KABC::Field::List::ConstIterator fieldIt; 169 KABC::Field::List::ConstIterator fieldIt;
170 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 170 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
171 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 171 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
172 continue; 172 continue;
173 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { 173 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
174#if QT_VERSION >= 0x030000 174#if QT_VERSION >= 0x030000
175 if (re.search((*fieldIt)->value( *it ).lower()) != -1) 175 if (re.search((*fieldIt)->value( *it ).lower()) != -1)
176#else 176#else
177 if (re.match((*fieldIt)->value( *it ).lower()) != -1) 177 if (re.match((*fieldIt)->value( *it ).lower()) != -1)
178#endif 178#endif
179 { 179 {
180 //qDebug("match %s %s %s", pattern.latin1(), (*fieldIt)->value( *it ).latin1(), (*fieldIt)->label().latin1() ); 180 //qDebug("match %s %s %s", pattern.latin1(), (*fieldIt)->value( *it ).latin1(), (*fieldIt)->label().latin1() );
181 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); 181 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields());
182 break; 182 break;
183 } 183 }
184 } 184 }
185 } 185 }
186 } 186 }
187 // Sometimes the background pixmap gets messed up when we add lots 187 // Sometimes the background pixmap gets messed up when we add lots
188 // of items. 188 // of items.
189 mListView->repaint(); 189 //mListView->repaint();
190 if ( mListView->firstChild() ) { 190 if ( mListView->firstChild() ) {
191 mListView->setCurrentItem ( mListView->firstChild() ); 191 mListView->setCurrentItem ( mListView->firstChild() );
192 mListView->setSelected ( mListView->firstChild(), true ); 192 mListView->setSelected ( mListView->firstChild(), true );
193 } 193 }
194 else 194 else
195 emit selected(QString::null); 195 emit selected(QString::null);
196 196
197} 197}
198void KAddressBookTableView::writeConfig(KConfig *config) 198void KAddressBookTableView::writeConfig(KConfig *config)
199{ 199{
200 KAddressBookView::writeConfig(config); 200 KAddressBookView::writeConfig(config);
201 201
202 mListView->saveLayout(config, config->group()); 202 mListView->saveLayout(config, config->group());
203} 203}
204 204
205void KAddressBookTableView::readConfig(KConfig *config) 205void KAddressBookTableView::readConfig(KConfig *config)
206{ 206{
207 KAddressBookView::readConfig( config ); 207 KAddressBookView::readConfig( config );
208 // The config could have changed the fields, so we need to reconstruct 208 // The config could have changed the fields, so we need to reconstruct
209 // the listview. 209 // the listview.
210 reconstructListView(); 210 reconstructListView();
211 211
212 // costum colors? 212 // costum colors?
213 if ( config->readBoolEntry( "EnableCustomColors", false ) ) 213 if ( config->readBoolEntry( "EnableCustomColors", false ) )
214 { 214 {
215 QPalette p( mListView->palette() ); 215 QPalette p( mListView->palette() );
216 QColor c = p.color(QPalette::Normal, QColorGroup::Base ); 216 QColor c = p.color(QPalette::Normal, QColorGroup::Base );
217 p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) ); 217 p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
218 c = p.color(QPalette::Normal, QColorGroup::Text ); 218 c = p.color(QPalette::Normal, QColorGroup::Text );
219 p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) ); 219 p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
220 c = p.color(QPalette::Normal, QColorGroup::Button ); 220 c = p.color(QPalette::Normal, QColorGroup::Button );
221 p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) ); 221 p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
222 c = p.color(QPalette::Normal, QColorGroup::ButtonText ); 222 c = p.color(QPalette::Normal, QColorGroup::ButtonText );
223 p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) ); 223 p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
224 c = p.color(QPalette::Normal, QColorGroup::Highlight ); 224 c = p.color(QPalette::Normal, QColorGroup::Highlight );
225 p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) ); 225 p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
226 c = p.color(QPalette::Normal, QColorGroup::HighlightedText ); 226 c = p.color(QPalette::Normal, QColorGroup::HighlightedText );
227 p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) ); 227 p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
228#ifndef KAB_EMBEDDED 228#ifndef KAB_EMBEDDED
229 c = KGlobalSettings::alternateBackgroundColor(); 229 c = KGlobalSettings::alternateBackgroundColor();
230#else //KAB_EMBEDDED 230#else //KAB_EMBEDDED
231 c = QColor(240, 240, 240); 231 c = QColor(240, 240, 240);
232#endif //KAB_EMBEDDED 232#endif //KAB_EMBEDDED
233 c = config->readColorEntry ("AlternatingBackgroundColor", &c); 233 c = config->readColorEntry ("AlternatingBackgroundColor", &c);
234 mListView->setAlternateColor(c); 234 mListView->setAlternateColor(c);
235 235
236 236
237 //US mListView->viewport()->setPalette( p ); 237 //US mListView->viewport()->setPalette( p );
238 mListView->setPalette( p ); 238 mListView->setPalette( p );
239 } 239 }
240 else 240 else
241 { 241 {
242 // needed if turned off during a session. 242 // needed if turned off during a session.
243 //US mListView->viewport()->setPalette( mListView->palette() ); 243 //US mListView->viewport()->setPalette( mListView->palette() );
244 mListView->setPalette( mListView->palette() ); 244 mListView->setPalette( mListView->palette() );
245 } 245 }
246 246
247 //custom fonts? 247 //custom fonts?
248 QFont f( font() ); 248 QFont f( font() );
249 if ( config->readBoolEntry( "EnableCustomFonts", false ) ) 249 if ( config->readBoolEntry( "EnableCustomFonts", false ) )
250 { 250 {
251 mListView->setFont( config->readFontEntry( "TextFont", &f) ); 251 mListView->setFont( config->readFontEntry( "TextFont", &f) );
252 f.setBold( true ); 252 f.setBold( true );
253 //US mListView->setHeaderFont( config->readFontEntry( "HeaderFont", &f ) ); 253 //US mListView->setHeaderFont( config->readFontEntry( "HeaderFont", &f ) );
254 mListView->header()->setFont( config->readFontEntry( "HeaderFont", &f ) ); 254 mListView->header()->setFont( config->readFontEntry( "HeaderFont", &f ) );
255 } 255 }
256 else 256 else
257 { 257 {
258 mListView->setFont( f ); 258 mListView->setFont( f );
259 f.setBold( true ); 259 f.setBold( true );
260 //US mListView->setHeaderFont( f ); 260 //US mListView->setHeaderFont( f );
261 mListView->header()->setFont( f ); 261 mListView->header()->setFont( f );
262 } 262 }
263 263
264 // Set the list view options 264 // Set the list view options
265 mListView->setAlternateBackgroundEnabled(config->readBoolEntry("ABackground", 265 mListView->setAlternateBackgroundEnabled(config->readBoolEntry("ABackground",
266 true)); 266 true));
267 mListView->setSingleLineEnabled(config->readBoolEntry("SingleLine", false)); 267 mListView->setSingleLineEnabled(config->readBoolEntry("SingleLine", false));
268 mListView->setToolTipsEnabled(config->readBoolEntry("ToolTips", true)); 268 mListView->setToolTipsEnabled(config->readBoolEntry("ToolTips", true));
269 269
270 if (config->readBoolEntry("Background", false)) 270 if (config->readBoolEntry("Background", false))
271 mListView->setBackgroundPixmap(config->readEntry("BackgroundName")); 271 mListView->setBackgroundPixmap(config->readEntry("BackgroundName"));
272 272
273 // Restore the layout of the listview 273 // Restore the layout of the listview
274 mListView->restoreLayout(config, config->group()); 274 mListView->restoreLayout(config, config->group());
275} 275}
276 276
277void KAddressBookTableView::refresh(QString uid) 277void KAddressBookTableView::refresh(QString uid)
278{ 278{
279 // For now just repopulate. In reality this method should 279 // For now just repopulate. In reality this method should
280 // check the value of uid, and if valid iterate through 280 // check the value of uid, and if valid iterate through
281 // the listview to find the entry, then tell it to refresh. 281 // the listview to find the entry, then tell it to refresh.
282 282
283 if (uid.isNull()) { 283 if (uid.isNull()) {
284 // Clear the list view 284 // Clear the list view
285 QString currentUID, nextUID; 285 QString currentUID, nextUID;
286#ifndef KAB_EMBEDDED 286#ifndef KAB_EMBEDDED
287 ContactListViewItem *currentItem = dynamic_cast<ContactListViewItem*>( mListView->currentItem() ); 287 ContactListViewItem *currentItem = dynamic_cast<ContactListViewItem*>( mListView->currentItem() );
288#else //KAB_EMBEDDED 288#else //KAB_EMBEDDED
289 ContactListViewItem *currentItem = (ContactListViewItem*)( mListView->currentItem() ); 289 ContactListViewItem *currentItem = (ContactListViewItem*)( mListView->currentItem() );
290#endif //KAB_EMBEDDED 290#endif //KAB_EMBEDDED
291 291
292 if ( currentItem ) { 292 if ( currentItem ) {
293#ifndef KAB_EMBEDDED 293#ifndef KAB_EMBEDDED
294 ContactListViewItem *nextItem = dynamic_cast<ContactListViewItem*>( currentItem->itemBelow() ); 294 ContactListViewItem *nextItem = dynamic_cast<ContactListViewItem*>( currentItem->itemBelow() );
295#else //KAB_EMBEDDED 295#else //KAB_EMBEDDED
296 ContactListViewItem *nextItem = (ContactListViewItem*)( currentItem->itemBelow() ); 296 ContactListViewItem *nextItem = (ContactListViewItem*)( currentItem->itemBelow() );
297#endif //KAB_EMBEDDED 297#endif //KAB_EMBEDDED
298 if ( nextItem ) 298 if ( nextItem )
299 nextUID = nextItem->addressee().uid(); 299 nextUID = nextItem->addressee().uid();
300 currentUID = currentItem->addressee().uid(); 300 currentUID = currentItem->addressee().uid();
301 } 301 }
302 302
303 mListView->clear(); 303 mListView->clear();
304 304
305 currentItem = 0; 305 currentItem = 0;
306 KABC::Addressee::List addresseeList = addressees(); 306 KABC::Addressee::List addresseeList = addressees();
307 KABC::Addressee::List::Iterator it; 307 KABC::Addressee::List::Iterator it;
308 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 308 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
309 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 309 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
310 continue; 310 continue;
311 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); 311 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields());
312 if ( (*it).uid() == currentUID ) 312 if ( (*it).uid() == currentUID )
313 currentItem = item; 313 currentItem = item;
314 else if ( (*it).uid() == nextUID && !currentItem ) 314 else if ( (*it).uid() == nextUID && !currentItem )
315 currentItem = item; 315 currentItem = item;
316 } 316 }
317 317
318 // Sometimes the background pixmap gets messed up when we add lots 318 // Sometimes the background pixmap gets messed up when we add lots
319 // of items. 319 // of items.
320 mListView->repaint(); 320 mListView->repaint();
321 321
322 if ( currentItem ) { 322 if ( currentItem ) {
323 mListView->setCurrentItem( currentItem ); 323 mListView->setCurrentItem( currentItem );
324 mListView->ensureItemVisible( currentItem ); 324 mListView->ensureItemVisible( currentItem );
325 } 325 }
326 } else { 326 } else {
327 // Only need to update on entry. Iterate through and try to find it 327 // Only need to update on entry. Iterate through and try to find it
328 ContactListViewItem *ceItem; 328 ContactListViewItem *ceItem;
329 QListViewItemIterator it( mListView ); 329 QListViewItemIterator it( mListView );
330 while ( it.current() ) { 330 while ( it.current() ) {
331#ifndef KAB_EMBEDDED 331#ifndef KAB_EMBEDDED
332 ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); 332 ceItem = dynamic_cast<ContactListViewItem*>( it.current() );
333#else //KAB_EMBEDDED 333#else //KAB_EMBEDDED
334 ceItem = (ContactListViewItem*)( it.current() ); 334 ceItem = (ContactListViewItem*)( it.current() );
335#endif //KAB_EMBEDDED 335#endif //KAB_EMBEDDED
336 336
337 if ( ceItem && ceItem->addressee().uid() == uid ) { 337 if ( ceItem && ceItem->addressee().uid() == uid ) {
338 ceItem->refresh(); 338 ceItem->refresh();
339 return; 339 return;
340 } 340 }
341 ++it; 341 ++it;
342 } 342 }
343 343
344 refresh( QString::null ); 344 refresh( QString::null );
345 } 345 }
346} 346}
347 347
348QStringList KAddressBookTableView::selectedUids() 348QStringList KAddressBookTableView::selectedUids()
349{ 349{
350 QStringList uidList; 350 QStringList uidList;
351 QListViewItem *item; 351 QListViewItem *item;
352 ContactListViewItem *ceItem; 352 ContactListViewItem *ceItem;
353 353
354 for(item = mListView->firstChild(); item; item = item->itemBelow()) 354 for(item = mListView->firstChild(); item; item = item->itemBelow())
355 { 355 {
356 if (mListView->isSelected( item )) 356 if (mListView->isSelected( item ))
357 { 357 {
358#ifndef KAB_EMBEDDED 358#ifndef KAB_EMBEDDED
359 ceItem = dynamic_cast<ContactListViewItem*>(item); 359 ceItem = dynamic_cast<ContactListViewItem*>(item);
360#else //KAB_EMBEDDED 360#else //KAB_EMBEDDED
361 ceItem = (ContactListViewItem*)(item); 361 ceItem = (ContactListViewItem*)(item);
362#endif //KAB_EMBEDDED 362#endif //KAB_EMBEDDED
363 363
364 if (ceItem != 0L) 364 if (ceItem != 0L)
365 uidList << ceItem->addressee().uid(); 365 uidList << ceItem->addressee().uid();
366 } 366 }
367 } 367 }
368 if ( uidList.count() == 0 ) 368 if ( uidList.count() == 0 )
369 if ( mListView->currentItem() ) { 369 if ( mListView->currentItem() ) {
370 ceItem = (ContactListViewItem*)(mListView->currentItem()) ; 370 ceItem = (ContactListViewItem*)(mListView->currentItem()) ;
371 uidList << ceItem->addressee().uid(); 371 uidList << ceItem->addressee().uid();
372 } 372 }
373 373
374 return uidList; 374 return uidList;
375} 375}
376 376
377void KAddressBookTableView::setSelected(QString uid, bool selected) 377void KAddressBookTableView::setSelected(QString uid, bool selected)
378{ 378{
379 QListViewItem *item; 379 QListViewItem *item;
380 ContactListViewItem *ceItem; 380 ContactListViewItem *ceItem;
381 381
382 if (uid.isNull()) 382 if (uid.isNull())
383 { 383 {
384 mListView->selectAll(selected); 384 mListView->selectAll(selected);
385 } 385 }
386 else 386 else
387 { 387 {
388 for(item = mListView->firstChild(); item; item = item->itemBelow()) 388 for(item = mListView->firstChild(); item; item = item->itemBelow())
389 { 389 {
390#ifndef KAB_EMBEDDED 390#ifndef KAB_EMBEDDED
391 ceItem = dynamic_cast<ContactListViewItem*>(item); 391 ceItem = dynamic_cast<ContactListViewItem*>(item);
392#else //KAB_EMBEDDED 392#else //KAB_EMBEDDED
393 ceItem = (ContactListViewItem*)(item); 393 ceItem = (ContactListViewItem*)(item);
394#endif //KAB_EMBEDDED 394#endif //KAB_EMBEDDED
395 395
396 396
397 if ((ceItem != 0L) && (ceItem->addressee().uid() == uid)) 397 if ((ceItem != 0L) && (ceItem->addressee().uid() == uid))
398 { 398 {
399 mListView->setSelected(item, selected); 399 mListView->setSelected(item, selected);
400 400
401 if (selected) 401 if (selected)
402 mListView->ensureItemVisible(item); 402 mListView->ensureItemVisible(item);
403 } 403 }
404 } 404 }
405 } 405 }
406} 406}
407 407
408void KAddressBookTableView::addresseeSelected() 408void KAddressBookTableView::addresseeSelected()
409{ 409{
410 // We need to try to find the first selected item. This might not be the 410 // We need to try to find the first selected item. This might not be the
411 // last selected item, but when QListView is in multiselection mode, 411 // last selected item, but when QListView is in multiselection mode,
412 // there is no way to figure out which one was 412 // there is no way to figure out which one was
413 // selected last. 413 // selected last.
414 QListViewItem *item; 414 QListViewItem *item;
415 bool found =false; 415 bool found =false;
416 for (item = mListView->firstChild(); item && !found; 416 for (item = mListView->firstChild(); item && !found;
417 item = item->nextSibling()) 417 item = item->nextSibling())
418 { 418 {
419 if (item->isSelected()) 419 if (item->isSelected())
420 { 420 {
421 found = true; 421 found = true;
422#ifndef KAB_EMBEDDED 422#ifndef KAB_EMBEDDED
423 ContactListViewItem *ceItem 423 ContactListViewItem *ceItem
424 = dynamic_cast<ContactListViewItem*>(item); 424 = dynamic_cast<ContactListViewItem*>(item);
425#else //KAB_EMBEDDED 425#else //KAB_EMBEDDED
426 ContactListViewItem *ceItem 426 ContactListViewItem *ceItem
427 = (ContactListViewItem*)(item); 427 = (ContactListViewItem*)(item);
428#endif //KAB_EMBEDDED 428#endif //KAB_EMBEDDED
429 429
430 if ( ceItem ) emit selected(ceItem->addressee().uid()); 430 if ( ceItem ) emit selected(ceItem->addressee().uid());
431 } 431 }
432 } 432 }
433 433
434 if (!found) 434 if (!found)
435 emit selected(QString::null); 435 emit selected(QString::null);
436} 436}
437 437
438void KAddressBookTableView::addresseeExecuted(QListViewItem *item) 438void KAddressBookTableView::addresseeExecuted(QListViewItem *item)
439{ 439{
440 if (item) 440 if (item)
441 { 441 {
442#ifndef KAB_EMBEDDED 442#ifndef KAB_EMBEDDED
443 ContactListViewItem *ceItem 443 ContactListViewItem *ceItem
444 = dynamic_cast<ContactListViewItem*>(item); 444 = dynamic_cast<ContactListViewItem*>(item);
445#else //KAB_EMBEDDED 445#else //KAB_EMBEDDED
446 ContactListViewItem *ceItem 446 ContactListViewItem *ceItem
447 = (ContactListViewItem*)(item); 447 = (ContactListViewItem*)(item);
448#endif //KAB_EMBEDDED 448#endif //KAB_EMBEDDED
449 449
450 if (ceItem) 450 if (ceItem)
451 { 451 {
452 emit executed(ceItem->addressee().uid()); 452 emit executed(ceItem->addressee().uid());
453 } 453 }
454 } 454 }
455 else 455 else
456 { 456 {
457 emit executed(QString::null); 457 emit executed(QString::null);
458 } 458 }
459} 459}
460 460
461void KAddressBookTableView::addresseeDeleted() 461void KAddressBookTableView::addresseeDeleted()
462{ 462{
463 463
464 emit deleteRequest(); 464 emit deleteRequest();
465 465
466} 466}
467 467
468 468
469 469
470 470
471 471
472#ifndef KAB_EMBEDDED 472#ifndef KAB_EMBEDDED
473#include "kaddressbooktableview.moc" 473#include "kaddressbooktableview.moc"
474#endif //KAB_EMBEDDED 474#endif //KAB_EMBEDDED