summaryrefslogtreecommitdiffabout
path: root/libkdepim/addresseeview.cpp
Unidiff
Diffstat (limited to 'libkdepim/addresseeview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/addresseeview.cpp31
1 files changed, 16 insertions, 15 deletions
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 @@
37 37
38 38
39#ifndef DESKTOP_VERSION 39#ifndef DESKTOP_VERSION
40#include <qtopia/qcopenvelope_qws.h> 40#include <qtopia/qcopenvelope_qws.h>
41#include <qpe/qpeapplication.h> 41#include <qpe/qpeapplication.h>
42#endif 42#endif
43 43
44static int kphoneInstalled = 0; 44static int kphoneInstalled = 0;
@@ -59,7 +59,7 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name )
59//US QStyleSheet *sheet = styleSheet(); 59//US QStyleSheet *sheet = styleSheet();
60//US QStyleSheetItem *link = sheet->item( "a" ); 60//US QStyleSheetItem *link = sheet->item( "a" );
61//US link->setColor( KGlobalSettings::linkColor() ); 61//US link->setColor( KGlobalSettings::linkColor() );
62 62
63} 63}
64void AddresseeView::setSource(const QString& n) 64void AddresseeView::setSource(const QString& n)
65{ 65{
@@ -88,14 +88,14 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
88 kphoneInstalled = -1; 88 kphoneInstalled = -1;
89 } 89 }
90 if ( kphoneInstalled > 0 ) 90 if ( kphoneInstalled > 0 )
91 kphoneAvail = true; 91 kphoneAvail = true;
92#if 0 92#if 0
93 if ( kphoneAvail ) 93 if ( kphoneAvail )
94 qDebug("KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); 94 qDebug("KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail ");
95 else 95 else
96 qDebug("NOOOOOOOOOOOo KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); 96 qDebug("NOOOOOOOOOOOo KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail ");
97#endif 97#endif
98 98
99#endif 99#endif
100 mAddressee = addr; 100 mAddressee = addr;
101 // clear view 101 // clear view
@@ -144,7 +144,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
144 } 144 }
145 } 145 }
146 146
147 147
148 for ( ; emailIt != emails.end(); ++emailIt ) { 148 for ( ; emailIt != emails.end(); ++emailIt ) {
149 dynamicPart += QString( 149 dynamicPart += QString(
150 "<tr><td align=\"right\"><b>%1</b></td>" 150 "<tr><td align=\"right\"><b>%1</b></td>"
@@ -181,14 +181,14 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
181 .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) 181 .arg( KABC::Address::typeLabel( (*addrIt).type() ) )
182 .arg( formattedAddress ); 182 .arg( formattedAddress );
183 } else { 183 } else {
184 184
185 dynamicPart += QString( 185 dynamicPart += QString(
186 "<tr><td align=\"right\"><b>%1</b></td>" 186 "<tr><td align=\"right\"><b>%1</b></td>"
187 "<td align=\"left\">%2</td></tr>" ) 187 "<td align=\"left\">%2</td></tr>" )
188 .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) 188 .arg( KABC::Address::typeLabel( (*addrIt).type() ) )
189//US .arg( (*addrIt).label().replace( '\n', "<br>" ) ); 189//US .arg( (*addrIt).label().replace( '\n', "<br>" ) );
190 .arg( (*addrIt).label() /*replace( QRegExp("\n"), "<br>" )*/ ); 190 .arg( (*addrIt).label() /*replace( QRegExp("\n"), "<br>" )*/ );
191 191
192 } 192 }
193 } 193 }
194 194
@@ -208,9 +208,9 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
208 QString aOrga = ""; 208 QString aOrga = "";
209 if ( true /*!mAddressee.role().isEmpty()*/ ) { 209 if ( true /*!mAddressee.role().isEmpty()*/ ) {
210 aRole = "<tr>" 210 aRole = "<tr>"
211 "<td align=\"left\">" + mAddressee.role() + "</td>" 211 "<td align=\"left\">" + mAddressee.role() + "</td>"
212 "</tr>"; 212 "</tr>";
213 } 213 }
214 if ( true /*!mAddressee.organization().isEmpty()*/ ) { 214 if ( true /*!mAddressee.organization().isEmpty()*/ ) {
215 aOrga = "<tr>" 215 aOrga = "<tr>"
216 "<td align=\"left\">" + mAddressee.organization() + "</td>" ; 216 "<td align=\"left\">" + mAddressee.organization() + "</td>" ;
@@ -268,13 +268,13 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
268 } else { // no picture! 268 } else { // no picture!
269 269
270mText = "<table width=\"100%\">\n"; 270mText = "<table width=\"100%\">\n";
271 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 271 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
272#ifdef DESKTOP_VERSION 272#ifdef DESKTOP_VERSION
273 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h1>"; 273 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h1>";
274#else 274#else
275 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h2>"; 275 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h2>";
276#endif 276#endif
277 277
278#ifdef DESKTOP_VERSION 278#ifdef DESKTOP_VERSION
279 mText += "<font color=\"#FFFFFF\"> <em>" + name+"</em></font></h1>"; 279 mText += "<font color=\"#FFFFFF\"> <em>" + name+"</em></font></h1>";
280#else 280#else
@@ -287,7 +287,7 @@ mText = "<table width=\"100%\">\n";
287 mText += QString("<tr><td align=\"right\"><b2>%1</b2></td>" 287 mText += QString("<tr><td align=\"right\"><b2>%1</b2></td>"
288 "<td align=\"left\"><b>%2</b></td></tr>" ) 288 "<td align=\"left\"><b>%2</b></td></tr>" )
289 .arg( i18n(" ") ) 289 .arg( i18n(" ") )
290 .arg( name ); 290 .arg( name );
291 */ 291 */
292 if ( ! mAddressee.role().isEmpty() ) 292 if ( ! mAddressee.role().isEmpty() )
293 mText += QString("<tr><td align=\"right\"><b>%1</b></td>" 293 mText += QString("<tr><td align=\"right\"><b>%1</b></td>"
@@ -302,11 +302,12 @@ mText = "<table width=\"100%\">\n";
302 mText += dynamicPart; 302 mText += dynamicPart;
303 mText += notes; 303 mText += notes;
304 mText += "</table>"; 304 mText += "</table>";
305 305
306 } 306 }
307 307
308 // at last display it... 308 // at last display it...
309 setText( mText ); 309 setText( mText );
310
310} 311}
311 312
312KABC::Addressee AddresseeView::addressee() const 313KABC::Addressee AddresseeView::addressee() const
@@ -321,7 +322,7 @@ void AddresseeView::addTag(const QString & tag,const QString & text)
321 QString str = "<" + tag + ">"; 322 QString str = "<" + tag + ">";
322 QString tmpText=text; 323 QString tmpText=text;
323 QString tmpStr=str; 324 QString tmpStr=str;
324 if(number !=-1) 325 if(number !=-1)
325 { 326 {
326 if (number > 0) { 327 if (number > 0) {
327 int pos=0; 328 int pos=0;