akonadi
#include <noteutils.h>
Public Types | |
enum | Classification { Public, Private, Confidential } |
Public Member Functions | |
NoteMessageWrapper (const KMime::MessagePtr &) | |
QList< Attachment > & | attachments () |
Classification | classification () const |
KDateTime | creationDate () const |
QMap< QString, QString > & | custom () |
QString | from () const |
KDateTime | lastModifiedDate () const |
KMime::MessagePtr | message () const |
void | setClassification (Classification) |
void | setCreationDate (const KDateTime &creationDate) |
void | setFrom (const QString &from) |
void | setLastModifiedDate (const KDateTime &lastModifiedDate) |
void | setText (const QString &text, Qt::TextFormat format=Qt::PlainText) |
void | setTitle (const QString &title) |
void | setUid (const QString &uid) |
QString | text () const |
Qt::TextFormat | textFormat () const |
QString | title () const |
QString | toPlainText () const |
QString | uid () const |
Detailed Description
A convenience wrapper around KMime::Message::Ptr for notes.
This is the format used by the Akonotes Resource
A note has the following properties: uid: globally unique identifier (generated if empty) creationDate: timestamp when the note was created (generated if empty) lastModified: lastModified (generated if empty) classification: one of private, confidential, public. This is only meant as an indication to the user. title: title of the note text: textual content from: author (generated if empty) attachments: inline or url only custom: key value pair for custom values
Reading a note from an Akonotes akonadi item:
Setting the note as payload of an akonadi Item
- Since
- 4.8
Definition at line 145 of file noteutils.h.
Member Function Documentation
QList< Attachment > & Akonadi::NoteUtils::NoteMessageWrapper::attachments | ( | ) |
Returns a reference to the list of attachments of the note.
Definition at line 517 of file noteutils.cpp.
NoteMessageWrapper::Classification Akonadi::NoteUtils::NoteMessageWrapper::classification | ( | ) | const |
Returns the classification of the note.
Definition at line 429 of file noteutils.cpp.
KDateTime Akonadi::NoteUtils::NoteMessageWrapper::creationDate | ( | ) | const |
Returns the creation date of the note.
Definition at line 453 of file noteutils.cpp.
QMap< QString, QString > & Akonadi::NoteUtils::NoteMessageWrapper::custom | ( | ) |
Returns a reference to the custom-value map.
- Returns
- key-value map containing all custom values
Definition at line 523 of file noteutils.cpp.
QString Akonadi::NoteUtils::NoteMessageWrapper::from | ( | ) | const |
Returns the origin (creator) of the note.
Definition at line 465 of file noteutils.cpp.
KDateTime Akonadi::NoteUtils::NoteMessageWrapper::lastModifiedDate | ( | ) | const |
Returns the lastModified-date of the note.
Definition at line 441 of file noteutils.cpp.
KMime::Message::Ptr Akonadi::NoteUtils::NoteMessageWrapper::message | ( | ) | const |
Assemble a KMime message with the given values.
The message can then i.e. be stored inside an akonadi item
Definition at line 345 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setClassification | ( | NoteMessageWrapper::Classification | classification | ) |
Set the classification of the note.
Definition at line 423 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setCreationDate | ( | const KDateTime & | creationDate | ) |
Set the creation date of the note (stored in the mime header)
Definition at line 447 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setFrom | ( | const QString & | from | ) |
Set the origin (creator) of the note (stored in the mime header) This is usually the application creating the note.
- Parameters
-
from must be an address in the style of foo@k. de.o rg
Definition at line 459 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setLastModifiedDate | ( | const KDateTime & | lastModifiedDate | ) |
Set the lastModified-date of the note.
Definition at line 435 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setText | ( | const QString & | text, |
Qt::TextFormat | format = Qt::PlainText |
||
) |
Set the text of the note.
- Parameters
-
format only Qt::PlainText and Qt::RichText is supported
Definition at line 483 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setTitle | ( | const QString & | title | ) |
Set the title of the note.
Definition at line 471 of file noteutils.cpp.
void Akonadi::NoteUtils::NoteMessageWrapper::setUid | ( | const QString & | uid | ) |
Set the uid of the note.
- Parameters
-
uid should be globally unique
Definition at line 411 of file noteutils.cpp.
QString Akonadi::NoteUtils::NoteMessageWrapper::text | ( | ) | const |
Returns the text of the note.
Definition at line 490 of file noteutils.cpp.
Qt::TextFormat Akonadi::NoteUtils::NoteMessageWrapper::textFormat | ( | ) | const |
- Returns
- Qt::PlainText or Qt::RichText
Definition at line 496 of file noteutils.cpp.
QString Akonadi::NoteUtils::NoteMessageWrapper::title | ( | ) | const |
Returns the title of the note.
Definition at line 477 of file noteutils.cpp.
QString Akonadi::NoteUtils::NoteMessageWrapper::toPlainText | ( | ) | const |
- Returns
- plaintext version of the text (if richtext)
Definition at line 502 of file noteutils.cpp.
QString Akonadi::NoteUtils::NoteMessageWrapper::uid | ( | ) | const |
Returns the uid of the note.
Definition at line 417 of file noteutils.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.