Akonadi::EmailAddressSelectionDialog

Search for usage in LXR

Akonadi::EmailAddressSelectionDialog Class Reference

#include <emailaddressselectiondialog.h>

Public Member Functions

 EmailAddressSelectionDialog (QAbstractItemModel *model, QWidget *parent=nullptr)
 
 EmailAddressSelectionDialog (QWidget *parent=nullptr)
 
 ~EmailAddressSelectionDialog () override
 
Akonadi::EmailAddressSelection::List selectedAddresses () const override
 
Akonadi::EmailAddressSelectionWidgetview () const override
 

Detailed Description

A dialog to select email addresses from Akonadi.

This dialog allows the user to select an name and email address from the Akonadi storage. The selected addresses are returned as EmailAddressSelectionWidget::Selection objects which encapsulate the name, email address and the Akonadi item that has been selected.

Example:

if ( dlg.exec() ) {
const Akonadi::EmailAddressSelectionWidget::Selection::List selections = dlg.selectedAddresses();
foreach ( const Akonadi::EmailAddressSelectionWidget::Selection &selection, selections ) {
qCDebug(AKONADICONTACT_LOG) << "Name:" << selection.name() << "Email:" << selection.email();
}
}
A dialog to select email addresses from Akonadi.
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Since
4.5

Definition at line 48 of file emailaddressselectiondialog.h.

Constructor & Destructor Documentation

◆ EmailAddressSelectionDialog() [1/2]

EmailAddressSelectionDialog::EmailAddressSelectionDialog ( QWidget * parent = nullptr)
explicit

Creates a new email address selection dialog.

Parameters
parentThe parent widget.

Definition at line 69 of file emailaddressselectiondialog.cpp.

◆ EmailAddressSelectionDialog() [2/2]

EmailAddressSelectionDialog::EmailAddressSelectionDialog ( QAbstractItemModel * model,
QWidget * parent = nullptr )
explicit

Creates a new email address selection dialog.

Parameters
modelA custom, ContactsTreeModel based model to use.
parentThe parent widget.

Definition at line 75 of file emailaddressselectiondialog.cpp.

◆ ~EmailAddressSelectionDialog()

EmailAddressSelectionDialog::~EmailAddressSelectionDialog ( )
override

Destroys the email address selection dialog.

Definition at line 81 of file emailaddressselectiondialog.cpp.

Member Function Documentation

◆ selectedAddresses()

Akonadi::EmailAddressSelection::List EmailAddressSelectionDialog::selectedAddresses ( ) const
nodiscardoverride

Returns the list of selected email addresses.

Definition at line 86 of file emailaddressselectiondialog.cpp.

◆ view()

EmailAddressSelectionWidget * EmailAddressSelectionDialog::view ( ) const
nodiscardoverride

Returns the email address selection view that is used.

Definition at line 91 of file emailaddressselectiondialog.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.