• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • ContactGroupEditor
Public Types | Public Slots | Signals | Public Member Functions | List of all members
Akonadi::ContactGroupEditor Class Reference

#include <contactgroupeditor.h>

Inherits QWidget.

Public Types

enum  Mode { CreateMode , EditMode }
 

Public Slots

void loadContactGroup (const Akonadi::Item &group)
 
bool saveContactGroup ()
 

Signals

void contactGroupStored (const Akonadi::Item &group)
 
void error (const QString &errorMsg)
 

Public Member Functions

 ContactGroupEditor (Mode mode, QWidget *parent=0)
 
virtual ~ContactGroupEditor ()
 
void groupNameIsValid (bool isValid)
 
void setContactGroupTemplate (const KABC::ContactGroup &group)
 
void setDefaultAddressBook (const Akonadi::Collection &addressbook)
 

Detailed Description

An widget to edit contact groups in Akonadi.

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

Example for creating a new contact group:

using namespace Akonadi;
ContactGroupEditor *editor = new ContactGroupEditor( Akonadi::ContactGroupEditor::CreateMode, this );
...
if ( !editor->saveContactGroup() ) {
qDebug() << "Unable to save new contact group to storage";
return;
}
Akonadi::ContactGroupEditor
An widget to edit contact groups in Akonadi.
Definition contactgroupeditor.h:83
Akonadi::ContactGroupEditor::saveContactGroup
bool saveContactGroup()
Saves the contact group from the editor back to the storage.
Definition contactgroupeditor.cpp:252
Akonadi::ContactGroupEditor::CreateMode
@ CreateMode
Creates a new contact group.
Definition contactgroupeditor.h:91
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28

Example for editing an existing contact group:

const Akonadi::Item contactGroup = ...;
ContactGroupEditor *editor = new ContactGroupEditor( Akonadi::ContactGroupEditor::EditMode, this );
editor->loadContactGroup( contactGroup );
...
if ( !editor->saveContactGroup() ) {
qDebug() << "Unable to save changed contact group to storage";
return;
}
Akonadi::ContactGroupEditor::EditMode
@ EditMode
Edits an existing contact group.
Definition contactgroupeditor.h:92
Akonadi::ContactGroupEditor::loadContactGroup
void loadContactGroup(const Akonadi::Item &group)
Loads the contact group into the editor.
Definition contactgroupeditor.cpp:234
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Since
4.4

Definition at line 82 of file contactgroupeditor.h.

Member Enumeration Documentation

◆ Mode

enum Akonadi::ContactGroupEditor::Mode

Describes the mode of the contact group editor.

Enumerator
CreateMode 

Creates a new contact group.

EditMode 

Edits an existing contact group.

Definition at line 90 of file contactgroupeditor.h.

Constructor & Destructor Documentation

◆ ContactGroupEditor()

ContactGroupEditor::ContactGroupEditor ( Mode mode,
QWidget * parent = 0 )
explicit

Creates a new contact group editor.

Parameters
modeThe mode of the editor.
parentThe parent widget of the editor.

Definition at line 206 of file contactgroupeditor.cpp.

◆ ~ContactGroupEditor()

ContactGroupEditor::~ContactGroupEditor ( )
virtual

Destroys the contact group editor.

Definition at line 229 of file contactgroupeditor.cpp.

Member Function Documentation

◆ contactGroupStored

void Akonadi::ContactGroupEditor::contactGroupStored ( const Akonadi::Item & group)
signal

This signal is emitted when the contact group has been saved back to the storage.

◆ error

void Akonadi::ContactGroupEditor::error ( const QString & errorMsg)
signal

This signal is emitted when an error occurred during the save.

Parameters
errorMsgThe error message.

◆ groupNameIsValid()

void ContactGroupEditor::groupNameIsValid ( bool isValid)

Definition at line 318 of file contactgroupeditor.cpp.

◆ loadContactGroup

void ContactGroupEditor::loadContactGroup ( const Akonadi::Item & group)
slot

Loads the contact group into the editor.

Definition at line 234 of file contactgroupeditor.cpp.

◆ saveContactGroup

bool ContactGroupEditor::saveContactGroup ( )
slot

Saves the contact group from the editor back to the storage.

Returns
true if the contact group has been saved successfully, false otherwise.

Definition at line 252 of file contactgroupeditor.cpp.

◆ setContactGroupTemplate()

void ContactGroupEditor::setContactGroupTemplate ( const KABC::ContactGroup & group)

Sets a contact group that is used as template in create mode.

The fields of the editor will be prefilled with the content of the group.

Parameters
groupthe group to use as template content

Definition at line 306 of file contactgroupeditor.cpp.

◆ setDefaultAddressBook()

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

Sets the addressbook which shall be used to store new contact groups.

Definition at line 313 of file contactgroupeditor.cpp.


The documentation for this class was generated from the following files:
  • contactgroupeditor.h
  • contactgroupeditor.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal