-rw-r--r-- | libkdepim/addresseeview.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index deafd34..70fc57c 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -26,43 +26,58 @@ //US#include <kglobalsettings.h> #include <kiconloader.h> #include <klocale.h> //US #include <kstringhandler.h> #include <qscrollview.h> #include <qregexp.h> #include <qfile.h> #include <qapplication.h> #include "addresseeview.h" + +#ifndef DESKTOP_VERSION +#include <qtopia/qcopenvelope_qws.h> +#endif + + + using namespace KPIM; AddresseeView::AddresseeView( QWidget *parent, const char *name ) //US : KTextBrowser( parent, name ) : QTextBrowser( parent, name ) { //US setWrapPolicy( QTextEdit::AtWordBoundary ); setLinkUnderline( false ); // setVScrollBarMode( QScrollView::AlwaysOff ); //setHScrollBarMode( QScrollView::AlwaysOff ); //US QStyleSheet *sheet = styleSheet(); //US QStyleSheetItem *link = sheet->item( "a" ); //US link->setColor( KGlobalSettings::linkColor() ); } +void AddresseeView::setSource(const QString& n) +{ + //qDebug("********AddresseeView::setSource %s", n.mid(7).latin1()); +#ifndef DESKTOP_VERSION + QCopEnvelope e("QPE/Application/kmpi", "newMail(QString)"); + e << n.mid(7); +#endif +} void AddresseeView::setAddressee( const KABC::Addressee& addr ) { mAddressee = addr; // clear view setText( QString::null ); if ( mAddressee.isEmpty() ) return; QString name = ( mAddressee.formattedName().isEmpty() ? mAddressee.assembledName() : mAddressee.formattedName() ); @@ -76,26 +91,27 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\">%2</td></tr>" ) .arg( KABC::PhoneNumber::typeLabel( (*phoneIt).type() ) ) .arg( (*phoneIt).number() ); } QStringList emails = mAddressee.emails(); QStringList::ConstIterator emailIt; QString type = i18n( "Email" ); for ( emailIt = emails.begin(); emailIt != emails.end(); ++emailIt ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" - "<td align=\"left\"><a href=\"mailto:%2\">%3</a></td></tr>" ) + "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) .arg( type ) + .arg( name ) .arg( *emailIt ) .arg( *emailIt ); type = i18n( "Other" ); } if ( !mAddressee.url().url().isEmpty() ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\">%2</td></tr>" ) .arg( i18n( "Homepage" ) ) //US .arg( KStringHandler::tagURLs( mAddressee.url().url() ) ); .arg( mAddressee.url().url() ); |