KIdentityManagementCore::Identity
#include <identity.h>
Public Types | |
using | Id = uint |
using | List = QList< Identity > |
Properties | |
bool | attachVcard |
QString | autocorrectionLanguage |
bool | autocryptEnabled |
bool | autocryptPrefer |
QString | bcc |
QString | cc |
QString | defaultDomainName |
QString | dictionary |
bool | disabledFcc |
QString | drafts |
QStringList | emailAliases |
bool | encryptionOverride |
QString | face |
QString | fcc |
QString | fullEmailAddr |
QString | fullName |
QString | identityName |
bool | isFaceEnabled |
bool | isNull |
bool | isXFaceEnabled |
bool | mailingAllowed |
QString | organization |
bool | pgpAutoEncrypt |
bool | pgpAutoSign |
QByteArray | pgpEncryptionKey |
QByteArray | pgpSigningKey |
QString | preferredCryptoMessageFormat |
QString | primaryEmailAddress |
QString | replyToAddr |
Signature | signature |
bool | signatureIsInlinedHtml |
QString | signatureText |
QByteArray | smimeEncryptionKey |
QByteArray | smimeSigningKey |
QString | templates |
QString | transport |
uint | uoid |
QString | vCardFile |
bool | warnNotEncrypt |
bool | warnNotSign |
QString | xface |
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 |
bool | autocryptPrefer () const |
QString | bcc () const |
QString | cc () const |
QString | defaultDomainName () const |
QString | dictionary () const |
bool | disabledFcc () const |
QString | drafts () const |
const QStringList | emailAliases () const |
bool | encryptionOverride () 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 | setAutocryptPrefer (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 | setEncryptionOverride (const bool) |
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 | setWarnNotEncrypt (const bool) |
void | setWarnNotSign (const bool) |
void | setXFace (const QString &) |
void | setXFaceEnabled (bool) |
Signature & | signature () |
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 |
bool | warnNotEncrypt () const |
bool | warnNotSign () 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 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 71 of file identity.h.
Constructor & Destructor Documentation
◆ Identity()
|
explicit |
Constructor.
Definition at line 24 of file identity.cpp.
Member Function Documentation
◆ attachVcard()
bool KIdentityManagementCore::Identity::attachVcard | ( | ) | const |
- Returns
- true if the Vcard of this identity should be attached to outgoing mail.
- Since
- 4.10
◆ autocorrectionLanguage()
QString KIdentityManagementCore::Identity::autocorrectionLanguage | ( | ) | const |
- Returns
- The default language for spell checking of this identity.
- Since
- 4.10
◆ autocryptEnabled()
bool KIdentityManagementCore::Identity::autocryptEnabled | ( | ) | const |
- Returns
- true if Autocrypt is enabled for this identity.
- Since
- 5.17
◆ autocryptPrefer()
bool KIdentityManagementCore::Identity::autocryptPrefer | ( | ) | const |
- Returns
- true if Autocrypt is preferred for this identity.
- Since
- 5.22
◆ bcc()
QString KIdentityManagementCore::Identity::bcc | ( | ) | const |
- Returns
- The email addresses for the BCC: field
◆ cc()
QString KIdentityManagementCore::Identity::cc | ( | ) | const |
- Returns
- The email addresses for the CC: field
- Since
- 4.9
◆ defaultDomainName()
QString KIdentityManagementCore::Identity::defaultDomainName | ( | ) | const |
- Returns
- The default domain name
- Since
- 4.14
◆ dictionary()
QString KIdentityManagementCore::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!
◆ disabledFcc()
bool KIdentityManagementCore::Identity::disabledFcc | ( | ) | const |
- Returns
- true if Fcc is disabled for this identity.
- Since
- 4.11
◆ drafts()
QString KIdentityManagementCore::Identity::drafts | ( | ) | const |
The folder where draft messages from this identity will be stored by default.
◆ emailAliases()
const QStringList KIdentityManagementCore::Identity::emailAliases | ( | ) | const |
The email address aliases.
- Since
- 4.6
◆ encryptionOverride()
bool KIdentityManagementCore::Identity::encryptionOverride | ( | ) | const |
- Returns
- true if the warnNotSign and warnNotEncrypt identity configuration should overwrite the global app-wide configuration.
- Since
- 5.22
◆ face()
QString KIdentityManagementCore::Identity::face | ( | ) | const |
a Face header for this identity
◆ fcc()
QString KIdentityManagementCore::Identity::fcc | ( | ) | const |
The folder where sent messages from this identity will be stored by default.
◆ fullEmailAddr()
QString KIdentityManagementCore::Identity::fullEmailAddr | ( | ) | const |
The email address in the format "username <name@host>" suitable for the "From:" field of email messages.
◆ fullName()
QString KIdentityManagementCore::Identity::fullName | ( | ) | const |
Full name of the user.
◆ identityName()
QString KIdentityManagementCore::Identity::identityName | ( | ) | const |
Identity/nickname for this collection.
◆ isDefault()
bool Identity::isDefault | ( | ) | const |
- Returns
- whether this identity is the default identity
Definition at line 331 of file identity.cpp.
◆ isNull()
bool KIdentityManagementCore::Identity::isNull | ( | ) | const |
Returns true when the identity contains no values, all null values or only empty values.
◆ mailingAllowed()
bool KIdentityManagementCore::Identity::mailingAllowed | ( | ) | const |
Tests if there are enough values set to allow mailing.
◆ matchesEmailAddress()
bool Identity::matchesEmailAddress | ( | const QString & | addr | ) | const |
- 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 667 of file identity.cpp.
◆ operator!=()
bool Identity::operator!= | ( | const Identity & | other | ) | const |
used for comparison
Definition at line 264 of file identity.cpp.
◆ operator<()
bool Identity::operator< | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 203 of file identity.cpp.
◆ operator<=()
bool Identity::operator<= | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 225 of file identity.cpp.
◆ operator==()
bool Identity::operator== | ( | const Identity & | other | ) | const |
used for comparison
Definition at line 235 of file identity.cpp.
◆ operator>()
bool Identity::operator> | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 214 of file identity.cpp.
◆ operator>=()
bool Identity::operator>= | ( | const Identity & | other | ) | const |
used for sorting
Definition at line 230 of file identity.cpp.
◆ organization()
QString KIdentityManagementCore::Identity::organization | ( | ) | const |
The user's organization (optional)
◆ pgpAutoEncrypt()
bool KIdentityManagementCore::Identity::pgpAutoEncrypt | ( | ) | const |
- Returns
- true if we should encrypt message sent by this identity by default.
- Since
- 5.4
◆ pgpAutoSign()
bool KIdentityManagementCore::Identity::pgpAutoSign | ( | ) | const |
- Returns
- true if we should sign message sent by this identity by default.
- Since
- 4.12
◆ pgpEncryptionKey()
QByteArray KIdentityManagementCore::Identity::pgpEncryptionKey | ( | ) | const |
The user's OpenPGP encryption key.
◆ pgpSigningKey()
QByteArray KIdentityManagementCore::Identity::pgpSigningKey | ( | ) | const |
The user's OpenPGP signing key.
◆ primaryEmailAddress()
QString KIdentityManagementCore::Identity::primaryEmailAddress | ( | ) | const |
The primary email address (without the user name - only name@host).
This email address is used for all outgoing mail.
- Since
- 4.6
◆ property()
Get random properties.
- Parameters
-
key the key of the property to get
Definition at line 271 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 80 of file identity.cpp.
◆ replyToAddr()
QString KIdentityManagementCore::Identity::replyToAddr | ( | ) | const |
- Returns
- The email address for the ReplyTo: field
◆ setIdentityName()
void Identity::setIdentityName | ( | const QString & | name | ) |
Identity/nickname for this collection.
Definition at line 519 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 624 of file identity.cpp.
◆ setProperty()
Set random properties, when value
is empty (for QStrings) or null, the property is deleted.
Definition at line 501 of file identity.cpp.
◆ setUoid()
void Identity::setUoid | ( | uint | aUoid | ) |
◆ signature()
Signature& KIdentityManagementCore::Identity::signature | ( | ) |
- Returns
- The signature of the identity.
- Warning
- This method is not const.
◆ signatureFile()
|
protected |
name of the signature file (with path)
Definition at line 489 of file identity.cpp.
◆ signatureInlineText()
|
protected |
inline signature
Definition at line 484 of file identity.cpp.
◆ signatureIsCommand()
|
protected |
- Returns
- true if the signature is read from the output of a command
Definition at line 464 of file identity.cpp.
◆ signatureIsInline()
|
protected |
- Returns
- true if the signature was specified directly
Definition at line 474 of file identity.cpp.
◆ signatureIsInlinedHtml()
bool KIdentityManagementCore::Identity::signatureIsInlinedHtml | ( | ) | const |
- Returns
- true if the inlined signature is html formatted
- Since
- 4.1
◆ signatureIsPlainFile()
|
protected |
- Returns
- true if the signature is read from a text file
Definition at line 469 of file identity.cpp.
◆ signatureText()
QString Identity::signatureText | ( | bool * | ok = nullptr | ) | const |
- 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 321 of file identity.cpp.
◆ smimeEncryptionKey()
QByteArray KIdentityManagementCore::Identity::smimeEncryptionKey | ( | ) | const |
The user's S/MIME encryption key.
◆ smimeSigningKey()
QByteArray KIdentityManagementCore::Identity::smimeSigningKey | ( | ) | const |
The user's S/MIME signing key.
◆ templates()
QString KIdentityManagementCore::Identity::templates | ( | ) | const |
The folder where template messages from this identity will be stored by default.
◆ transport()
QString KIdentityManagementCore::Identity::transport | ( | ) | const |
The transport that is set for this identity.
Used to link a transport with an identity.
◆ uoid()
uint KIdentityManagementCore::Identity::uoid | ( | ) | const |
Unique Object Identifier for this identity.
◆ useSignatureFile()
|
protected |
Inline or signature from a file.
Definition at line 479 of file identity.cpp.
◆ vCardFile()
QString KIdentityManagementCore::Identity::vCardFile | ( | ) | const |
vCard to attach to outgoing emails
◆ verifyAkonadiId()
during migration when it failed it can be a string => not a qlonglong akonadi::id => fix it
Definition at line 819 of file identity.cpp.
◆ warnNotEncrypt()
bool KIdentityManagementCore::Identity::warnNotEncrypt | ( | ) | const |
- Returns
- true if we should warn if parts of the message this identity is about to send are not encrypted.
- Since
- 5.22
◆ warnNotSign()
bool KIdentityManagementCore::Identity::warnNotSign | ( | ) | const |
- Returns
- true if we should warn if parts of the message this identity is about to send are not signed.
- Since
- 5.22
◆ writeConfig()
void Identity::writeConfig | ( | KConfigGroup & | config | ) | const |
Write configuration to config.
Group must be preset (or use KConfigGroup). Called from IdentityManager.
Definition at line 106 of file identity.cpp.
◆ xface()
QString KIdentityManagementCore::Identity::xface | ( | ) | const |
a X-Face header for this identity
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:12:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.