Akonadi Notes
noteutils.cpp
94 return d->mUrl == a.d_func()->mUrl && d->mDataBase64Encoded == a.d_func()->mDataBase64Encoded && d->mMimetype == a.d_func()->mMimetype
97 return d->mData == a.d_func()->mData && d->mDataBase64Encoded == a.d_func()->mDataBase64Encoded && d->mMimetype == a.d_func()->mMimetype
197 text = msg->mainBodyPart()->decodedText(true); // remove trailing whitespace, so we get rid of " " in empty notes
202 if (msg->mainBodyPart()->contentType(false) && msg->mainBodyPart()->contentType()->mimeType() == "text/html") {
217 if (KMime::Headers::Base *classificationHeader = msg->headerByType(X_NOTES_CLASSIFICATION_HEADER)) {
255 qWarning("Error loading document: %s, line %lld, column %lld", qPrintable(parseResult.errorMessage), parseResult.errorLine, parseResult.errorColumn);
290 qWarning("XML error: Top tag was %s instead of the expected custom", top.tagName().toLatin1().data());
343 Attachment attachment(QUrl(header->asUnicodeString()), QLatin1StringView(part->contentType()->mimeType()));
348 Attachment attachment(part->decodedContent(), QLatin1StringView(part->contentType()->mimeType()));
402 const QString formatDate = QLocale::c().toString(lastModifiedDate, QStringLiteral("ddd, ")) + lastModifiedDate.toString(Qt::RFC2822Date);
437 msg->mainBodyPart()->contentType(true)->setMimeType(d->textFormat == Qt::RichText ? "text/html" : "text/plain");
542 const QRegularExpression rx(QStringLiteral("<body[^>]*>(.*)</body>"), QRegularExpression::CaseInsensitiveOption);
void setContentID(const QString &contentID)
Sets the unique identifier of the attachment.
Definition noteutils.cpp:130
void setDataBase64Encoded(bool encoded)
Set this to true if inline data provided via ctor is already base64 encoded.
Definition noteutils.cpp:118
QString contentID() const
Returns the unique identifier for inline attachment.
Definition noteutils.cpp:136
void setLabel(const QString &label)
Sets the label to be presented to the user.
Definition noteutils.cpp:148
bool dataBase64Encoded() const
Returns true if data is already base64-encoded.
Definition noteutils.cpp:124
A convenience wrapper around KMime::MessagePtr for notes.
Definition noteutils.h:170
QMap< QString, QString > & custom()
Returns a reference to the custom-value map.
Definition noteutils.cpp:554
void setText(const QString &text, Qt::TextFormat format=Qt::PlainText)
Set the text of the note.
Definition noteutils.cpp:515
QList< Attachment > & attachments()
Returns a reference to the list of attachments of the note.
Definition noteutils.cpp:548
void setFrom(const QString &from)
Set the origin (creator) of the note (stored in the mime header) This is usually the application crea...
Definition noteutils.cpp:491
Qt::TextFormat textFormat() const
Definition noteutils.cpp:528
QDateTime lastModifiedDate() const
Returns the lastModified-date of the note.
Definition noteutils.cpp:473
void setClassification(Classification)
Set the classification of the note.
Definition noteutils.cpp:455
void setCreationDate(const QDateTime &creationDate)
Set the creation date of the note (stored in the mime header)
Definition noteutils.cpp:479
void setLastModifiedDate(const QDateTime &lastModifiedDate)
Set the lastModified-date of the note.
Definition noteutils.cpp:467
Classification classification() const
Returns the classification of the note.
Definition noteutils.cpp:461
KMime::MessagePtr message() const
Assemble a KMime message with the given values.
Definition noteutils.cpp:367
QString toPlainText() const
Definition noteutils.cpp:534
Headers::ContentType * contentType(bool create=true)
QByteArray decodedContent()
QByteArray body() const
Headers::ContentID * contentID(bool create=true)
Headers::Base * headerByType(const char *type) const
QByteArray mimeType() const
QByteArray identifier() const
QString i18nc(const char *context, const char *text, const TYPE &arg...)
Type type(const QSqlDatabase &db)
KIOCORE_EXPORT MimetypeJob * mimetype(const QUrl &url, JobFlags flags=DefaultFlags)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QString label(StandardShortcut id)
const QList< QKeySequence > & end()
char * data()
QDateTime currentDateTime()
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
bool isValid() const const
QString toString(QStringView format, QCalendar cal) const const
QDomElement createElement(const QString &tagName)
QDomProcessingInstruction createProcessingInstruction(const QString &target, const QString &data)
QDomText createTextNode(const QString &value)
QDomElement documentElement() const const
ParseResult setContent(QAnyStringView text, ParseOptions options)
QString toString(int indent) const const
void setAttribute(const QString &name, const QString &value)
QString tagName() const const
QString text() const const
QDomNode appendChild(const QDomNode &newChild)
QDomNode firstChild() const const
bool isNull() const const
QDomDocument ownerDocument() const const
QDomElement toElement() const const
QLocale c()
QString toString(QDate date, FormatType format) const const
iterator begin()
iterator end()
iterator insert(const Key &key, const T &value)
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, MatchType matchType, MatchOptions matchOptions) const const
CaseInsensitiveOption
QString captured(QStringView name) const const
QString fromLatin1(QByteArrayView str)
QString mid(qsizetype position, qsizetype n) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString toHtmlEscaped() const const
QByteArray toLatin1() const const
QString trimmed() const const
RFC2822Date
TextFormat
QUuid createUuid()
QString toString(StringFormat mode) const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:32 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:32 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.