From c9d570427f3d5bead7bee1301514a2d4b82836ea Mon Sep 17 00:00:00 2001 From: ulf69 Date: Tue, 10 Aug 2004 01:34:22 +0000 Subject: enhancements to configure external apps like email and phones through a generalized interface --- (limited to 'libkdepim/addresseeview.cpp') diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index 547441c..83aba48 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -37,8 +37,8 @@ #ifndef DESKTOP_VERSION -#include -#include +#include +#include #endif static int kphoneInstalled = 0; @@ -59,7 +59,7 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name ) //US QStyleSheet *sheet = styleSheet(); //US QStyleSheetItem *link = sheet->item( "a" ); //US link->setColor( KGlobalSettings::linkColor() ); - + } void AddresseeView::setSource(const QString& n) { @@ -88,14 +88,14 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) kphoneInstalled = -1; } if ( kphoneInstalled > 0 ) - kphoneAvail = true; + kphoneAvail = true; #if 0 if ( kphoneAvail ) qDebug("KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); else qDebug("NOOOOOOOOOOOo KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); #endif - + #endif mAddressee = addr; // clear view @@ -144,7 +144,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) } } - + for ( ; emailIt != emails.end(); ++emailIt ) { dynamicPart += QString( "%1" @@ -181,14 +181,14 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) .arg( formattedAddress ); } else { - + dynamicPart += QString( "%1" "%2" ) .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) //US .arg( (*addrIt).label().replace( '\n', "
" ) ); .arg( (*addrIt).label() /*replace( QRegExp("\n"), "
" )*/ ); - + } } @@ -208,9 +208,9 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) QString aOrga = ""; if ( true /*!mAddressee.role().isEmpty()*/ ) { aRole = "" - "" + mAddressee.role() + "" + "" + mAddressee.role() + "" ""; - } + } if ( true /*!mAddressee.organization().isEmpty()*/ ) { aOrga = "" "" + mAddressee.organization() + "" ; @@ -268,13 +268,13 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) } else { // no picture! mText = "\n"; - //mText += "

"; + //mText += "

"; #ifdef DESKTOP_VERSION mText += "

"; #else mText += "

"; #endif - + #ifdef DESKTOP_VERSION mText += " " + name+"

"; #else @@ -287,7 +287,7 @@ mText = "\n"; mText += QString("" "" ) .arg( i18n(" ") ) - .arg( name ); + .arg( name ); */ if ( ! mAddressee.role().isEmpty() ) mText += QString("" @@ -302,11 +302,12 @@ mText = "
%1%2
%1
\n"; mText += dynamicPart; mText += notes; mText += "
"; - + } // at last display it... setText( mText ); + } KABC::Addressee AddresseeView::addressee() const @@ -321,7 +322,7 @@ void AddresseeView::addTag(const QString & tag,const QString & text) QString str = "<" + tag + ">"; QString tmpText=text; QString tmpStr=str; - if(number !=-1) + if(number !=-1) { if (number > 0) { int pos=0; -- cgit v0.9.0.2