messageviewer
mobileheaderstyle.cpp
Go to the documentation of this file.
65 static QString formatMobileHeader( KMime::Message *message, bool extendedFormat, const HeaderStyle *style )
72 QString fromPart = StringUtil::emailAddrAsAnchor( message->from(), StringUtil::DisplayFullAddress, linkColor );
75 fromPart += QLatin1String(" <a href=\"") + style->vCardName() + QLatin1String("\" ") + linkColor + QLatin1Char('>') + i18n( "[vCard]" ) + QLatin1String("</a>");
77 const QString toPart = StringUtil::emailAddrAsAnchor( message->to(), StringUtil::DisplayFullAddress, linkColor );
78 const QString ccPart = StringUtil::emailAddrAsAnchor( message->cc(), StringUtil::DisplayFullAddress, linkColor );
81 const QString imagePath( QLatin1String( "file:///" ) + KStandardDirs::locate( "data", QLatin1String("libmessageviewer/pics/") ) );
88 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_important.png\" height=\"22\" width=\"22\"/>");
90 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_attachment.png\" height=\"22\" width=\"22\"/>");
92 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_actionitem.png\" height=\"22\" width=\"22\"/>");
94 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_replied.png\" height=\"22\" width=\"22\"/>");
96 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_forwarded.png\" height=\"22\" width=\"22\"/>");
98 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_signed.png\" height=\"22\" width=\"22\"/>");
100 flagsPart += QLatin1String("<img src=\"") + mobileImagePath + QLatin1String("status_encrypted.png\" height=\"22\" width=\"22\"/>");
108 headerStr += QLatin1String(" <div style=\"text-align: left; font-size: 20px; color: #0E49A1\">") + fromPart + QLatin1String("</div>\n");
111 headerStr += QLatin1String(" <div style=\"text-align: right; color: #0E49A1;\">") + flagsPart + QLatin1String("</div>\n");
119 headerStr += QLatin1String(" <div style=\"height: 20px; font-size: 15px; color: #0E49A1\">") + toPart + ccPart + QLatin1String("</div>\n");
127 headerStr += QLatin1String(" <div style=\"height: 35px; font-size: ") + QString::number( subjectFontSize ) + QLatin1String("px; color: #24353F;\">") + message->subject()->asUnicodeString() + QLatin1String("</div>\n");
133 headerStr += QLatin1String(" <div style=\"font-size: 15px; color: #24353F\">") + style->messagePath() + QLatin1String("</div>\n");
137 headerStr += QLatin1String(" <div style=\"font-size: 15px; color: #24353F; text-align: right; margin-right: 15px\">") + i18n( "sent: " );
138 headerStr += MessageViewer::HeaderStyleUtil::dateString( message, style->isPrinting(), /* shortDate = */ false ) + QLatin1String("</div>\n");
This class encapsulates the visual appearance of message headers.
Definition: headerstyle.h:60
QString dateString(KMime::Message *message, bool printing, bool shortDate)
Definition: headerstyle_util.cpp:54
Akonadi::MessageStatus messageStatus() const
Definition: headerstyle.h:130
static int matchingFontSize(const QString &text, int maximumWidth, int fontPixelSize)
Definition: mobileheaderstyle.cpp:46
static QString formatMobileHeader(KMime::Message *message, bool extendedFormat, const HeaderStyle *style)
Definition: mobileheaderstyle.cpp:65
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.