• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi/contact

  • Akonadi
  • Akonadi::ContactEditorDialog
Public Types | Signals | Public Member Functions

Akonadi::ContactEditorDialog Class Reference

A dialog for creating or editing a contact in Akonadi. More...

#include <contacteditordialog.h>

Inherits KDialog.

List of all members.

Public Types

enum  Mode { CreateMode, EditMode }

Signals

void contactStored (const Akonadi::Item &contact)

Public Member Functions

 ContactEditorDialog (Mode mode, QWidget *parent=0)
 ContactEditorDialog (Mode mode, AbstractContactEditorWidget *editorWidget, QWidget *parent=0)
 ~ContactEditorDialog ()
ContactEditor * editor () const
void setContact (const Akonadi::Item &contact)
void setDefaultAddressBook (const Akonadi::Collection &addressbook)

Detailed Description

A dialog for creating or editing a contact in Akonadi.

This dialog provides a way to create a new contact or edit an existing contact in Akonadi.

Example for creating a new contact:

 using namespace Akonadi;

 ContactEditorDialog *dlg = new ContactEditorDialog( ContactEditorDialog::CreateMode, this );
 connect( dlg, SIGNAL( contactStored( const Akonadi::Item& ) ),
          this, SLOT( contactStored( const Akonadi::Item& ) ) );
 dlg->show();

Example for editing an existing contact:

 using namespace Akonadi;

 const Item contact = ...;

 ContactEditorDialog *dlg = new ContactEditorDialog( ContactEditorDialog::EditMode, this );
 connect( dlg, SIGNAL( contactStored( const Akonadi::Item& ) ),
          this, SLOT( contactStored( const Akonadi::Item& ) ) );
 dlg->setContact( contact );
 dlg->show();
Author:
Tobias Koenig <tokoe@kde.org>
Since:
4.4

Definition at line 77 of file contacteditordialog.h.


Member Enumeration Documentation

enum Akonadi::ContactEditorDialog::Mode

Describes the mode of the editor dialog.

Enumerator:
CreateMode 

Creates a new contact.

EditMode 

Edits an existing contact.

Definition at line 85 of file contacteditordialog.h.


Constructor & Destructor Documentation

ContactEditorDialog::ContactEditorDialog ( Mode  mode,
QWidget *  parent = 0 
) [explicit]

Creates a new contact editor dialog with the standard editor widget.

Parameters:
mode The mode of the dialog.
parent The parent widget of the dialog.

Definition at line 102 of file contacteditordialog.cpp.

ContactEditorDialog::ContactEditorDialog ( Mode  mode,
AbstractContactEditorWidget *  editorWidget,
QWidget *  parent = 0 
)

Creates a new contact editor dialog with a custom editor widget.

Parameters:
mode The mode of the dialog.
editorWidget The contact editor widget that shall be used for editing.
parent The parent widget of the dialog.

Definition at line 107 of file contacteditordialog.cpp.

ContactEditorDialog::~ContactEditorDialog (  ) 

Destroys the contact editor dialog.

Definition at line 112 of file contacteditordialog.cpp.


Member Function Documentation

void Akonadi::ContactEditorDialog::contactStored ( const Akonadi::Item &  contact  )  [signal]

This signal is emitted whenever a contact was updated or stored.

Parameters:
contact The data reference of the contact.
ContactEditor * ContactEditorDialog::editor (  )  const

Returns the ContactEditor that is used by this dialog.

Definition at line 130 of file contacteditordialog.cpp.

void ContactEditorDialog::setContact ( const Akonadi::Item &  contact  ) 

Sets the contact to edit when in EditMode.

Note:
The contact item just must have a uid set, all other data are fetched by the dialog automatically.

Definition at line 117 of file contacteditordialog.cpp.

void ContactEditorDialog::setDefaultAddressBook ( const Akonadi::Collection &  addressbook  ) 

Sets the addressbook that shall be selected as default in create mode.

Definition at line 122 of file contacteditordialog.cpp.


The documentation for this class was generated from the following files:
  • contacteditordialog.h
  • contacteditordialog.cpp

akonadi/contact

Skip menu "akonadi/contact"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal