diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kmail/headerstyle.cpp | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmail/headerstyle.cpp')
-rw-r--r-- | kmail/headerstyle.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/kmail/headerstyle.cpp b/kmail/headerstyle.cpp index ac45aeeb6..5686d2c0d 100644 --- a/kmail/headerstyle.cpp +++ b/kmail/headerstyle.cpp @@ -82,10 +82,10 @@ namespace KMail { static TQString convertToHtmlBlock( const TQString & str, bool useSpan=false ) { TQString dir = directionOf( str ); TQString format = "<%1 dir=\"%3\">%4</%2>"; - return format.tqarg( useSpan ? "span" : "div" ) - .tqarg( useSpan ? "span" : "div" ) - .tqarg( dir ) - .tqarg( LinkLocator::convertToHtml( str ) ); + return format.arg( useSpan ? "span" : "div" ) + .arg( useSpan ? "span" : "div" ) + .arg( dir ) + .arg( LinkLocator::convertToHtml( str ) ); } #endif @@ -124,7 +124,7 @@ namespace KMail { strategy = HeaderStrategy::brief(); // The direction of the header is determined according to the direction - // of the application tqlayout. + // of the application layout. TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ; @@ -223,7 +223,7 @@ namespace KMail { strategy = HeaderStrategy::rich(); // The direction of the header is determined according to the direction - // of the application tqlayout. + // of the application layout. TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); @@ -262,13 +262,13 @@ namespace KMail { return headerStr + "</div>"; } - headerStr = TQString("<div class=\"header\" dir=\"%1\">").tqarg(dir); + headerStr = TQString("<div class=\"header\" dir=\"%1\">").arg(dir); //case HdrLong: if ( strategy->showHeader( "subject" ) ) headerStr += TQString("<div dir=\"%1\"><b style=\"font-size:130%\">" + strToHtml(message->subject()) + "</b></div>\n") - .tqarg(subjectDir); + .arg(subjectDir); if ( strategy->showHeader( "date" ) ) headerStr.append(i18n("Date: ") + strToHtml(dateString)+"<br>\n"); @@ -408,9 +408,9 @@ namespace KMail { } } TQString titleText = i18n("%1% probability of being spam.\n\nFull report:\n%2") - .tqarg( TQString::number( percent ), filterHeader ); + .arg( TQString::number( percent ), filterHeader ); return TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" style=\"border: 1px solid black;\" title=\"%4\"> ") - .tqarg( imgToDataUrl( meterBar, "PPM" ), TQString::number( 20 ), + .arg( imgToDataUrl( meterBar, "PPM" ), TQString::number( 20 ), TQString::number( 5 ), titleText ); } @@ -427,10 +427,10 @@ namespace KMail { // ### from kmreaderwin begin // The direction of the header is determined according to the direction - // of the application tqlayout. + // of the application layout. TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); - TQString headerStr = TQString("<div class=\"fancy header\" dir=\"%1\">\n").tqarg(dir); + TQString headerStr = TQString("<div class=\"fancy header\" dir=\"%1\">\n").arg(dir); // However, the direction of the message subject within the header is // determined according to the contents of the subject itself. Since @@ -457,7 +457,7 @@ namespace KMail { } // Spam header display. - // If the spamSpamtqStatus config value is true then we look for headers + // If the spamSpamStatus config value is true then we look for headers // from a few spam filters and try to create visually meaningful graphics // out of the spam scores. @@ -493,8 +493,8 @@ namespace KMail { presence = imProxy->presenceString( kabcUid ); if ( !presence.isEmpty() ) { - TQString presenceIcon = TQString::tqfromLatin1( " <img src=\"%1\"/>" ) - .tqarg( imgToDataUrl( imProxy->presenceIcon( kabcUid ).convertToImage() ) ); + TQString presenceIcon = TQString::fromLatin1( " <img src=\"%1\"/>" ) + .arg( imgToDataUrl( imProxy->presenceIcon( kabcUid ).convertToImage() ) ); presence += presenceIcon; } } @@ -585,26 +585,26 @@ namespace KMail { { //kdDebug( 5006 ) << "Got a photo: " << photoURL << endl; userHTML = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\">") - .tqarg( photoURL ).tqarg( photoWidth ).tqarg( photoHeight ); + .arg( photoURL ).arg( photoWidth ).arg( photoHeight ); if ( presence.isEmpty() ) { userHTML = TQString("<div class=\"senderpic\">") + userHTML + "</div>"; } else { userHTML = TQString( "<div class=\"senderpic\">" "<a href=\"im:%1\">%2<div class=\"senderstatus\">" "<span name=\"presence-%3\">%4</span></div></a>" - "</div>" ).tqarg( kabcUid ) - .tqarg( userHTML ) - .tqarg( kabcUid ) - .tqarg( presence ); + "</div>" ).arg( kabcUid ) + .arg( userHTML ) + .arg( kabcUid ) + .arg( presence ); } } else { // we don't have a photo, just show presence, if we have it if ( !presence.isEmpty() ) userHTML = TQString( "<a href=\"im:%1\"><div class=\"senderstatus\">" "<span name=\"presence-%2\">%3</span></div></a>" ) - .tqarg( kabcUid ) - .tqarg( kabcUid ) - .tqarg( presence ); + .arg( kabcUid ) + .arg( kabcUid ) + .arg( presence ); } #if 0 // Disabled 'Launch IM' link in headers - Will @@ -719,12 +719,12 @@ namespace KMail { "margin: 0px 0px 3px 0px;" "\" class=\"curtime\">%4<br />%5<br />%6</div>" ) - .tqarg( bg_color ) - .tqarg( color ) - .tqarg( bg_image ) - .tqarg( i18n( "Now:" ) ) - .tqarg( currTime.toString( tformat ) ) - .tqarg( timeofday ) + .arg( bg_color ) + .arg( color ) + .arg( bg_image ) + .arg( i18n( "Now:" ) ) + .arg( currTime.toString( tformat ) ) + .arg( timeofday ) ); } else { @@ -739,8 +739,8 @@ namespace KMail { ( GlobalSettings::self()->showEmoticons() ? LinkLocator::ReplaceSmileys : 0 ); headerStr += TQString("<div dir=\"%1\">%2</div>\n") - .tqarg(subjectDir) - .tqarg(message->subject().isEmpty()? + .arg(subjectDir) + .arg(message->subject().isEmpty()? i18n("No Subject") : strToHtml( message->subject(), flags )); } @@ -755,11 +755,11 @@ namespace KMail { fromStr = message->fromStrip(); // let's use that headerStr += TQString("<tr><th>%1</th>\n" "<td>") - .tqarg(i18n("From: ")) + .arg(i18n("From: ")) + KMMessage::emailAddrAsAnchor( fromStr, false ) + ( !message->headerField( "Resent-From" ).isEmpty() ? " " + i18n("(resent from %1)") - .tqarg( KMMessage::emailAddrAsAnchor( + .arg( KMMessage::emailAddrAsAnchor( message->headerField( "Resent-From" ),false) ) : TQString("") ) + ( !vCardName.isEmpty() ? " <a href=\"" + vCardName + "\">" @@ -781,37 +781,37 @@ namespace KMail { if ( strategy->showHeader( "to" ) ) headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") - .tqarg(i18n("To: ")) - .tqarg(KMMessage::emailAddrAsAnchor(message->to(),false))); + .arg(i18n("To: ")) + .arg(KMMessage::emailAddrAsAnchor(message->to(),false))); // cc line, if any if ( strategy->showHeader( "cc" ) && !message->cc().isEmpty()) headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") - .tqarg(i18n("CC: ")) - .tqarg(KMMessage::emailAddrAsAnchor(message->cc(),false))); + .arg(i18n("CC: ")) + .arg(KMMessage::emailAddrAsAnchor(message->cc(),false))); // Bcc line, if any if ( strategy->showHeader( "bcc" ) && !message->bcc().isEmpty()) headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") - .tqarg(i18n("BCC: ")) - .tqarg(KMMessage::emailAddrAsAnchor(message->bcc(),false))); + .arg(i18n("BCC: ")) + .arg(KMMessage::emailAddrAsAnchor(message->bcc(),false))); if ( strategy->showHeader( "date" ) ) headerStr.append(TQString("<tr><th>%1</th>\n" "<td dir=\"%2\">%3</td></tr>\n") - .tqarg(i18n("Date: ")) - .tqarg( directionOf( message->dateStr() ) ) - .tqarg(strToHtml(dateString))); + .arg(i18n("Date: ")) + .arg( directionOf( message->dateStr() ) ) + .arg(strToHtml(dateString))); if ( GlobalSettings::self()->showUserAgent() ) { if ( strategy->showHeader( "user-agent" ) ) { if ( !message->headerField("User-Agent").isEmpty() ) { headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") - .tqarg(i18n("User-Agent: ")) - .tqarg( strToHtml( message->headerField("User-Agent") ) ) ); + .arg(i18n("User-Agent: ")) + .arg( strToHtml( message->headerField("User-Agent") ) ) ); } } @@ -819,8 +819,8 @@ namespace KMail { if ( !message->headerField("X-Mailer").isEmpty() ) { headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") - .tqarg(i18n("X-Mailer: ")) - .tqarg( strToHtml( message->headerField("X-Mailer") ) ) ); + .arg(i18n("X-Mailer: ")) + .arg( strToHtml( message->headerField("X-Mailer") ) ) ); } } } @@ -829,19 +829,19 @@ namespace KMail { /* if( strategy->showHeader( "status" ) ) headerStr.append( TQString( "<tr><th>%1</th>\n" "<td dir=\"%2\">%3</td></tr>\n") - .tqarg(i18n("Sender status: ")) - .tqarg( directionOf( onlinetqStatus ) ) - .tqarg(onlinetqStatus)); + .arg(i18n("Sender status: ")) + .arg( directionOf( onlineStatus ) ) + .arg(onlineStatus)); */ headerStr.append( TQString("<tr><td colspan=\"2\"><div id=\"attachmentInjectionPoint\"></div></td></tr>" ) ); headerStr.append( TQString( "</table></td><td align=\"center\" valign=\"top\">%1%2</td></tr></table>\n" ) - .tqarg(timeHTML) - .tqarg(userHTML) ); + .arg(timeHTML) + .arg(userHTML) ); if ( !spamHTML.isEmpty() ) headerStr.append( TQString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b> <span style=\"padding-left: 20px;\">%3</span></div>\n") - .tqarg( subjectDir, i18n("Spam Status:"), spamHTML ) ); + .arg( subjectDir, i18n("Spam Status:"), spamHTML ) ); headerStr += "</div>\n\n"; return headerStr; @@ -853,8 +853,8 @@ namespace KMail { TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); image.save( &buffer, fmt ); - return TQString::tqfromLatin1("data:image/%1;base64,%2") - .tqarg( fmt, KCodecs::base64Encode( ba ).data() ); + return TQString::fromLatin1("data:image/%1;base64,%2") + .arg( fmt, KCodecs::base64Encode( ba ).data() ); } // ##################### @@ -882,7 +882,7 @@ namespace KMail { strategy = HeaderStrategy::brief(); // The direction of the header is determined according to the direction - // of the application tqlayout. + // of the application layout. TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ; @@ -901,7 +901,7 @@ namespace KMail { // colors depend on if its encapsulated or not TQColor fontColor(TQt::white); TQString linkColor = "class =\"white\""; - const TQColor activeColor = tqApp->tqpalette().active().highlight(); + const TQColor activeColor = tqApp->palette().active().highlight(); TQColor activeColorDark = activeColor.dark(130); // reverse colors for encapsulated if( !topLevel ){ |