KContacts::Email Class
class KContacts::EmailClass that holds a Email for a contact. More...
Header: | #include <KContacts/Email> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Contacts) target_link_libraries(mytarget PRIVATE KF6::Contacts) |
Since: | 4.14.5 |
In QML: |
Public Types
Properties
- email : QString
- isPreferred : bool
- isValid : const bool
- type : Type
Public Functions
Email() | |
Email(const QString &mail) | |
(since 5.12) bool | isPreferred() const |
bool | isValid() const |
QString | mail() const |
void | setEmail(const QString &mail) |
(since 5.12) void | setPreferred(bool preferred) |
(since 5.12) void | setType(KContacts::Email::Type type) |
QString | toString() const |
(since 5.12) KContacts::Email::Type | type() const |
bool | operator!=(const KContacts::Email &other) const |
bool | operator==(const KContacts::Email &other) const |
Related Non-Members
QDataStream & | operator<<(QDataStream &stream, const KContacts::Email &object) |
QDataStream & | operator>>(QDataStream &stream, KContacts::Email &object) |
Detailed Description
Member Type Documentation
Email::List
enum Email::TypeFlag
flags Email::Type
Email types.
Constant | Value | Description |
---|---|---|
KContacts::Email::Unknown | 0 | No or unknown email type is set |
KContacts::Email::Home | 1 | Personal email |
KContacts::Email::Work | 2 | Work email |
KContacts::Email::Other | 4 | Other email |
The Type type is a typedef for QFlags<TypeFlag>. It stores an OR combination of TypeFlag values.
Property Documentation
email : QString
Access functions:
isPreferred : bool
Access functions:
bool | isPreferred() const |
void | setPreferred(bool preferred) |
[read-only]
isValid : const bool
Access functions:
bool | isValid() const |
type : Type
Access functions:
Member Function Documentation
Email::Email()
Creates an empty email object.
See also setEmail().
[invokable]
Email::Email(const QString &mail)
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[since 5.12]
bool Email::isPreferred() const
Returns whether this is the preferred email address.
Note: Getter function for property isPreferred.
This function was introduced in 5.12.
bool Email::isValid() const
Note: Getter function for property isValid.
QString Email::mail() const
Note: Getter function for property email.
void Email::setEmail(const QString &mail)
Note: Setter function for property email.
[since 5.12]
void Email::setPreferred(bool preferred)
Sets that this is the preferred email address.
Note: Setter function for property isPreferred.
This function was introduced in 5.12.
See also isPreferred().
[since 5.12]
void Email::setType(KContacts::Email::Type type)
Sets the email type.
Note: Setter function for property type.
This function was introduced in 5.12.
See also type().
QString Email::toString() const
[since 5.12]
KContacts::Email::Type Email::type() const
Returns the type of the email.
Note: Getter function for property type.
This function was introduced in 5.12.
See also setType().