| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KABC::DistributionListManager Class Reference

Manager of distribution lists. More...

`#include <distributionlist.h>`

Collaboration diagram for KABC::DistributionListManager:

[legend]
List of all members.

## Public Member Functions
| DistributionListManager (AddressBook *)
| Create manager for given address book.
| ~DistributionListManager ()
| Destructor.
DistributionList * | list (const QString &name)
| Return distribution list with given name.
void | insert (DistributionList *)
| Insert distribution list.
void | remove (DistributionList *)
| Remove distribution list.
QStringList | listNames ()
| Return names of all distribution lists managed by this manager.
bool | load ()
| Load distribution lists form disk.
bool | save ()
| Save distribution lists to disk.

## Detailed Description

Manager of distribution lists.

This class represents a collection of distribution lists, which are associated with a given address book.

Definition at line 122 of file distributionlist.h.

## Constructor & Destructor Documentation

DistributionListManager::DistributionListManager | ( | AddressBook * |  | ) |

| Create manager for given address book. Definition at line 108 of file distributionlist.cpp.

DistributionListManager::~DistributionListManager | ( |  | ) |

| Destructor. Definition at line 113 of file distributionlist.cpp.

## Member Function Documentation

DistributionList * DistributionListManager::list | ( | const QString & | name | ) |

| Return distribution list with given name. Definition at line 117 of file distributionlist.cpp. References QPtrList< DistributionList >::first(), list(), KStdAccel::name(), KABC::DistributionList::name(), and QPtrList< DistributionList >::next(). Referenced by insert(), list(), listNames(), load(), remove(), and save().

void DistributionListManager::insert | ( | DistributionList * |  | ) |

| Insert distribution list. If a list with this name already exists, nothing happens. Definition at line 127 of file distributionlist.cpp. References QPtrList< DistributionList >::append(), QPtrList< DistributionList >::first(), list(), KABC::DistributionList::name(), QPtrList< DistributionList >::next(), and QPtrList< DistributionList >::remove(). Referenced by KABC::DistributionList::DistributionList().

void DistributionListManager::remove | ( | DistributionList * |  | ) |

| Remove distribution list. If a list with this name doesn't exist, nothing happens. Definition at line 139 of file distributionlist.cpp. References QPtrList< DistributionList >::first(), list(), KABC::DistributionList::name(), QPtrList< DistributionList >::next(), and QPtrList< DistributionList >::remove(). Referenced by KABC::DistributionList::~DistributionList().

QStringList DistributionListManager::listNames | ( |  | ) |

| Return names of all distribution lists managed by this manager. Definition at line 150 of file distributionlist.cpp. References QPtrList< DistributionList >::first(), list(), KABC::DistributionList::name(), and QPtrList< DistributionList >::next().

bool DistributionListManager::load | ( |  | ) |

| Load distribution lists form disk. Definition at line 162 of file distributionlist.cpp. References QMap::begin(), QMap::end(), KConfig::entryMap(), KABC::AddressBook::findByUid(), KABC::AddressBook::identifier(), KABC::DistributionList::insertEntry(), KABC::Addressee::isEmpty(), QMap::isEmpty(), QStringList::join(), list(), locateLocal(), KStdAccel::name(), KConfigBase::readListEntry(), and KConfigBase::setGroup().

bool DistributionListManager::save | ( |  | ) |

| Save distribution lists to disk. Definition at line 203 of file distributionlist.cpp. References QValueList::begin(), KConfigBase::deleteGroup(), QValueList::end(), KABC::DistributionList::entries(), QPtrList< DistributionList >::first(), KABC::AddressBook::identifier(), list(), locateLocal(), KABC::DistributionList::name(), QPtrList< DistributionList >::next(), KConfigBase::setGroup(), KSimpleConfig::sync(), and KConfigBase::writeEntry().

The documentation for this class was generated from the following files:

- distributionlist.h
- distributionlist.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:39 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001