summaryrefslogtreecommitdiffabout
path: root/kabc
Unidiff
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp4
-rw-r--r--kabc/addresseeview.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 19c78ee..789a694 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -1014,119 +1014,119 @@ QString Addressee::businessAddressStreetLabel()
1014QString Addressee::businessAddressLocalityLabel() 1014QString Addressee::businessAddressLocalityLabel()
1015{ 1015{
1016 return i18n("Business Address Locality"); 1016 return i18n("Business Address Locality");
1017} 1017}
1018 1018
1019 1019
1020QString Addressee::businessAddressRegionLabel() 1020QString Addressee::businessAddressRegionLabel()
1021{ 1021{
1022 return i18n("Business Address Region"); 1022 return i18n("Business Address Region");
1023} 1023}
1024 1024
1025 1025
1026QString Addressee::businessAddressPostalCodeLabel() 1026QString Addressee::businessAddressPostalCodeLabel()
1027{ 1027{
1028 return i18n("Business Address Postal Code"); 1028 return i18n("Business Address Postal Code");
1029} 1029}
1030 1030
1031 1031
1032QString Addressee::businessAddressCountryLabel() 1032QString Addressee::businessAddressCountryLabel()
1033{ 1033{
1034 return i18n("Business Address Country"); 1034 return i18n("Business Address Country");
1035} 1035}
1036 1036
1037 1037
1038QString Addressee::businessAddressLabelLabel() 1038QString Addressee::businessAddressLabelLabel()
1039{ 1039{
1040 return i18n("Business Address Label"); 1040 return i18n("Business Address Label");
1041} 1041}
1042 1042
1043 1043
1044QString Addressee::homePhoneLabel() 1044QString Addressee::homePhoneLabel()
1045{ 1045{
1046 return i18n("Home Phone"); 1046 return i18n("Home Phone");
1047} 1047}
1048 1048
1049 1049
1050QString Addressee::businessPhoneLabel() 1050QString Addressee::businessPhoneLabel()
1051{ 1051{
1052 return i18n("Work Phone"); 1052 return i18n("Work Phone");
1053} 1053}
1054 1054
1055 1055
1056QString Addressee::mobilePhoneLabel() 1056QString Addressee::mobilePhoneLabel()
1057{ 1057{
1058 return i18n("Mobile Phone"); 1058 return i18n("Mobile Phone");
1059} 1059}
1060QString Addressee::mobileWorkPhoneLabel() 1060QString Addressee::mobileWorkPhoneLabel()
1061{ 1061{
1062 return i18n("Mobile2 (work)"); 1062 return i18n("Mobile2 (Work)");
1063} 1063}
1064QString Addressee::mobileHomePhoneLabel() 1064QString Addressee::mobileHomePhoneLabel()
1065{ 1065{
1066 return i18n("Mobile (Home)"); 1066 return i18n("Mobile (Home)");
1067} 1067}
1068 1068
1069 1069
1070QString Addressee::homeFaxLabel() 1070QString Addressee::homeFaxLabel()
1071{ 1071{
1072 return i18n("Fax (Home)"); 1072 return i18n("Fax (Home)");
1073} 1073}
1074 1074
1075 1075
1076QString Addressee::businessFaxLabel() 1076QString Addressee::businessFaxLabel()
1077{ 1077{
1078 return i18n("Fax (Work)"); 1078 return i18n("Fax (Work)");
1079} 1079}
1080 1080
1081 1081
1082QString Addressee::carPhoneLabel() 1082QString Addressee::carPhoneLabel()
1083{ 1083{
1084 return i18n("Mobile2 (car)"); 1084 return i18n("Mobile2 (Car)");
1085} 1085}
1086 1086
1087 1087
1088QString Addressee::isdnLabel() 1088QString Addressee::isdnLabel()
1089{ 1089{
1090 return i18n("ISDN"); 1090 return i18n("ISDN");
1091} 1091}
1092 1092
1093 1093
1094QString Addressee::pagerLabel() 1094QString Addressee::pagerLabel()
1095{ 1095{
1096 return i18n("Pager"); 1096 return i18n("Pager");
1097} 1097}
1098 1098
1099QString Addressee::sipLabel() 1099QString Addressee::sipLabel()
1100{ 1100{
1101 return i18n("SIP"); 1101 return i18n("SIP");
1102} 1102}
1103 1103
1104QString Addressee::emailLabel() 1104QString Addressee::emailLabel()
1105{ 1105{
1106 return i18n("Email Address"); 1106 return i18n("Email Address");
1107} 1107}
1108 1108
1109 1109
1110void Addressee::setMailer( const QString &mailer ) 1110void Addressee::setMailer( const QString &mailer )
1111{ 1111{
1112 if ( mailer == mData->mailer ) return; 1112 if ( mailer == mData->mailer ) return;
1113 detach(); 1113 detach();
1114 mData->empty = false; 1114 mData->empty = false;
1115 mData->mailer = mailer; 1115 mData->mailer = mailer;
1116} 1116}
1117 1117
1118QString Addressee::mailer() const 1118QString Addressee::mailer() const
1119{ 1119{
1120 return mData->mailer; 1120 return mData->mailer;
1121} 1121}
1122 1122
1123QString Addressee::mailerLabel() 1123QString Addressee::mailerLabel()
1124{ 1124{
1125 return i18n("Mail Client"); 1125 return i18n("Mail Client");
1126} 1126}
1127 1127
1128 1128
1129void Addressee::setTimeZone( const TimeZone &timeZone ) 1129void Addressee::setTimeZone( const TimeZone &timeZone )
1130{ 1130{
1131 if ( timeZone == mData->timeZone ) return; 1131 if ( timeZone == mData->timeZone ) return;
1132 detach(); 1132 detach();
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index 05d604f..aae923c 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -539,99 +539,101 @@ mText = "<table width=\"100%\">\n";
539 mText += notes; 539 mText += notes;
540 mText += "</table>"; 540 mText += "</table>";
541 541
542 } 542 }
543 543
544 // at last display it... 544 // at last display it...
545 setText( mText ); 545 setText( mText );
546 546
547} 547}
548 548
549QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool preferred ) 549QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool preferred )
550{ 550{
551 ExternalAppHandler* eah = ExternalAppHandler::instance(); 551 ExternalAppHandler* eah = ExternalAppHandler::instance();
552 bool kphoneAvail = eah->isPhoneAppAvailable(); 552 bool kphoneAvail = eah->isPhoneAppAvailable();
553 bool kfaxAvail = eah->isFaxAppAvailable(); 553 bool kfaxAvail = eah->isFaxAppAvailable();
554 bool ksmsAvail = eah->isSMSAppAvailable(); 554 bool ksmsAvail = eah->isSMSAppAvailable();
555 bool kpagerAvail = eah->isPagerAppAvailable(); 555 bool kpagerAvail = eah->isPagerAppAvailable();
556 bool ksipAvail = eah->isSIPAppAvailable(); 556 bool ksipAvail = eah->isSIPAppAvailable();
557 QString dynamicPart; 557 QString dynamicPart;
558 KABC::PhoneNumber::List::ConstIterator phoneIt; 558 KABC::PhoneNumber::List::ConstIterator phoneIt;
559 QString extension; 559 QString extension;
560 int phonetype; 560 int phonetype;
561 QString sms; 561 QString sms;
562 for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { 562 for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) {
563 phonetype = (*phoneIt).type(); 563 phonetype = (*phoneIt).type();
564 if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred ) 564 if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred )
565 continue; 565 continue;
566 if (ksmsAvail && 566 if (ksmsAvail &&
567 ( 567 (
568 ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) || 568 ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) ||
569 ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell) 569 ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell)
570 ) 570 )
571 ) 571 )
572 { 572 {
573 sms = QString("<a href=\"smsto:%1 \">(sms)</a>" ) 573 sms = QString("<a href=\"smsto:%1 \">(sms)</a>" )
574 .arg( (*phoneIt).number() ); 574 .arg( (*phoneIt).number() );
575 575
576 } 576 }
577 else 577 else
578 sms = ""; 578 sms = "";
579 579
580 extension = QString::null; 580 extension = QString::null;
581 if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) { 581 if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) {
582 if (kfaxAvail) extension = "faxto:"; 582 if (kfaxAvail) extension = "faxto:";
583 } 583 }
584 else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) { 584 else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) {
585 if (kpagerAvail) extension = "pagerto:"; 585 if (kpagerAvail) extension = "pagerto:";
586 } 586 }
587#if 0
587 else if ((phonetype & KABC::PhoneNumber::Sip) == KABC::PhoneNumber::Sip) { 588 else if ((phonetype & KABC::PhoneNumber::Sip) == KABC::PhoneNumber::Sip) {
588 if (ksipAvail) extension = "sipto:"; 589 if (ksipAvail) extension = "sipto:";
589 } 590 }
591#endif
590 else if (kphoneAvail) { 592 else if (kphoneAvail) {
591 extension = "phoneto:"; 593 extension = "phoneto:";
592 } 594 }
593 else 595 else
594 extension = QString::null; 596 extension = QString::null;
595 597
596 if ( !extension.isEmpty() ) { 598 if ( !extension.isEmpty() ) {
597 dynamicPart += QString( 599 dynamicPart += QString(
598 "<tr><td align=\"right\"><b>%1</b></td>" 600 "<tr><td align=\"right\"><b>%1</b></td>"
599 "<td align=\"left\"><a href=\"%2%3 \">%4</a> %5</td></tr>" ) 601 "<td align=\"left\"><a href=\"%2%3 \">%4</a> %5</td></tr>" )
600 .arg( KABC::PhoneNumber::typeLabel( phonetype ) ) 602 .arg( KABC::PhoneNumber::typeLabel( phonetype ) )
601 .arg( extension ) 603 .arg( extension )
602 .arg( (*phoneIt).number() ) 604 .arg( (*phoneIt).number() )
603 .arg( (*phoneIt).number() ) 605 .arg( (*phoneIt).number() )
604 .arg( sms ); 606 .arg( sms );
605 607
606 } else { 608 } else {
607 dynamicPart += QString( 609 dynamicPart += QString(
608 "<tr><td align=\"right\"><b>%1</b></td>" 610 "<tr><td align=\"right\"><b>%1</b></td>"
609 "<td align=\"left\">%2 %3</td></tr>" ) 611 "<td align=\"left\">%2 %3</td></tr>" )
610 .arg( KABC::PhoneNumber::typeLabel( phonetype ) ) 612 .arg( KABC::PhoneNumber::typeLabel( phonetype ) )
611 .arg( (*phoneIt).number() ) 613 .arg( (*phoneIt).number() )
612 .arg( sms ); 614 .arg( sms );
613 } 615 }
614 } 616 }
615 return dynamicPart; 617 return dynamicPart;
616} 618}
617/* 619/*
618KABC::Addressee AddresseeView::addressee() const 620KABC::Addressee AddresseeView::addressee() const
619{ 621{
620 return mAddressee; 622 return mAddressee;
621} 623}
622*/ 624*/
623void AddresseeView::addTag(const QString & tag,const QString & text) 625void AddresseeView::addTag(const QString & tag,const QString & text)
624{ 626{
625 if ( text.isEmpty() ) 627 if ( text.isEmpty() )
626 return; 628 return;
627 int number=text.contains("\n"); 629 int number=text.contains("\n");
628 QString str = "<" + tag + ">"; 630 QString str = "<" + tag + ">";
629 QString tmpText=text; 631 QString tmpText=text;
630 QString tmpStr=str; 632 QString tmpStr=str;
631 if(number !=-1) 633 if(number !=-1)
632 { 634 {
633 if (number > 0) { 635 if (number > 0) {
634 int pos=0; 636 int pos=0;
635 QString tmp; 637 QString tmp;
636 for(int i=0;i<=number;i++) { 638 for(int i=0;i<=number;i++) {
637 pos=tmpText.find("\n"); 639 pos=tmpText.find("\n");