Akonadi::NoteUtils::Attachment Class Reference

#include <noteutils.h>

Public Member Functions

 Attachment ()
 Attachment (const QUrl &url, const QString &mimetype)
 Attachment (const QByteArray &data, const QString &mimetype)
 Attachment (const Attachment &other)
QString contentID () const
QByteArray data () const
bool dataBase64Encoded () const
QString label () const
QString mimetype () const
void operator= (const Attachment &a)
bool operator== (const Attachment &a) const
void setContentID (const QString &contentID)
void setDataBase64Encoded (bool encoded)
void setLabel (const QString &label)
QUrl url () const

Detailed Description

An attachment for a note.


Definition at line 45 of file noteutils.h.

Constructor & Destructor Documentation

Akonadi::NoteUtils::Attachment::Attachment ( )

Create an attachment referencing a url only.

Definition at line 69 of file noteutils.cpp.

Akonadi::NoteUtils::Attachment::Attachment ( const QByteArray data,
const QString mimetype 

Create an attachment with the content stored inline.

Definition at line 80 of file noteutils.cpp.

Member Function Documentation

QString Akonadi::NoteUtils::Attachment::contentID ( ) const

Returns the unique identifier for inline attachment.


Definition at line 147 of file noteutils.cpp.

QByteArray Akonadi::NoteUtils::Attachment::data ( ) const

Returns the date for inline attachments.

Definition at line 123 of file noteutils.cpp.

bool Akonadi::NoteUtils::Attachment::dataBase64Encoded ( ) const

Returns true if data is already base64-encoded.


Definition at line 135 of file noteutils.cpp.

QString Akonadi::NoteUtils::Attachment::label ( ) const

Returns the label of the attachment.

Definition at line 165 of file noteutils.cpp.

QString Akonadi::NoteUtils::Attachment::mimetype ( ) const

Returns the mimetype.

Definition at line 153 of file noteutils.cpp.

void Akonadi::NoteUtils::Attachment::setContentID ( const QString contentID)

Sets the unique identifier of the attachment.

It can be used to refer to attachment from the note itself


Definition at line 141 of file noteutils.cpp.

void Akonadi::NoteUtils::Attachment::setDataBase64Encoded ( bool  encoded)

Set this to true if inline data provided via ctor is alredy base64 encoded.

Default value is false.


Definition at line 129 of file noteutils.cpp.

void Akonadi::NoteUtils::Attachment::setLabel ( const QString label)

Sets the label to be presented to the user.

Definition at line 159 of file noteutils.cpp.

QUrl Akonadi::NoteUtils::Attachment::url ( ) const

Returns the url for url-only attachments.

Definition at line 117 of file noteutils.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 23:13:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.