-rw-r--r-- | kabc/converter/sharpdtm/sharpdtmconverter.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/kabc/converter/sharpdtm/sharpdtmconverter.cpp b/kabc/converter/sharpdtm/sharpdtmconverter.cpp index b3e2ee1..4cf2eb3 100644 --- a/kabc/converter/sharpdtm/sharpdtmconverter.cpp +++ b/kabc/converter/sharpdtm/sharpdtmconverter.cpp | |||
@@ -51,6 +51,6 @@ bool SharpDTMConverter::init() | |||
51 | catDB = new SlCategory::SlCategories(); | 51 | catDB = new SlCategory::SlCategories(); |
52 | 52 | ||
53 | if (!catDB) | 53 | if (!catDB) |
54 | return false; | 54 | return false; |
55 | 55 | ||
56 | // catDB->load( categoryFileName() ); | 56 | // catDB->load( categoryFileName() ); |
@@ -61,3 +61,3 @@ void SharpDTMConverter::deinit() | |||
61 | { | 61 | { |
62 | if (catDB) | 62 | if (catDB) |
63 | { | 63 | { |
@@ -67,4 +67,4 @@ void SharpDTMConverter::deinit() | |||
67 | } | 67 | } |
68 | 68 | ||
69 | bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &addr ) | 69 | bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBase* database, Addressee &addr ) |
70 | { | 70 | { |
@@ -78,4 +78,4 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
78 | addr.setSuffix( contact.suffix() ); | 78 | addr.setSuffix( contact.suffix() ); |
79 | 79 | ||
80 | 80 | ||
81 | 81 | ||
@@ -86,5 +86,5 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
86 | 86 | ||
87 | if (!contact.defaultEmail().isEmpty()) | 87 | if (!contact.defaultEmail().isEmpty()) |
88 | addr.insertEmail(contact.defaultEmail(), true); | 88 | addr.insertEmail(contact.defaultEmail(), true); |
89 | 89 | ||
90 | // home | 90 | // home |
@@ -105,6 +105,6 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
105 | homeaddress.setCountry( contact.homeCountry() ); | 105 | homeaddress.setCountry( contact.homeCountry() ); |
106 | 106 | ||
107 | addr.insertAddress( homeaddress ); | 107 | addr.insertAddress( homeaddress ); |
108 | } | 108 | } |
109 | 109 | ||
110 | if (!contact.homePhone().isEmpty()) | 110 | if (!contact.homePhone().isEmpty()) |
@@ -116,3 +116,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
116 | } | 116 | } |
117 | 117 | ||
118 | if (!contact.homeFax().isEmpty()) | 118 | if (!contact.homeFax().isEmpty()) |
@@ -124,3 +124,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
124 | } | 124 | } |
125 | 125 | ||
126 | if (!contact.homeMobile().isEmpty()) | 126 | if (!contact.homeMobile().isEmpty()) |
@@ -132,5 +132,5 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
132 | } | 132 | } |
133 | 133 | ||
134 | addr.setUrl( contact.homeWebpage() ); | 134 | addr.setUrl( contact.homeWebpage() ); |
135 | 135 | ||
136 | 136 | ||
@@ -152,7 +152,7 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
152 | businessaddress.setCountry( contact.businessCountry() ); | 152 | businessaddress.setCountry( contact.businessCountry() ); |
153 | 153 | ||
154 | addr.insertAddress( businessaddress ); | 154 | addr.insertAddress( businessaddress ); |
155 | } | 155 | } |
156 | 156 | ||
157 | 157 | ||
158 | if (!contact.businessPhone().isEmpty()) | 158 | if (!contact.businessPhone().isEmpty()) |
@@ -164,3 +164,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
164 | } | 164 | } |
165 | 165 | ||
166 | if (!contact.businessFax().isEmpty()) | 166 | if (!contact.businessFax().isEmpty()) |
@@ -172,3 +172,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
172 | } | 172 | } |
173 | 173 | ||
174 | if (!contact.businessMobile().isEmpty()) | 174 | if (!contact.businessMobile().isEmpty()) |
@@ -188,3 +188,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
188 | } | 188 | } |
189 | 189 | ||
190 | addr.setRole( contact.jobTitle() ); //? | 190 | addr.setRole( contact.jobTitle() ); //? |
@@ -205,6 +205,6 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
205 | addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female"); | 205 | addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female"); |
206 | 206 | ||
207 | if (contact.anniversary().isValid()) { | 207 | if (contact.anniversary().isValid()) { |
208 | QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate); | 208 | QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate); |
209 | //US | 209 | //US |
210 | // qDebug("QtopiaConverter::qtopiaToAddressee found:%s", dt.latin1()); | 210 | // qDebug("QtopiaConverter::qtopiaToAddressee found:%s", dt.latin1()); |
@@ -212,3 +212,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
212 | } | 212 | } |
213 | 213 | ||
214 | addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() ); | 214 | addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() ); |
@@ -216,3 +216,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
216 | addr.setBirthday( contact.birthday() ); | 216 | addr.setBirthday( contact.birthday() ); |
217 | 217 | ||
218 | addr.setNickName( contact.nickname() ); | 218 | addr.setNickName( contact.nickname() ); |
@@ -223,10 +223,10 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
223 | notes += "\nBusinessWebPage: " + contact.businessWebpage() + "\n"; | 223 | notes += "\nBusinessWebPage: " + contact.businessWebpage() + "\n"; |
224 | 224 | ||
225 | addr.setNote( contact.notes() ); | 225 | addr.setNote( contact.notes() ); |
226 | 226 | ||
227 | 227 | ||
228 | 228 | ||
229 | //US QString groups() const { return find( Qtopia::Groups ); } | 229 | //US QString groups() const { return find( Qtopia::Groups ); } |
230 | //US QStringList groupList() const; | 230 | //US QStringList groupList() const; |
231 | 231 | ||
232 | QArray<int> catArray = contact.categories(); | 232 | QArray<int> catArray = contact.categories(); |
@@ -239,3 +239,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
239 | } | 239 | } |
240 | */ | 240 | */ |
241 | return true; | 241 | return true; |
@@ -243,3 +243,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee & | |||
243 | 243 | ||
244 | bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &contact ) | 244 | bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, const SlZDataBase* database , const CardId &contact ) |
245 | { | 245 | { |
@@ -253,4 +253,4 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
253 | contact.setFileAs(); | 253 | contact.setFileAs(); |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
@@ -261,3 +261,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
261 | contact.setDefaultEmail( addr.preferredEmail() ); | 261 | contact.setDefaultEmail( addr.preferredEmail() ); |
262 | 262 | ||
263 | 263 | ||
@@ -276,3 +276,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
276 | contact.setHomePhone(homephone.number()); | 276 | contact.setHomePhone(homephone.number()); |
277 | 277 | ||
278 | PhoneNumber homefax = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); | 278 | PhoneNumber homefax = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); |
@@ -280,3 +280,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
280 | contact.setHomeFax(homefax.number()); | 280 | contact.setHomeFax(homefax.number()); |
281 | 281 | ||
282 | PhoneNumber homemobile = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Cell ); | 282 | PhoneNumber homemobile = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Cell ); |
@@ -284,5 +284,5 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
284 | contact.setHomeMobile(homemobile.number()); | 284 | contact.setHomeMobile(homemobile.number()); |
285 | 285 | ||
286 | contact.setHomeWebpage(addr.url().url()); | 286 | contact.setHomeWebpage(addr.url().url()); |
287 | 287 | ||
288 | 288 | ||
@@ -301,3 +301,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
301 | contact.setBusinessPhone(businessphone.number()); | 301 | contact.setBusinessPhone(businessphone.number()); |
302 | 302 | ||
303 | PhoneNumber businessfax = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); | 303 | PhoneNumber businessfax = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); |
@@ -305,3 +305,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
305 | contact.setBusinessFax(businessfax.number()); | 305 | contact.setBusinessFax(businessfax.number()); |
306 | 306 | ||
307 | PhoneNumber businessmobile = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Cell ); | 307 | PhoneNumber businessmobile = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Cell ); |
@@ -309,3 +309,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
309 | contact.setBusinessMobile(businessmobile.number()); | 309 | contact.setBusinessMobile(businessmobile.number()); |
310 | 310 | ||
311 | PhoneNumber businesspager = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Pager ); | 311 | PhoneNumber businesspager = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Pager ); |
@@ -335,9 +335,9 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
335 | 335 | ||
336 | 336 | ||
337 | QDate dt = KGlobal::locale()->readDate( | 337 | QDate dt = KGlobal::locale()->readDate( |
338 | addr.custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); // = Qt::ISODate | 338 | addr.custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); // = Qt::ISODate |
339 | contact.setAnniversary( dt ); | 339 | contact.setAnniversary( dt ); |
340 | 340 | ||
341 | contact.setChildren(addr.custom( "KADDRESSBOOK", "X-Children" )); | 341 | contact.setChildren(addr.custom( "KADDRESSBOOK", "X-Children" )); |
342 | 342 | ||
343 | contact.setBirthday(addr.birthday().date()); | 343 | contact.setBirthday(addr.birthday().date()); |
@@ -347,3 +347,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
347 | contact.setNotes(addr.note()); | 347 | contact.setNotes(addr.note()); |
348 | 348 | ||
349 | //US QString groups() const { return find( Qtopia::Groups ); } | 349 | //US QString groups() const { return find( Qtopia::Groups ); } |
@@ -353,3 +353,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
353 | QStringList cats = addr.categories(); | 353 | QStringList cats = addr.categories(); |
354 | 354 | ||
355 | QArray<int> iar; | 355 | QArray<int> iar; |
@@ -359,3 +359,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con | |||
359 | } | 359 | } |
360 | */ | 360 | */ |
361 | return true; | 361 | return true; |