Search for usage in LXR

#include <identity.h>

Public Types

using List = QVector< Identity >

Public Member Functions

 Identity (const QString &id=QString(), const QString &realName=QString(), const QString &emailAddr=QString(), const QString &organization=QString(), const QString &replyToAddress=QString())
bool attachVcard () const
QString autocorrectionLanguage () const
bool autocryptEnabled () const
QString bcc () const
QString cc () const
QString defaultDomainName () const
QString dictionary () const
bool disabledFcc () const
QString drafts () const
const QStringList emailAliases () const
QString face () const
QString fcc () const
QString fullEmailAddr () const
QString fullName () const
QString identityName () const
bool isDefault () const
bool isFaceEnabled () const
bool isNull () const
bool isXFaceEnabled () const
bool mailingAllowed () const
bool matchesEmailAddress (const QString &addr) const
bool operator!= (const Identity &other) const
bool operator< (const Identity &other) const
bool operator<= (const Identity &other) const
bool operator== (const Identity &other) const
bool operator> (const Identity &other) const
bool operator>= (const Identity &other) const
QString organization () const
bool pgpAutoEncrypt () const
bool pgpAutoSign () const
QByteArray pgpEncryptionKey () const
QByteArray pgpSigningKey () const
void populateMimeData (QMimeData *) const
QString preferredCryptoMessageFormat () const
QString primaryEmailAddress () const
QVariant property (const QString &key) const
void readConfig (const KConfigGroup &)
QString replyToAddr () const
void setAttachVcard (bool attach)
void setAutocorrectionLanguage (const QString &language)
void setAutocryptEnabled (const bool)
void setBcc (const QString &)
void setCc (const QString &)
void setDefaultDomainName (const QString &domainName)
void setDictionary (const QString &)
void setDisabledFcc (bool)
void setDrafts (const QString &)
void setEmailAliases (const QStringList &aliases)
void setFace (const QString &)
void setFaceEnabled (bool)
void setFcc (const QString &)
void setFullName (const QString &)
void setIdentityName (const QString &name)
void setIsDefault (bool flag)
void setOrganization (const QString &)
void setPgpAutoEncrypt (bool)
void setPgpAutoSign (bool)
void setPGPEncryptionKey (const QByteArray &key)
void setPGPSigningKey (const QByteArray &key)
void setPreferredCryptoMessageFormat (const QString &)
void setPrimaryEmailAddress (const QString &email)
void setProperty (const QString &key, const QVariant &value)
void setReplyToAddr (const QString &)
void setSignature (const Signature &sig)
void setSMIMEEncryptionKey (const QByteArray &key)
void setSMIMESigningKey (const QByteArray &key)
void setTemplates (const QString &)
void setTransport (const QString &)
void setUoid (uint aUoid)
void setVCardFile (const QString &)
void setXFace (const QString &)
void setXFaceEnabled (bool)
Signaturesignature ()
bool signatureIsInlinedHtml () const
QString signatureText (bool *ok=nullptr) const
QByteArray smimeEncryptionKey () const
QByteArray smimeSigningKey () const
QString templates () const
QString transport () const
uint uoid () const
QString vCardFile () const
void writeConfig (KConfigGroup &) const
QString xface () const

Static Public Member Functions

static bool canDecode (const QMimeData *)
static Identity fromMimeData (const QMimeData *)
static QString mimeDataType ()
static const Identitynull ()

Protected Member Functions

void setSignatureFile (const QString &)
void setSignatureInlineText (const QString &)
QString signatureFile () const
QString signatureInlineText () const
bool signatureIsCommand () const
bool signatureIsInline () const
bool signatureIsPlainFile () const
bool useSignatureFile () const
QString verifyAkonadiId (const QString &str) const

Protected Attributes

bool mIsDefault = false
QHash< QString, QVariantmPropertiesMap
Signature mSignature


KIDENTITYMANAGEMENT_EXPORT QDataStreamoperator<< (QDataStream &stream, const KIdentityManagement::Identity &ident)
KIDENTITYMANAGEMENT_EXPORT QDataStreamoperator>> (QDataStream &stream, KIdentityManagement::Identity &ident)

Detailed Description

User identity information.

Definition at line 67 of file identity.h.

Constructor & Destructor Documentation

Identity::Identity ( const QString id = QString(),
const QString realName = QString(),
const QString emailAddr = QString(),
const QString organization = QString(),
const QString replyToAddress = QString() 


Definition at line 24 of file identity.cpp.

Member Function Documentation

bool Identity::attachVcard ( ) const

Definition at line 378 of file identity.cpp.

QString Identity::autocorrectionLanguage ( ) const

Definition at line 481 of file identity.cpp.

bool KIdentityManagement::Identity::autocryptEnabled ( ) const

Definition at line 721 of file identity.cpp.

QString Identity::bcc ( ) const

email addresses for the BCC: field

Definition at line 388 of file identity.cpp.

QString Identity::cc ( ) const

email addresses for the CC: field


Definition at line 393 of file identity.cpp.

QString Identity::defaultDomainName ( ) const

Definition at line 736 of file identity.cpp.

QString Identity::dictionary ( ) const

Dictionary which should be used for spell checking.

Note that this is the localized language name (e.g. "British English"), not the language code or dictionary name!

Definition at line 423 of file identity.cpp.

bool Identity::disabledFcc ( ) const

Definition at line 676 of file identity.cpp.

QString Identity::drafts ( ) const

The folder where draft messages from this identity will be stored by default.

Definition at line 434 of file identity.cpp.

const QStringList Identity::emailAliases ( ) const

email address aliases


Definition at line 368 of file identity.cpp.

QString Identity::face ( ) const

a Face header for this identity

Definition at line 418 of file identity.cpp.

QString Identity::fcc ( ) const

The folder where sent messages from this identity will be stored by default.

Definition at line 440 of file identity.cpp.

QString Identity::fullEmailAddr ( ) const

email address in the format "username <[email protected]>" suitable for the "From:" field of email messages.

Definition at line 267 of file identity.cpp.

QString Identity::fullName ( ) const

Full name of the user.

Definition at line 328 of file identity.cpp.

QString Identity::identityName ( ) const

Identity/nickname for this collection.

Definition at line 303 of file identity.cpp.

bool Identity::isDefault ( ) const
whether this identity is the default identity

Definition at line 318 of file identity.cpp.

bool Identity::isNull ( ) const

Returns true when the identity contains no values, all null values or only empty values.

Definition at line 50 of file identity.cpp.

bool Identity::mailingAllowed ( ) const

Tests if there are enough values set to allow mailing.

Definition at line 113 of file identity.cpp.

bool Identity::matchesEmailAddress ( const QString addr) const
addrthe email address to check
true if this identity contains the email address addr, either as primary address or as alias

Definition at line 654 of file identity.cpp.

bool Identity::operator!= ( const Identity other) const

used for comparison

Definition at line 251 of file identity.cpp.

bool Identity::operator< ( const Identity other) const

used for sorting

Definition at line 190 of file identity.cpp.

bool Identity::operator<= ( const Identity other) const

used for sorting

Definition at line 212 of file identity.cpp.

bool Identity::operator== ( const Identity other) const

used for comparison

Definition at line 222 of file identity.cpp.

bool Identity::operator> ( const Identity other) const

used for sorting

Definition at line 201 of file identity.cpp.

bool Identity::operator>= ( const Identity other) const

used for sorting

Definition at line 217 of file identity.cpp.

QString Identity::organization ( ) const

The user's organization (optional)

Definition at line 333 of file identity.cpp.

bool Identity::pgpAutoEncrypt ( ) const

Definition at line 706 of file identity.cpp.

bool Identity::pgpAutoSign ( ) const

Definition at line 691 of file identity.cpp.

QByteArray Identity::pgpEncryptionKey ( ) const

The user's OpenPGP encryption key.

Definition at line 338 of file identity.cpp.

QByteArray Identity::pgpSigningKey ( ) const

The user's OpenPGP signing key.

Definition at line 343 of file identity.cpp.

QString Identity::primaryEmailAddress ( ) const

primary email address (without the user name - only [email protected]).

The primary email address is used for all outgoing mail.


Definition at line 363 of file identity.cpp.

QVariant Identity::property ( const QString key) const

Get random properties.

keythe key of the property to get

Definition at line 258 of file identity.cpp.

void Identity::readConfig ( const KConfigGroup config)

Read configuration from config.

Group must be preset (or use KConfigGroup). Called from IdentityManager.

Definition at line 82 of file identity.cpp.

QString Identity::replyToAddr ( ) const

email address for the ReplyTo: field

Definition at line 383 of file identity.cpp.

void Identity::setIdentityName ( const QString name)

Identity/nickname for this collection.

Definition at line 506 of file identity.cpp.

void Identity::setIsDefault ( bool  flag)

Set whether this identity is the default identity.

Since this affects all other identities, too (most notably, the old default identity), only the IdentityManager can change this. You should use

kmkernel->identityManager()->setAsDefault( name_of_default )


Definition at line 611 of file identity.cpp.

void Identity::setProperty ( const QString key,
const QVariant value 

Set random properties, when value is empty (for QStrings) or null, the property is deleted.

Definition at line 488 of file identity.cpp.

void Identity::setUoid ( uint  aUoid)

set the uiod

aUoidthe uoid to set

Definition at line 501 of file identity.cpp.

QString Identity::signatureFile ( ) const

name of the signature file (with path)

Definition at line 476 of file identity.cpp.

QString Identity::signatureInlineText ( ) const

inline signature

Definition at line 471 of file identity.cpp.

bool Identity::signatureIsCommand ( ) const
true if the signature is read from the output of a command

Definition at line 451 of file identity.cpp.

bool Identity::signatureIsInline ( ) const
true if the signature was specified directly

Definition at line 461 of file identity.cpp.

bool Identity::signatureIsInlinedHtml ( ) const
true if the inlined signature is html formatted

Definition at line 313 of file identity.cpp.

bool Identity::signatureIsPlainFile ( ) const
true if the signature is read from a text file

Definition at line 456 of file identity.cpp.

QString Identity::signatureText ( bool *  ok = nullptr) const
the signature with '–
' prepended to it if it is not present already. No newline in front of or after the signature is added.
okif a valid bool pointer, it is set to true or false depending on whether the signature could successfully be obtained.

Definition at line 308 of file identity.cpp.

QByteArray Identity::smimeEncryptionKey ( ) const

The user's S/MIME encryption key.

Definition at line 348 of file identity.cpp.

QByteArray Identity::smimeSigningKey ( ) const

The user's S/MIME signing key.

Definition at line 353 of file identity.cpp.

QString Identity::templates ( ) const

The folder where template messages from this identity will be stored by default.

Definition at line 428 of file identity.cpp.

QString Identity::transport ( ) const

The transport that is set for this identity.

Used to link a transport with an identity.

Definition at line 446 of file identity.cpp.

uint Identity::uoid ( ) const

Unique Object Identifier for this identity.

Definition at line 323 of file identity.cpp.

bool Identity::useSignatureFile ( ) const

Inline or signature from a file.

Definition at line 466 of file identity.cpp.

QString Identity::vCardFile ( ) const

vCard to attach to outgoing emails

Definition at line 373 of file identity.cpp.

QString Identity::verifyAkonadiId ( const QString str) const

during migration when it failed it can be a string => not a qlonglong akonadi::id => fix it

Definition at line 746 of file identity.cpp.

void Identity::writeConfig ( KConfigGroup config) const

Write configuration to config.

Group must be preset (or use KConfigGroup). Called from IdentityManager.

Definition at line 101 of file identity.cpp.

QString Identity::xface ( ) const

a X-Face header for this identity

Definition at line 408 of file identity.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jan 20 2022 23:04:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.