KIdentityManagementCore::Identity
#include <identity.h>
Public Types | |
using | Id = uint |
using | List = QList<Identity> |
Static Public Member Functions | |
static bool | canDecode (const QMimeData *) |
static Identity | fromMimeData (const QMimeData *) |
static QString | mimeDataType () |
static const Identity & | null () |
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, QVariant > | mPropertiesMap |
Signature | mSignature |
Detailed Description
User identity information.
Definition at line 75 of file identity.h.
Member Typedef Documentation
◆ Id
using KIdentityManagementCore::Identity::Id = uint |
Definition at line 133 of file identity.h.
◆ List
Definition at line 132 of file identity.h.
Property Documentation
◆ attachVcard
|
readwrite |
Definition at line 95 of file identity.h.
◆ autocorrectionLanguage
|
readwrite |
Definition at line 96 of file identity.h.
◆ autocryptEnabled
|
readwrite |
Definition at line 100 of file identity.h.
◆ autocryptPrefer
|
readwrite |
Definition at line 101 of file identity.h.
◆ bcc
|
readwrite |
Definition at line 93 of file identity.h.
◆ cc
|
readwrite |
Definition at line 94 of file identity.h.
◆ defaultDomainName
|
readwrite |
Definition at line 105 of file identity.h.
◆ dictionary
|
readwrite |
Definition at line 113 of file identity.h.
◆ disabledFcc
|
readwrite |
Definition at line 97 of file identity.h.
◆ disabledSpam
|
readwrite |
Definition at line 121 of file identity.h.
◆ drafts
|
readwrite |
Definition at line 111 of file identity.h.
◆ emailAliases
|
readwrite |
Definition at line 89 of file identity.h.
◆ encryptionOverride
|
readwrite |
Definition at line 102 of file identity.h.
◆ face
|
readwrite |
Definition at line 116 of file identity.h.
◆ fcc
|
readwrite |
Definition at line 110 of file identity.h.
◆ fullEmailAddr
|
read |
Definition at line 91 of file identity.h.
◆ fullName
|
readwrite |
Definition at line 81 of file identity.h.
◆ identityName
|
readwrite |
Definition at line 80 of file identity.h.
◆ isFaceEnabled
|
readwrite |
Definition at line 117 of file identity.h.
◆ isNull
|
read |
Definition at line 119 of file identity.h.
◆ isXFaceEnabled
|
readwrite |
Definition at line 115 of file identity.h.
◆ mailingAllowed
|
read |
Definition at line 79 of file identity.h.
◆ organization
|
readwrite |
Definition at line 82 of file identity.h.
◆ pgpAutoEncrypt
|
readwrite |
Definition at line 99 of file identity.h.
◆ pgpAutoSign
|
readwrite |
Definition at line 98 of file identity.h.
◆ pgpEncryptionKey
|
readwrite |
Definition at line 83 of file identity.h.
◆ pgpSigningKey
|
readwrite |
Definition at line 84 of file identity.h.
◆ preferredCryptoMessageFormat
|
readwrite |
Definition at line 87 of file identity.h.
◆ primaryEmailAddress
|
readwrite |
Definition at line 88 of file identity.h.
◆ replyToAddr
|
readwrite |
Definition at line 92 of file identity.h.
◆ signature
|
readwrite |
Definition at line 106 of file identity.h.
◆ signatureIsInlinedHtml
|
read |
Definition at line 108 of file identity.h.
◆ signatureText
|
read |
Definition at line 107 of file identity.h.
◆ smimeEncryptionKey
|
readwrite |
Definition at line 85 of file identity.h.
◆ smimeSigningKey
|
readwrite |
Definition at line 86 of file identity.h.
◆ spam
|
readwrite |
Definition at line 120 of file identity.h.
◆ templates
|
readwrite |
Definition at line 112 of file identity.h.
◆ transport
|
readwrite |
Definition at line 109 of file identity.h.
◆ uoid
|
read |
Definition at line 118 of file identity.h.
◆ vCardFile
|
readwrite |
Definition at line 90 of file identity.h.
◆ warnNotEncrypt
|
readwrite |
Definition at line 104 of file identity.h.
◆ warnNotSign
|
readwrite |
Definition at line 103 of file identity.h.
◆ xface
|
readwrite |
Definition at line 114 of file identity.h.
Constructor & Destructor Documentation
◆ Identity()
|
explicit |
Constructor.
Definition at line 25 of file identity.cpp.
Member Function Documentation
◆ activities()
|
nodiscard |
Definition at line 585 of file identity.cpp.
◆ attachVcard()
|
nodiscard |
- Returns
- true if the Vcard of this identity should be attached to outgoing mail.
- Since
- 4.10
Definition at line 406 of file identity.cpp.
◆ autocorrectionLanguage()
|
nodiscard |
- Returns
- The default language for spell checking of this identity.
- Since
- 4.10
Definition at line 515 of file identity.cpp.
◆ autocryptEnabled()
|
nodiscard |
- Returns
- true if Autocrypt is enabled for this identity.
- Since
- 5.17
Definition at line 795 of file identity.cpp.
◆ autocryptPrefer()
|
nodiscard |
- Returns
- true if Autocrypt is preferred for this identity.
- Since
- 5.22
Definition at line 810 of file identity.cpp.
◆ bcc()
|
nodiscard |
- Returns
- The email addresses for the BCC: field
Definition at line 416 of file identity.cpp.
◆ canDecode()
|
staticnodiscard |
Definition at line 139 of file identity.cpp.
◆ cc()
|
nodiscard |
◆ defaultDomainName()
|
nodiscard |
◆ dictionary()
|
nodiscard |
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 451 of file identity.cpp.
◆ disabledFcc()
|
nodiscard |
- Returns
- true if Fcc is disabled for this identity.
- Since
- 4.11
Definition at line 735 of file identity.cpp.
◆ disabledSpam()
|
nodiscard |
- Returns
- true if Spam is disabled for this identity.
- Since
- 6.5
Definition at line 750 of file identity.cpp.
◆ drafts()
|
nodiscard |
The folder where draft messages from this identity will be stored by default.
Definition at line 462 of file identity.cpp.
◆ emailAliases()
|
nodiscard |
◆ enabledActivities()
|
nodiscard |
Definition at line 595 of file identity.cpp.
◆ encryptionOverride()
|
nodiscard |
- Returns
- true if the warnNotSign and warnNotEncrypt identity configuration should overwrite the global app-wide configuration.
- Since
- 5.22
Definition at line 825 of file identity.cpp.
◆ face()
|
nodiscard |
a Face header for this identity
Definition at line 446 of file identity.cpp.
◆ fcc()
|
nodiscard |
The folder where sent messages from this identity will be stored by default.
Definition at line 468 of file identity.cpp.
◆ fromMimeData()
Definition at line 158 of file identity.cpp.
◆ fullEmailAddr()
|
nodiscard |
The email address in the format "username <name@host>" suitable for the "From:" field of email messages.
Definition at line 295 of file identity.cpp.
◆ fullName()
|
nodiscard |
Full name of the user.
Definition at line 356 of file identity.cpp.
◆ identityName()
|
nodiscard |
Identity/nickname for this collection.
Definition at line 331 of file identity.cpp.
◆ isDefault()
|
nodiscard |
- Returns
- whether this identity is the default identity
Definition at line 346 of file identity.cpp.
◆ isFaceEnabled()
|
nodiscard |
Definition at line 441 of file identity.cpp.
◆ isNull()
|
nodiscard |
Returns true when the identity contains no values, all null values or only empty values.
Definition at line 49 of file identity.cpp.
◆ isXFaceEnabled()
|
nodiscard |
Definition at line 431 of file identity.cpp.
◆ mailingAllowed()
|
nodiscard |
Tests if there are enough values set to allow mailing.
Definition at line 129 of file identity.cpp.
◆ matchesEmailAddress()
|
nodiscard |
- Parameters
-
addr the email address to check
- Returns
- true if this identity contains the email address
addr
, either as primary address or as alias
- Since
- 4.6
Definition at line 713 of file identity.cpp.
◆ mimeDataType()
|
staticnodiscard |
Definition at line 134 of file identity.cpp.
◆ null()
|
static |
Definition at line 41 of file identity.cpp.
◆ operator!=()
bool Identity::operator!= | ( | const Identity & | other | ) | const |
used for comparison
Definition at line 279 of file identity.cpp.
◆ operator<()
bool Identity::operator< | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 218 of file identity.cpp.
◆ operator<=()
bool Identity::operator<= | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 240 of file identity.cpp.
◆ operator==()
bool Identity::operator== | ( | const Identity & | other | ) | const |
used for comparison
Definition at line 250 of file identity.cpp.
◆ operator>()
bool Identity::operator> | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 229 of file identity.cpp.
◆ operator>=()
bool Identity::operator>= | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 245 of file identity.cpp.
◆ organization()
|
nodiscard |
The user's organization (optional)
Definition at line 361 of file identity.cpp.
◆ pgpAutoEncrypt()
|
nodiscard |
- Returns
- true if we should encrypt message sent by this identity by default.
- Since
- 5.4
Definition at line 780 of file identity.cpp.
◆ pgpAutoSign()
|
nodiscard |
- Returns
- true if we should sign message sent by this identity by default.
- Since
- 4.12
Definition at line 765 of file identity.cpp.
◆ pgpEncryptionKey()
|
nodiscard |
The user's OpenPGP encryption key.
Definition at line 366 of file identity.cpp.
◆ pgpSigningKey()
|
nodiscard |
The user's OpenPGP signing key.
Definition at line 371 of file identity.cpp.
◆ populateMimeData()
void Identity::populateMimeData | ( | QMimeData * | md | ) | const |
Definition at line 148 of file identity.cpp.
◆ preferredCryptoMessageFormat()
|
nodiscard |
Definition at line 386 of file identity.cpp.
◆ primaryEmailAddress()
|
nodiscard |
The primary email address (without the user name - only name@host).
This email address is used for all outgoing mail.
- Since
- 4.6
Definition at line 391 of file identity.cpp.
◆ property()
Get random properties.
- Parameters
-
key the key of the property to get
Definition at line 286 of file identity.cpp.
◆ readConfig()
void Identity::readConfig | ( | const KConfigGroup & | config | ) |
Read configuration from config.
Group must be preset (or use KConfigGroup). Called from IdentityManager.
Definition at line 87 of file identity.cpp.
◆ replyToAddr()
|
nodiscard |
- Returns
- The email address for the ReplyTo: field
Definition at line 411 of file identity.cpp.
◆ setActivities()
void Identity::setActivities | ( | const QStringList & | a | ) |
Definition at line 590 of file identity.cpp.
◆ setAttachVcard()
void Identity::setAttachVcard | ( | bool | attach | ) |
Definition at line 610 of file identity.cpp.
◆ setAutocorrectionLanguage()
void Identity::setAutocorrectionLanguage | ( | const QString & | language | ) |
Definition at line 730 of file identity.cpp.
◆ setAutocryptEnabled()
void Identity::setAutocryptEnabled | ( | const bool | on | ) |
Definition at line 805 of file identity.cpp.
◆ setAutocryptPrefer()
void Identity::setAutocryptPrefer | ( | const bool | on | ) |
Definition at line 820 of file identity.cpp.
◆ setBcc()
void Identity::setBcc | ( | const QString & | str | ) |
Definition at line 660 of file identity.cpp.
◆ setCc()
void Identity::setCc | ( | const QString & | str | ) |
Definition at line 665 of file identity.cpp.
◆ setDefaultDomainName()
void Identity::setDefaultDomainName | ( | const QString & | domainName | ) |
Definition at line 875 of file identity.cpp.
◆ setDictionary()
void Identity::setDictionary | ( | const QString & | str | ) |
Definition at line 655 of file identity.cpp.
◆ setDisabledFcc()
void Identity::setDisabledFcc | ( | bool | disable | ) |
Definition at line 745 of file identity.cpp.
◆ setDisabledSpam()
void Identity::setDisabledSpam | ( | bool | disable | ) |
Definition at line 760 of file identity.cpp.
◆ setDrafts()
void Identity::setDrafts | ( | const QString & | str | ) |
Definition at line 645 of file identity.cpp.
◆ setEmailAliases()
void Identity::setEmailAliases | ( | const QStringList & | aliases | ) |
Definition at line 580 of file identity.cpp.
◆ setEnabledActivities()
void Identity::setEnabledActivities | ( | bool | a | ) |
Definition at line 600 of file identity.cpp.
◆ setEncryptionOverride()
void Identity::setEncryptionOverride | ( | const bool | on | ) |
Definition at line 835 of file identity.cpp.
◆ setFace()
void Identity::setFace | ( | const QString & | str | ) |
Definition at line 694 of file identity.cpp.
◆ setFaceEnabled()
void Identity::setFaceEnabled | ( | bool | on | ) |
Definition at line 703 of file identity.cpp.
◆ setFcc()
void Identity::setFcc | ( | const QString & | str | ) |
Definition at line 635 of file identity.cpp.
◆ setFullName()
void Identity::setFullName | ( | const QString & | str | ) |
Definition at line 545 of file identity.cpp.
◆ setIdentityName()
void Identity::setIdentityName | ( | const QString & | name | ) |
Identity/nickname for this collection.
Definition at line 540 of file identity.cpp.
◆ setIsDefault()
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 )
instead.
Definition at line 670 of file identity.cpp.
◆ setOrganization()
void Identity::setOrganization | ( | const QString & | str | ) |
Definition at line 550 of file identity.cpp.
◆ setPgpAutoEncrypt()
void Identity::setPgpAutoEncrypt | ( | bool | autoEncrypt | ) |
Definition at line 790 of file identity.cpp.
◆ setPgpAutoSign()
void Identity::setPgpAutoSign | ( | bool | autoSign | ) |
Definition at line 775 of file identity.cpp.
◆ setPGPEncryptionKey()
void Identity::setPGPEncryptionKey | ( | const QByteArray & | key | ) |
Definition at line 560 of file identity.cpp.
◆ setPGPSigningKey()
void Identity::setPGPSigningKey | ( | const QByteArray & | key | ) |
Definition at line 555 of file identity.cpp.
◆ setPreferredCryptoMessageFormat()
void Identity::setPreferredCryptoMessageFormat | ( | const QString & | str | ) |
Definition at line 675 of file identity.cpp.
◆ setPrimaryEmailAddress()
void Identity::setPrimaryEmailAddress | ( | const QString & | ) |
Definition at line 575 of file identity.cpp.
◆ setProperty()
Set random properties, when value
is empty (for QStrings) or null, the property is deleted.
Definition at line 522 of file identity.cpp.
◆ setReplyToAddr()
void Identity::setReplyToAddr | ( | const QString & | str | ) |
Definition at line 615 of file identity.cpp.
◆ setSignature()
void Identity::setSignature | ( | const Signature & | sig | ) |
Definition at line 708 of file identity.cpp.
◆ setSignatureFile()
|
protected |
Definition at line 620 of file identity.cpp.
◆ setSignatureInlineText()
|
protected |
Definition at line 625 of file identity.cpp.
◆ setSMIMEEncryptionKey()
void Identity::setSMIMEEncryptionKey | ( | const QByteArray & | key | ) |
Definition at line 570 of file identity.cpp.
◆ setSMIMESigningKey()
void Identity::setSMIMESigningKey | ( | const QByteArray & | key | ) |
Definition at line 565 of file identity.cpp.
◆ setSpam()
void Identity::setSpam | ( | const QString & | str | ) |
Definition at line 640 of file identity.cpp.
◆ setTemplates()
void Identity::setTemplates | ( | const QString & | str | ) |
Definition at line 650 of file identity.cpp.
◆ setTransport()
void Identity::setTransport | ( | const QString & | str | ) |
Definition at line 630 of file identity.cpp.
◆ setUoid()
void Identity::setUoid | ( | uint | aUoid | ) |
◆ setVCardFile()
void Identity::setVCardFile | ( | const QString & | str | ) |
Definition at line 605 of file identity.cpp.
◆ setWarnNotEncrypt()
void Identity::setWarnNotEncrypt | ( | const bool | on | ) |
Definition at line 850 of file identity.cpp.
◆ setWarnNotSign()
void Identity::setWarnNotSign | ( | const bool | on | ) |
Definition at line 865 of file identity.cpp.
◆ setXFace()
void Identity::setXFace | ( | const QString & | str | ) |
Definition at line 680 of file identity.cpp.
◆ setXFaceEnabled()
void Identity::setXFaceEnabled | ( | bool | on | ) |
Definition at line 689 of file identity.cpp.
◆ signature()
|
nodiscard |
- Returns
- The signature of the identity.
- Warning
- This method is not const.
◆ signatureFile()
|
nodiscardprotected |
name of the signature file (with path)
Definition at line 510 of file identity.cpp.
◆ signatureInlineText()
|
nodiscardprotected |
inline signature
Definition at line 505 of file identity.cpp.
◆ signatureIsCommand()
|
nodiscardprotected |
- Returns
- true if the signature is read from the output of a command
Definition at line 485 of file identity.cpp.
◆ signatureIsInline()
|
nodiscardprotected |
- Returns
- true if the signature was specified directly
Definition at line 495 of file identity.cpp.
◆ signatureIsInlinedHtml()
|
nodiscard |
- Returns
- true if the inlined signature is html formatted
- Since
- 4.1
Definition at line 341 of file identity.cpp.
◆ signatureIsPlainFile()
|
nodiscardprotected |
- Returns
- true if the signature is read from a text file
Definition at line 490 of file identity.cpp.
◆ signatureText()
|
nodiscard |
- Returns
- the signature with '–
' prepended to it if it is not present already. No newline in front of or after the signature is added.
- Parameters
-
ok if a valid bool pointer, it is set to true
orfalse
depending on whether the signature could successfully be obtained.
Definition at line 336 of file identity.cpp.
◆ smimeEncryptionKey()
|
nodiscard |
The user's S/MIME encryption key.
Definition at line 376 of file identity.cpp.
◆ smimeSigningKey()
|
nodiscard |
The user's S/MIME signing key.
Definition at line 381 of file identity.cpp.
◆ spam()
|
nodiscard |
The folder where spam messages from this identity will be stored by default.
Definition at line 474 of file identity.cpp.
◆ templates()
|
nodiscard |
The folder where template messages from this identity will be stored by default.
Definition at line 456 of file identity.cpp.
◆ transport()
|
nodiscard |
The transport that is set for this identity.
Used to link a transport with an identity.
Definition at line 480 of file identity.cpp.
◆ uoid()
|
nodiscard |
Unique Object Identifier for this identity.
Definition at line 351 of file identity.cpp.
◆ useSignatureFile()
|
nodiscardprotected |
Inline or signature from a file.
Definition at line 500 of file identity.cpp.
◆ vCardFile()
|
nodiscard |
vCard to attach to outgoing emails
Definition at line 401 of file identity.cpp.
◆ verifyAkonadiId()
during migration when it failed it can be a string => not a qlonglong akonadi::id => fix it
Definition at line 880 of file identity.cpp.
◆ warnNotEncrypt()
|
nodiscard |
- Returns
- true if we should warn if parts of the message this identity is about to send are not encrypted.
- Since
- 5.22
Definition at line 840 of file identity.cpp.
◆ warnNotSign()
|
nodiscard |
- Returns
- true if we should warn if parts of the message this identity is about to send are not signed.
- Since
- 5.22
Definition at line 855 of file identity.cpp.
◆ writeConfig()
void Identity::writeConfig | ( | KConfigGroup & | config | ) | const |
Write configuration to config.
Group must be preset (or use KConfigGroup). Called from IdentityManager.
Definition at line 113 of file identity.cpp.
◆ xface()
|
nodiscard |
a X-Face header for this identity
Definition at line 436 of file identity.cpp.
Member Data Documentation
◆ mIsDefault
|
protected |
Definition at line 482 of file identity.h.
◆ mPropertiesMap
Definition at line 483 of file identity.h.
◆ mSignature
|
protected |
Definition at line 481 of file identity.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 21 2025 11:58:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.