KTnef
formatter.cpp
Go to the documentation of this file.
52static QString stringProp(KTNEFMessage *tnefMsg, quint32 key, const QString &fallback = QString())
57static QString sNamedProp(KTNEFMessage *tnefMsg, const QString &name, const QString &fallback = QString())
290 QDateTime highNoonTime = pureISOToLocalQDateTime(tnefMsg->findProp(0x8502).remove(QLatin1Char('-')).remove(QLatin1Char(':')));
291 QDateTime wakeMeUpTime = pureISOToLocalQDateTime(tnefMsg->findProp(0x8560, QString()).remove(QLatin1Char('-')).remove(QLatin1Char(':')));
316 KContacts::Email email(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL1EMAILADDRESS)));
319 addressee.addEmail(KContacts::Email(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL2EMAILADDRESS))));
320 addressee.addEmail(KContacts::Email(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL3EMAILADDRESS))));
324 addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-SpousesName"), stringProp(tnefMsg, MAPI_TAG_PR_SPOUSE_NAME));
325 addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-ManagersName"), stringProp(tnefMsg, MAPI_TAG_PR_MANAGER_NAME));
326 addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-AssistantsName"), stringProp(tnefMsg, MAPI_TAG_PR_ASSISTANT));
327 addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Department"), stringProp(tnefMsg, MAPI_TAG_PR_DEPARTMENT_NAME));
328 addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Office"), stringProp(tnefMsg, MAPI_TAG_PR_OFFICE_LOCATION));
329 addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Profession"), stringProp(tnefMsg, MAPI_TAG_PR_PROFESSION));
331 QString s = tnefMsg->findProp(MAPI_TAG_PR_WEDDING_ANNIVERSARY).remove(QLatin1Char('-')).remove(QLatin1Char(':'));
366 adr.setPostOfficeBox(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_BUSINESSADDRESSPOBOX)));
370 adr.setPostalCode(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_BUSINESSADDRESSPOSTALCODE)));
398 addressee.insertPhoneNumber(KContacts::PhoneNumber(nr, KContacts::PhoneNumber::Fax | KContacts::PhoneNumber::Home));
400 addressee.insertPhoneNumber(KContacts::PhoneNumber(nr, KContacts::PhoneNumber::Fax | KContacts::PhoneNumber::Work));
425QString KTnef::formatTNEFInvitation(const QByteArray &tnef, const MemoryCalendar::Ptr &cal, KCalUtils::InvitationFormatterHelper *h)
void setStatus(PartStat status)
ReqParticipant
void setRole(Role role)
Tentative
NeedsAction
static QString createUniqueId()
static void setApplication(const QString &application, const QString &productID)
QString toString(const Calendar::Ptr &calendar) override
void setType(Type type)
void setStreet(const QString &street)
void setCountry(const QString &country)
void setPostOfficeBox(const QString &postOfficeBox)
void setRegion(const QString ®ion)
void setPostalCode(const QString &code)
void setLocality(const QString &locality)
void addEmail(const Email &email)
void setAdditionalName(const QString &additionalName)
void setOrganization(const QString &organization)
void insertPhoneNumber(const PhoneNumber &phoneNumber)
void setPrefix(const QString &prefix)
void insertCustom(const QString &app, const QString &name, const QString &value)
void setSuffix(const QString &suffix)
void setGivenName(const QString &givenName)
void setNickName(const QString &nickName)
void setBirthday(const QDate &birthday)
void insertAddress(const Address &address)
void setRole(const QString &role)
void setFormattedName(const QString &formattedName)
void setFamilyName(const QString &familyName)
void setUid(const QString &uid)
void setUrl(const ResourceLocatorUrl &url)
void setPreferred(bool preferred)
QByteArray createVCard(const Addressee &addr, Version version=v3_0) const
bool openDevice(QIODevice *device)
Opens the QIODevice device for parsing.
Definition ktnefparser.cpp:545
KTNEFMessage * message() const
Returns the KTNEFMessage used in the parsing process.
Definition ktnefparser.cpp:114
QString findProp(int key, const QString &fallback=QString(), bool convertToUpper=false) const
Finds a property by key, returning a formatted value.
Definition ktnefpropertyset.cpp:56
QString findNamedProp(const QString &name, const QString &fallback=QString(), bool convertToUpper=false) const
Finds a property by name, returning a formatted value.
Definition ktnefpropertyset.cpp:66
QVariant property(int key) const
Returns the property associated with the specified key.
Definition ktnefpropertyset.cpp:108
This file is part of the API for handling TNEF data and provides static Formatter helpers.
KTNEF_EXPORT QString formatTNEFInvitation(const QByteArray &tnef, const KCalendarCore::MemoryCalendar::Ptr &cal, KCalUtils::InvitationFormatterHelper *h)
Formats a TNEF attachment to an HTML mail.
Definition formatter.cpp:425
KTNEF_EXPORT QString msTNEFToVPart(const QByteArray &tnef)
Transforms a TNEF attachment to an iCal or vCard.
Definition formatter.cpp:92
QString i18n(const char *text, const TYPE &arg...)
This file is part of the API for handling TNEF data and provides some basic definitions for general u...
This file is part of the API for handling TNEF data and defines the KTNEFMessage class.
This file is part of the API for handling TNEF data and defines the KTNEFParser class.
KCALUTILS_EXPORT QString formatICalInvitation(const QString &invitation, const KCalendarCore::Calendar::Ptr &calendar, InvitationFormatterHelper *helper)
bool isValid(int year, int month, int day)
bool setDate(int year, int month, int day)
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
bool isValid() const const
QDateTime toLocalTime() const const
const_iterator cbegin() const const
const_iterator cend() const const
bool isEmpty() const const
const QChar at(qsizetype position) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype length() const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
int toInt(bool *ok, int base) const const
QString toUpper() const const
QString trimmed() const const
QStringView left(qsizetype length) const const
int toInt(bool *ok, int base) const const
bool isValid(int h, int m, int s, int ms)
bool setHMS(int h, int m, int s, int ms)
QTimeZone utc()
QDateTime toDateTime() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:13:25 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:13:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.