summaryrefslogtreecommitdiffabout
path: root/kabc/converter/sharpdtm/sharpdtmconverter.cpp
Side-by-side diff
Diffstat (limited to 'kabc/converter/sharpdtm/sharpdtmconverter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/converter/sharpdtm/sharpdtmconverter.cpp98
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()
catDB = new SlCategory::SlCategories();
-
- if (!catDB)
+
+ if (!catDB)
return false;
-
+
// catDB->load( categoryFileName() );
@@ -61,3 +61,3 @@ void SharpDTMConverter::deinit()
{
- if (catDB)
+ if (catDB)
{
@@ -67,4 +67,4 @@ void SharpDTMConverter::deinit()
}
-
-bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &addr )
+
+bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBase* database, Addressee &addr )
{
@@ -78,4 +78,4 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
addr.setSuffix( contact.suffix() );
-
-
+
+
// email
@@ -86,5 +86,5 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
- if (!contact.defaultEmail().isEmpty())
+ if (!contact.defaultEmail().isEmpty())
addr.insertEmail(contact.defaultEmail(), true);
-
+
// home
@@ -105,6 +105,6 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
homeaddress.setCountry( contact.homeCountry() );
-
+
addr.insertAddress( homeaddress );
}
-
+
if (!contact.homePhone().isEmpty())
@@ -116,3 +116,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
if (!contact.homeFax().isEmpty())
@@ -124,3 +124,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
if (!contact.homeMobile().isEmpty())
@@ -132,5 +132,5 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
addr.setUrl( contact.homeWebpage() );
-
+
@@ -152,7 +152,7 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
businessaddress.setCountry( contact.businessCountry() );
-
+
addr.insertAddress( businessaddress );
}
-
-
+
+
if (!contact.businessPhone().isEmpty())
@@ -164,3 +164,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
if (!contact.businessFax().isEmpty())
@@ -172,3 +172,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
if (!contact.businessMobile().isEmpty())
@@ -188,3 +188,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
addr.setRole( contact.jobTitle() ); //?
@@ -205,6 +205,6 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female");
-
+
if (contact.anniversary().isValid()) {
QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate);
-//US
+//US
// qDebug("QtopiaConverter::qtopiaToAddressee found:%s", dt.latin1());
@@ -212,3 +212,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-
+
addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() );
@@ -216,3 +216,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
addr.setBirthday( contact.birthday() );
-
+
addr.setNickName( contact.nickname() );
@@ -223,10 +223,10 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
notes += "\nBusinessWebPage: " + contact.businessWebpage() + "\n";
-
+
addr.setNote( contact.notes() );
-
-
+
+
//US QString groups() const { return find( Qtopia::Groups ); }
//US QStringList groupList() const;
-
+
QArray<int> catArray = contact.categories();
@@ -239,3 +239,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
}
-*/
+*/
return true;
@@ -243,3 +243,3 @@ bool SharpDTMConverter::sharpToAddressee( const PimContact &contact, Addressee &
-bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &contact )
+bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, const SlZDataBase* database , const CardId &contact )
{
@@ -253,4 +253,4 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setFileAs();
-
-
+
+
// email
@@ -261,3 +261,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setDefaultEmail( addr.preferredEmail() );
-
+
@@ -276,3 +276,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setHomePhone(homephone.number());
-
+
PhoneNumber homefax = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax );
@@ -280,3 +280,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setHomeFax(homefax.number());
-
+
PhoneNumber homemobile = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Cell );
@@ -284,5 +284,5 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setHomeMobile(homemobile.number());
-
+
contact.setHomeWebpage(addr.url().url());
-
+
@@ -301,3 +301,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setBusinessPhone(businessphone.number());
-
+
PhoneNumber businessfax = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax );
@@ -305,3 +305,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setBusinessFax(businessfax.number());
-
+
PhoneNumber businessmobile = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Cell );
@@ -309,3 +309,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setBusinessMobile(businessmobile.number());
-
+
PhoneNumber businesspager = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Pager );
@@ -335,9 +335,9 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
-
- QDate dt = KGlobal::locale()->readDate(
+
+ QDate dt = KGlobal::locale()->readDate(
addr.custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); // = Qt::ISODate
contact.setAnniversary( dt );
-
+
contact.setChildren(addr.custom( "KADDRESSBOOK", "X-Children" ));
-
+
contact.setBirthday(addr.birthday().date());
@@ -347,3 +347,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
contact.setNotes(addr.note());
-
+
//US QString groups() const { return find( Qtopia::Groups ); }
@@ -353,3 +353,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
QStringList cats = addr.categories();
-
+
QArray<int> iar;
@@ -359,3 +359,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, PimContact &con
}
-*/
+*/
return true;