summaryrefslogtreecommitdiffstats
path: root/kmail/headerstyle.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
commit1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch)
treef2defe163a805a9e34a2142dfde4cdb5e49241e7 /kmail/headerstyle.cpp
parent67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff)
downloadtdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz
tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/headerstyle.cpp')
-rw-r--r--kmail/headerstyle.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/kmail/headerstyle.cpp b/kmail/headerstyle.cpp
index 0b728444f..6e459c7aa 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.arg( useSpan ? "span" : "div" )
- .arg( useSpan ? "span" : "div" )
- .arg( dir )
- .arg( LinkLocator::convertToHtml( str ) );
+ return format.tqarg( useSpan ? "span" : "div" )
+ .tqarg( useSpan ? "span" : "div" )
+ .tqarg( dir )
+ .tqarg( LinkLocator::convertToHtml( str ) );
}
#endif
@@ -262,13 +262,13 @@ namespace KMail {
return headerStr + "</div>";
}
- headerStr = TQString("<div class=\"header\" dir=\"%1\">").arg(dir);
+ headerStr = TQString("<div class=\"header\" dir=\"%1\">").tqarg(dir);
//case HdrLong:
if ( strategy->showHeader( "subject" ) )
headerStr += TQString("<div dir=\"%1\"><b style=\"font-size:130%\">" +
strToHtml(message->subject()) + "</b></div>\n")
- .arg(subjectDir);
+ .tqarg(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")
- .arg( TQString::number( percent ), filterHeader );
+ .tqarg( TQString::number( percent ), filterHeader );
return TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" style=\"border: 1px solid black;\" title=\"%4\"> &nbsp;")
- .arg( imgToDataUrl( meterBar, "PPM" ), TQString::number( 20 ),
+ .tqarg( imgToDataUrl( meterBar, "PPM" ), TQString::number( 20 ),
TQString::number( 5 ), titleText );
}
@@ -430,7 +430,7 @@ namespace KMail {
// of the application tqlayout.
TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
- TQString headerStr = TQString("<div class=\"fancy header\" dir=\"%1\">\n").arg(dir);
+ TQString headerStr = TQString("<div class=\"fancy header\" dir=\"%1\">\n").tqarg(dir);
// However, the direction of the message subject within the header is
// determined according to the contents of the subject itself. Since
@@ -494,7 +494,7 @@ namespace KMail {
if ( !presence.isEmpty() )
{
TQString presenceIcon = TQString::tqfromLatin1( " <img src=\"%1\"/>" )
- .arg( imgToDataUrl( imProxy->presenceIcon( kabcUid ).convertToImage() ) );
+ .tqarg( 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\">")
- .arg( photoURL ).arg( photoWidth ).arg( photoHeight );
+ .tqarg( photoURL ).tqarg( photoWidth ).tqarg( 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>" ).arg( kabcUid )
- .arg( userHTML )
- .arg( kabcUid )
- .arg( presence );
+ "</div>" ).tqarg( kabcUid )
+ .tqarg( userHTML )
+ .tqarg( kabcUid )
+ .tqarg( 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>" )
- .arg( kabcUid )
- .arg( kabcUid )
- .arg( presence );
+ .tqarg( kabcUid )
+ .tqarg( kabcUid )
+ .tqarg( presence );
}
#if 0
// Disabled 'Launch IM' link in headers - Will
@@ -646,7 +646,7 @@ namespace KMail {
// kdDebug() << "FancyHeaderStyle::format() local zone offset (in minutes): " << lzone << endl;
- TQTime currTime = TQTime::currentTime( TQt::UTC );
+ TQTime currTime = TQTime::currentTime( Qt::UTC );
// kdDebug() << "FancyHeaderStyle::format() current time: " << currTime << endl;
@@ -662,7 +662,7 @@ namespace KMail {
color = "white";
bg_color = "#000B6B";
bg_image = "url(data:image/png;base64,"
- "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAIAAAASmSbdAAAAS0lETQVQI11WOsRGATQAzDOG/LHoz9"
+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAIAAAASmSbdAAAAS0lEQVQI11WOsRGAQAzDOG/LHoz9"
"kikIcF+kSBxbPs7LoNGVapAI0Zn+O+8NUwldozn6io7G7kdS/5zi7i+BvUM/5uSXlIfzMHx/bmWR"
"k++yj9rZAAAAAElFTkSuQmCC)";
}
@@ -671,8 +671,8 @@ namespace KMail {
color = "white";
bg_color = "#00A6FF";
bg_image = "url(data:image/png;base64,"
- "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAWklETQVQI122OQQ7DMAzDaP3/dfuO"
- "pWSHJgva7iZIBk3m/Ew5hexCHVCilewzFHKEbFZqgxJTQWyzKhWKl9unqddJj8+L9sl0oR2gUim+o"
+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAWklEQVQI122OQQ7DMAzDaP3/dfuO"
+ "pWSHJgva7iZIBk3m/Ew5hexCHVCilewzFHKEbFZqgxJQWyzKhWKl9unqddJj8+L9sl0oR2gUim+o"
"zu4uSh7kn67/DNv+C4tsZOtjAWEHAAAAAElFTkSuQmCC)";
}
else if ( currTime > TQTime( 12, 0, 0 ) && currTime <= TQTime( 18, 0, 0 ) ) {
@@ -680,8 +680,8 @@ namespace KMail {
color = "black";
bg_color = "#00A6FF";
bg_image = "url(data:image/png;base64,"
- "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAPUlETQVQI132OwQ0AIAwCSfcfw91c"
- "QsCfRm399HFwoWjdDhMICQhxHSWMTQPhkTCoqWRZU2h5i9tr4GZfmV5t3wWUI3h+NugAAAABJRU5E"
+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAPUlEQVQI132OwQ0AIAwCSfcfw91c"
+ "QsCfRm399HFwoWjdDhMICQhxHSWMQPhkTCoqWRZU2h5i9tr4GZfmV5t3wWUI3h+NugAAAABJRU5E"
"rkJggg==)";
}
else {
@@ -689,8 +689,8 @@ namespace KMail {
color = "white";
bg_color = "#0014CC";
bg_image = "url(data:image/png;base64,"
- "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAWklETQVQI11WOyRHAMAgDNQuUlBrS"
- "fyFpAfKwje0PwyEt0vN+hVsJpzS6TQML2ziWcFI6mZBZNSVDXYehyUgI1XsLI9eimHDH6kW0ddVIO"
+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAWklEQVQI11WOyRHAMAgDNQuUlBrS"
+ "fyFpAfKwje0PwyEt0vN+hVsJpzS6QML2ziWcFI6mZBZNSVDXYehyUgI1XsLI9eimHDH6kW0ddVIO"
"xx7JjrtshlbXlLDSD+WhJ+hwqWo8AAAAAElFTkSuQmCC)";
}
@@ -719,12 +719,12 @@ namespace KMail {
"margin: 0px 0px 3px 0px;"
"\" class=\"curtime\">%4<br />%5<br />%6</div>"
)
- .arg( bg_color )
- .arg( color )
- .arg( bg_image )
- .arg( i18n( "Now:" ) )
- .arg( currTime.toString( tformat ) )
- .arg( timeofday )
+ .tqarg( bg_color )
+ .tqarg( color )
+ .tqarg( bg_image )
+ .tqarg( i18n( "Now:" ) )
+ .tqarg( currTime.toString( tformat ) )
+ .tqarg( timeofday )
);
}
else {
@@ -739,8 +739,8 @@ namespace KMail {
( GlobalSettings::self()->showEmoticons() ?
LinkLocator::ReplaceSmileys : 0 );
headerStr += TQString("<div dir=\"%1\">%2</div>\n")
- .arg(subjectDir)
- .arg(message->subject().isEmpty()?
+ .tqarg(subjectDir)
+ .tqarg(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>")
- .arg(i18n("From: "))
+ .tqarg(i18n("From: "))
+ KMMessage::emailAddrAsAnchor( fromStr, false )
+ ( !message->headerField( "Resent-From" ).isEmpty() ? "&nbsp;"
+ i18n("(resent from %1)")
- .arg( KMMessage::emailAddrAsAnchor(
+ .tqarg( KMMessage::emailAddrAsAnchor(
message->headerField( "Resent-From" ),false) )
: TQString("") )
+ ( !vCardName.isEmpty() ? "&nbsp;&nbsp;<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")
- .arg(i18n("To: "))
- .arg(KMMessage::emailAddrAsAnchor(message->to(),false)));
+ .tqarg(i18n("To: "))
+ .tqarg(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")
- .arg(i18n("CC: "))
- .arg(KMMessage::emailAddrAsAnchor(message->cc(),false)));
+ .tqarg(i18n("CC: "))
+ .tqarg(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")
- .arg(i18n("BCC: "))
- .arg(KMMessage::emailAddrAsAnchor(message->bcc(),false)));
+ .tqarg(i18n("BCC: "))
+ .tqarg(KMMessage::emailAddrAsAnchor(message->bcc(),false)));
if ( strategy->showHeader( "date" ) )
headerStr.append(TQString("<tr><th>%1</th>\n"
"<td dir=\"%2\">%3</td></tr>\n")
- .arg(i18n("Date: "))
- .arg( directionOf( message->dateStr() ) )
- .arg(strToHtml(dateString)));
+ .tqarg(i18n("Date: "))
+ .tqarg( directionOf( message->dateStr() ) )
+ .tqarg(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")
- .arg(i18n("User-Agent: "))
- .arg( strToHtml( message->headerField("User-Agent") ) ) );
+ .tqarg(i18n("User-Agent: "))
+ .tqarg( 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")
- .arg(i18n("X-Mailer: "))
- .arg( strToHtml( message->headerField("X-Mailer") ) ) );
+ .tqarg(i18n("X-Mailer: "))
+ .tqarg( 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")
- .arg(i18n("Sender status: "))
- .arg( directionOf( onlinetqStatus ) )
- .arg(onlinetqStatus));
+ .tqarg(i18n("Sender status: "))
+ .tqarg( directionOf( onlinetqStatus ) )
+ .tqarg(onlinetqStatus));
*/
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" )
- .arg(timeHTML)
- .arg(userHTML) );
+ .tqarg(timeHTML)
+ .tqarg(userHTML) );
if ( !spamHTML.isEmpty() )
headerStr.append( TQString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b>&nbsp;<span style=\"padding-left: 20px;\">%3</span></div>\n")
- .arg( subjectDir, i18n("Spam tqStatus:"), spamHTML ) );
+ .tqarg( subjectDir, i18n("Spam tqStatus:"), spamHTML ) );
headerStr += "</div>\n\n";
return headerStr;
@@ -854,7 +854,7 @@ namespace KMail {
buffer.open( IO_WriteOnly );
image.save( &buffer, fmt );
return TQString::tqfromLatin1("data:image/%1;base64,%2")
- .arg( fmt, KCodecs::base64Encode( ba ) );
+ .tqarg( fmt, KCodecs::base64Encode( ba ).data() );
}
// #####################
@@ -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->palette().active().highlight();
+ const TQColor activeColor = tqApp->tqpalette().active().highlight();
TQColor activeColorDark = activeColor.dark(130);
// reverse colors for encapsulated
if( !topLevel ){