Akonadi::NoteUtils::Attachment

Search for usage in LXR

Akonadi::NoteUtils::Attachment Class Reference

#include <noteutils.h>

Public Member Functions

 Attachment ()
 
 Attachment (const Attachment &other)
 
 Attachment (const QByteArray &data, const QString &mimetype)
 
 Attachment (const QUrl &url, const QString &mimetype)
 
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.

Since
4.9

Definition at line 48 of file noteutils.h.

Constructor & Destructor Documentation

◆ Attachment() [1/4]

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

Create an attachment referencing a url only.

Definition at line 68 of file noteutils.cpp.

◆ Attachment() [2/4]

Akonadi::NoteUtils::Attachment::Attachment ( const QUrl & url,
const QString & mimetype )

Definition at line 73 of file noteutils.cpp.

◆ Attachment() [3/4]

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

Create an attachment with the content stored inline.

Definition at line 78 of file noteutils.cpp.

◆ Attachment() [4/4]

Akonadi::NoteUtils::Attachment::Attachment ( const Attachment & other)

Definition at line 83 of file noteutils.cpp.

Member Function Documentation

◆ contentID()

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

Returns the unique identifier for inline attachment.

Since
5.15

Definition at line 136 of file noteutils.cpp.

◆ data()

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

Returns the date for inline attachments.

Definition at line 112 of file noteutils.cpp.

◆ dataBase64Encoded()

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

Returns true if data is already base64-encoded.

Since
5.15

Definition at line 124 of file noteutils.cpp.

◆ label()

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

Returns the label of the attachment.

Definition at line 154 of file noteutils.cpp.

◆ mimetype()

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

Returns the mimetype.

Definition at line 142 of file noteutils.cpp.

◆ operator=()

void Akonadi::NoteUtils::Attachment::operator= ( const Attachment & a)

Definition at line 101 of file noteutils.cpp.

◆ operator==()

bool Akonadi::NoteUtils::Attachment::operator== ( const Attachment & a) const

Definition at line 90 of file noteutils.cpp.

◆ setContentID()

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

Since
5.15

Definition at line 130 of file noteutils.cpp.

◆ setDataBase64Encoded()

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

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

Default value is false.

Since
5.15

Definition at line 118 of file noteutils.cpp.

◆ setLabel()

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

Sets the label to be presented to the user.

Definition at line 148 of file noteutils.cpp.

◆ url()

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

Returns the url for url-only attachments.

Definition at line 106 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-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:06:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.