MessageComposer::Recipient Class

The Recipient class. More...

Header: #include <MessageComposer/Recipient>
CMake: find_package(KPim6MessageComposer REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::MessageComposer)

Public Functions

Recipient(const QString &email = QString(), MessageComposer::Recipient::Type type = To)
virtual ~Recipient() override
QString email() const
Kleo::Action encryptionAction() const
GpgME::Key key() const
QString name() const
void setEmail(const QString &email)
void setEncryptionAction(const Kleo::Action action)
void setKey(const GpgME::Key &key)
void setName(const QString &name)
void setType(MessageComposer::Recipient::Type type)
MessageComposer::Recipient::Type type() const
QString typeLabel() const

Reimplemented Public Functions

virtual void clear() override
virtual bool isEmpty() const override

Static Public Members

QStringList allTypeLabels()
MessageComposer::Recipient::Type idToType(int id)
QString typeLabel(MessageComposer::Recipient::Type type)
int typeToId(MessageComposer::Recipient::Type type)

Detailed Description

Member Function Documentation

Recipient::Recipient(const QString &email = QString(), MessageComposer::Recipient::Type type = To)

Constructs a Recipient. email The email address of the recipient (optional). type The type of recipient (To, Cc, Bcc, etc.).

[override virtual noexcept] Recipient::~Recipient()

Destroys the Recipient.

[static] QStringList Recipient::allTypeLabels()

Returns all localized labels for all recipient types.

[override virtual] void Recipient::clear()

Clears all data from this recipient.

QString Recipient::email() const

Returns the email address of this recipient.

See also setEmail().

Kleo::Action Recipient::encryptionAction() const

Returns the encryption action for this recipient.

See also setEncryptionAction().

[static] MessageComposer::Recipient::Type Recipient::idToType(int id)

Converts a numeric ID back to a recipient type. id The numeric ID. Returns The recipient type.

[override virtual] bool Recipient::isEmpty() const

Returns whether this recipient is empty.

GpgME::Key Recipient::key() const

Returns the OpenPGP key for this recipient.

See also setKey().

QString Recipient::name() const

Returns the display name of this recipient.

See also setName().

void Recipient::setEmail(const QString &email)

Sets the email address of this recipient. email The email address.

See also email().

void Recipient::setEncryptionAction(const Kleo::Action action)

Sets the encryption action for this recipient. action The encryption action to use.

See also encryptionAction().

void Recipient::setKey(const GpgME::Key &key)

Sets the OpenPGP key for this recipient. key The OpenPGP key.

See also key().

void Recipient::setName(const QString &name)

Sets the display name of this recipient. name The recipient's name.

See also name().

void Recipient::setType(MessageComposer::Recipient::Type type)

Sets the type of this recipient. type The recipient type.

See also type().

MessageComposer::Recipient::Type Recipient::type() const

Returns the type of this recipient.

See also setType().

QString Recipient::typeLabel() const

Returns the localized label for this recipient type.

[static] QString Recipient::typeLabel(MessageComposer::Recipient::Type type)

Returns the localized label for the given recipient type. type The recipient type. Returns The localized label.

[static] int Recipient::typeToId(MessageComposer::Recipient::Type type)

Converts a recipient type enum to its numeric ID. type The recipient type. Returns The numeric ID for the type.