Akonadi::EmailAddressSelection

Search for usage in LXR

Akonadi::EmailAddressSelection Class Reference

#include <emailaddressselection.h>

Public Types

using List = QList<EmailAddressSelection>
 

Public Member Functions

 EmailAddressSelection ()
 
 EmailAddressSelection (const EmailAddressSelection &other)
 
 ~EmailAddressSelection ()
 
QString email () const
 
bool isValid () const
 
Akonadi::Item item () const
 
QString name () const
 
EmailAddressSelectionoperator= (const EmailAddressSelection &other)
 
QString quotedEmail () const
 
void setEmail (const QString &email)
 
void setItem (const Akonadi::Item &item)
 
void setName (const QString &name)
 

Detailed Description

An selection of an email address and corresponding name.

This class encapsulates the selection of an email address and name as it is returned by EmailAddressSelectionWidget or EmailAddressSelectionDialog.

It offers convenience methods to retrieve the quoted version of the email address and access to the Akonadi item that is associated with this address.

Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Since
4.5

Definition at line 36 of file emailaddressselection.h.

Member Typedef Documentation

◆ List

A list of email address selection objects.

Definition at line 42 of file emailaddressselection.h.

Constructor & Destructor Documentation

◆ EmailAddressSelection() [1/2]

EmailAddressSelection::EmailAddressSelection ( )

Creates a new email address selection.

Definition at line 31 of file emailaddressselection.cpp.

◆ EmailAddressSelection() [2/2]

EmailAddressSelection::EmailAddressSelection ( const EmailAddressSelection & other)
default

Creates a new email address selection from an other selection.

◆ ~EmailAddressSelection()

EmailAddressSelection::~EmailAddressSelection ( )
default

Destroys the email address selection.

Member Function Documentation

◆ email()

QString EmailAddressSelection::email ( ) const
nodiscard

Returns the address part of the selected email address.

Note
If a contact group has been selected, the name of the contact group is returned here and must be expanded by the caller.

Definition at line 64 of file emailaddressselection.cpp.

◆ isValid()

bool EmailAddressSelection::isValid ( ) const
nodiscard

Returns whether the selection is valid.

Definition at line 49 of file emailaddressselection.cpp.

◆ item()

Akonadi::Item EmailAddressSelection::item ( ) const
nodiscard

Returns the Akonadi item that is associated with the selected email address.

Definition at line 89 of file emailaddressselection.cpp.

◆ name()

QString EmailAddressSelection::name ( ) const
nodiscard

Returns the name that is associated with the selected email address.

Definition at line 54 of file emailaddressselection.cpp.

◆ operator=()

EmailAddressSelection & EmailAddressSelection::operator= ( const EmailAddressSelection & other)

Replaces this email address selection with the other selection.

Definition at line 38 of file emailaddressselection.cpp.

◆ quotedEmail()

QString EmailAddressSelection::quotedEmail ( ) const
nodiscard

Returns the name and email address together, properly quoted if needed.

Note
If a contact group has been selected, the name of the contact group is returned here and must be expanded by the caller.

Definition at line 74 of file emailaddressselection.cpp.

◆ setEmail()

void EmailAddressSelection::setEmail ( const QString & email)

Definition at line 69 of file emailaddressselection.cpp.

◆ setItem()

void EmailAddressSelection::setItem ( const Akonadi::Item & item)

Definition at line 94 of file emailaddressselection.cpp.

◆ setName()

void EmailAddressSelection::setName ( const QString & name)

Definition at line 59 of file emailaddressselection.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.