Akonadi Contacts
standardcontactformatter.cpp
95 QLocale().toString(date) + QLatin1StringView(" ") + i18np("(One year old)", "(%1 years old)", years));
102 QString dispValue = QStringLiteral("<a href=\"tel:%1\">%2</a>").arg(number.normalizedNumber()).arg(number.number().toHtmlEscaped());
104 QString dispIcon = QStringLiteral("<a href=\"sms:%1\" title=\"%2\"><img src=\"sms_icon\" align=\"top\"/>")
117 const QString fullEmail = QString::fromLatin1(QUrl::toPercentEncoding(rawContact.fullEmail(email)));
119 dynamicPart += rowFmtStr1.arg(type, QStringLiteral("<a href=\"mailto:%1\">%2</a>").arg(fullEmail, email));
125 if (!url.startsWith(QLatin1StringView("http://")) && !url.startsWith(QLatin1StringView("https://"))) {
134 const QString blog = rawContact.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("BlogFeed"));
136 dynamicPart += rowFmtStr1.arg(i18n("Blog Feed"), KStringHandler::tagUrls(blog.toHtmlEscaped()));
145 formattedAddress = address.formatted(KContacts::AddressFormatStyle::Postal).trimmed().toHtmlEscaped();
152 const QString url = QStringLiteral("<a href=\"%1\" title=\"%2\"><img src=\"map_icon\" alt=\"%2\"/></a>")
155 dynamicPart += rowFmtStr2.arg(KContacts::Address::typeLabel(address.type()), formattedAddress, url);
161 notes = rowFmtStr1.arg(i18n("Notes"), rawContact.note().toHtmlEscaped().replace(QLatin1Char('\n'), QLatin1StringView("<br>")));
214 } else if (key == QLatin1StringView("BlogFeed") || key == QLatin1StringView("BLOGFEED")) { // blog is handled separated
280 "<td colspan=\"2\" align=\"left\" width=\"70%\"><font size=\"+2\"><b>%2</b></font></td>" // name
288 .arg(QStringLiteral("contact_photo"), rawContact.realName().toHtmlEscaped(), role.toHtmlEscaped(), rawContact.organization().toHtmlEscaped());
KContacts::Addressee contact() const
Returns the contact that will be formatted.
Definition abstractcontactformatter.cpp:36
Akonadi::Item item() const
Returns the item who's payload will be formatted.
Definition abstractcontactformatter.cpp:46
QList< QVariantMap > customFieldDescriptions() const
Returns the custom field descriptions that will be used.
Definition abstractcontactformatter.cpp:56
@ EmbeddableForm
Creates a div HTML element that can be embedded.
Definition abstractcontactformatter.h:45
T payload() const
bool isValid() const
bool hasPayload() const
StandardContactFormatter()
Creates a new standard contact formatter.
Definition standardcontactformatter.cpp:32
~StandardContactFormatter() override
Destroys the standard contact formatter.
QString toHtml(HtmlForm form=SelfcontainedForm) const override
Returns the contact formatted as HTML.
Definition standardcontactformatter.cpp:49
QString readEntry(const char *key, const char *aDefault=nullptr) const
QString typeLabel() const
QStringList emails() const
QString custom(const QString &app, const QString &name) const
QString organization() const
QStringList customs() const
QString note() const
QDateTime birthday() const
bool isEmpty() const
QString role() const
QString realName() const
QString title() const
QString fullEmail(const QString &email=QString()) const
ResourceLocatorUrl url() const
static QString birthdayLabel()
Address::List addresses() const
PhoneNumber::List phoneNumbers() const
bool isEmpty() const
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
A widget for editing the display name of a contact.
KCOREADDONS_EXPORT QString tagUrls(const QString &text)
QDate addYears(int nyears) const const
QDate currentDate()
QDate fromString(QStringView string, QStringView format, QCalendar cal)
bool isValid(int year, int month, int day)
int year() const const
QDate date() const const
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
bool empty() const const
ShortFormat
QString toString(QDate date, FormatType format) const const
ConstIterator
const_iterator constBegin() const const
const_iterator constEnd() const const
const_iterator constFind(const Key &key) const const
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
T value(const Key &key, const T &defaultValue) const const
Active
bool contains(const QSet< T > &other) const const
iterator insert(const T &value)
bool isEmpty() const const
QString & append(QChar ch)
QString arg(Args &&... args) const const
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
QString left(qsizetype n) const const
QString mid(qsizetype position, qsizetype n) const const
QString number(double n, char format, int precision)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QString toHtmlEscaped() const const
ISODate
QTime fromString(QStringView string, QStringView format)
QByteArray toPercentEncoding(const QString &input, const QByteArray &exclude, const QByteArray &include)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.