summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2004-10-12 20:38:57 (UTC)
committer zautrix <zautrix>2004-10-12 20:38:57 (UTC)
commit60a63813f7ec38fe275e7ef06033a6d3eb3ec31c (patch) (side-by-side diff)
treee1bc86e49c5947a593f752e46acb89f06fabf7fc /kabc
parentc38bc76bfec3aae65f3bc22c3e2a6ac0d6b0437d (diff)
downloadkdepimpi-60a63813f7ec38fe275e7ef06033a6d3eb3ec31c.zip
kdepimpi-60a63813f7ec38fe275e7ef06033a6d3eb3ec31c.tar.gz
kdepimpi-60a63813f7ec38fe275e7ef06033a6d3eb3ec31c.tar.bz2
space fixes
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addresseeview.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index 0564e85..90be928 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -227,105 +227,102 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() );
}
if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) {
if ( picAvailintern ) {
QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() );
} else {
if ( picAvailUrl ) {
QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", QPixmap( picture.url() ));
} else {
QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", KGlobal::iconLoader()->loadIcon( "package_toys", KIcon::Desktop, 128 ) );
}
}
picString = "<img src=\"myimage\" width=\"50\" height=\"70\">";
mText = QString::fromLatin1(
"<html>"
"<body text=\"%1\" bgcolor=\"%2\">" // text and background color
"<table>"
"<tr>"
"<td rowspan=\"3\" align=\"right\" valign=\"top\">"
"%3"
"</td>"
"<td align=\"left\"><font size=\"+2\"><b>%4</b></font></td>" // name
"</tr>"
"%5" // role
"%6" // organization
"<td colspan=\"2\">&nbsp;</td>"
"%7" // dynamic part
"%8" // notes
"</table>"
"</body>"
"</html>")
//US
.arg( /*KGlobalSettings::textColor().name()*/ "black" )
//US
.arg( /*KGlobalSettings::baseColor().name()*/ "white" )
.arg( picString )
.arg( name )
.arg( aRole )
.arg( aOrga )
.arg( dynamicPart )
.arg( notes );
} else { // no picture!
mText = "<table width=\"100%\">\n";
//mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
#ifdef DESKTOP_VERSION
mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h1>";
+ mText += "<font color=\"#FFFFFF\">" + name +"</font></h1>";
#else
- mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h2>";
+ mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h3>";
+ mText += "<font color=\"#FFFFFF\"> " + name +"</font></h3>";
#endif
-#ifdef DESKTOP_VERSION
- mText += "<font color=\"#FFFFFF\"> <em>" + name+"</em></font></h1>";
-#else
- mText += "<font color=\"#FFFFFF\"> <em>" + name +"</em></font></h2>";
-#endif
mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
mText += "<table><td colspan=\"2\">&nbsp;</td>";
/*
mText += QString("<tr><td align=\"right\"><b2>%1</b2></td>"
"<td align=\"left\"><b>%2</b></td></tr>" )
.arg( i18n(" ") )
.arg( name );
*/
if ( ! mAddressee.role().isEmpty() )
mText += QString("<tr><td align=\"right\"><b>%1</b></td>"
"<td align=\"left\">%2</td></tr>" )
.arg( i18n(" ") )
.arg( mAddressee.role());
if ( ! mAddressee.organization().isEmpty() )
mText += QString("<tr><td align=\"right\"><b>%1</b></td>"
"<td align=\"left\">%2</td></tr>" )
.arg( i18n(" ") )
.arg( mAddressee.organization());
mText += dynamicPart;
mText += notes;
mText += "</table>";
}
// at last display it...
setText( mText );
}
QString AddresseeView::getPhoneNumbers( bool preferred )
{
ExternalAppHandler* eah = ExternalAppHandler::instance();
bool kphoneAvail = eah->isPhoneAppAvailable();
bool kfaxAvail = eah->isFaxAppAvailable();
bool ksmsAvail = eah->isSMSAppAvailable();
bool kpagerAvail = eah->isPagerAppAvailable();
bool ksipAvail = eah->isSIPAppAvailable();
QString dynamicPart;
KABC::PhoneNumber::List phones = mAddressee.phoneNumbers();
KABC::PhoneNumber::List::ConstIterator phoneIt;
QString extension;
int phonetype;
QString sms;
for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) {
phonetype = (*phoneIt).type();
if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred )
continue;