From 586dea6e61c766da49ba6cb55dd71851c0fafad3 Mon Sep 17 00:00:00 2001 From: drw Date: Sun, 18 May 2003 23:20:25 +0000 Subject: Updates to ocontact, oevent & otodo's toRichText() implementations --- (limited to 'libopie/pim/ocontact.cpp') diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index a7ca975..a2fb68c 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp @@ -440,7 +440,8 @@ QString OContact::toRichText() const // name, jobtitle and company if ( !(value = fullName()).isEmpty() ) - text += "

" + Qtopia::escapeString(value) + "


"; + text += "

" + Qtopia::escapeString(value) + "

"; + if ( !(value = jobTitle()).isEmpty() ) text += Qtopia::escapeString(value) + "
"; @@ -455,17 +456,19 @@ QString OContact::toRichText() const if ( !comp.isEmpty() ) text += Qtopia::escapeString(comp) + "
"; + text += "

"; + + // defailt email QString defEmail = defaultEmail(); if ( !defEmail.isEmpty() ) - text += "" + QObject::tr("Default Email: ") + "" + text += "" + QObject::tr("Default Email: ") + "" + Qtopia::escapeString(defEmail) + "
"; - text += "
"; + text += "
"; // business address if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || !businessZip().isEmpty() || !businessCountry().isEmpty() ) { - text += "
"; text += QObject::tr( "Work Address:" ); text += "
"; marker = true; @@ -496,25 +499,25 @@ QString OContact::toRichText() const } str = businessWebpage(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Business Web Page: ") + "" + text += "" + QObject::tr("Business Web Page: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } str = businessPhone(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Business Phone: ") + "" + text += "" + QObject::tr("Business Phone: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } str = businessFax(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Business Fax: ") + "" + text += "" + QObject::tr("Business Fax: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } str = businessMobile(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Business Mobile: ") + "" + text += "" + QObject::tr("Business Mobile: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } @@ -525,10 +528,11 @@ QString OContact::toRichText() const marker = true; } + text += "
"; + // home address if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || !homeZip().isEmpty() || !homeCountry().isEmpty() ) { - text += "
"; text += QObject::tr( "Home Address:" ); text += "
"; } @@ -551,25 +555,25 @@ QString OContact::toRichText() const // rest of Home data str = homeWebpage(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Home Web Page: ") + "" + text += "" + QObject::tr("Home Web Page: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } str = homePhone(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Home Phone: ") + "" + text += "" + QObject::tr("Home Phone: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } str = homeFax(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Home Fax: ") + "" + text += "" + QObject::tr("Home Fax: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } str = homeMobile(); if ( !str.isEmpty() ){ - text += "" + QObject::tr("Home Mobile: ") + "" + text += "" + QObject::tr("Home Mobile: ") + "" + Qtopia::escapeString(str) + "
"; marker = true; } @@ -625,6 +629,7 @@ QString OContact::toRichText() const text += "" + QObject::tr("Nickname: ") + "" + Qtopia::escapeString(str) + "
"; + // categories if ( categoryNames("Contacts").count() ){ text += "" + QObject::tr( "Category:") + " "; text += categoryNames("Contacts").join(", "); -- cgit v0.9.0.2