#include <distributionlist.h>

Inherits TDEABC::Addressee.

Classes

struct  Entry
 

Public Types

typedef TQValueList< DistributionListList
 

Public Member Functions

 DistributionList ()
 
 DistributionList (const TDEABC::Addressee &addr)
 
 ~DistributionList ()
 
void setName (const TQString &name)
 
TQString name () const
 
void insertEntry (const Addressee &, const TQString &email=TQString())
 
void removeEntry (const Addressee &, const TQString &email=TQString())
 
void insertEntry (const TQString &uid, const TQString &email=TQString())
 
void removeEntry (const TQString &uid, const TQString &email=TQString())
 
TQStringList emails (TDEABC::AddressBook *book) const
 
Entry::List entries (TDEABC::AddressBook *book) const
 

Static Public Member Functions

static bool isDistributionList (const TDEABC::Addressee &addr)
 
static DistributionList findByName (TDEABC::AddressBook *book, const TQString &name, bool caseSensitive=true)
 
static TQValueList< DistributionListallDistributionLists (TDEABC::AddressBook *book)
 

Detailed Description

Distribution list of email addresses.

This class represents a list of email addresses. Each email address is associated with an address book entry. If the address book entry changes, the entry in the distribution list is automatically updated.

This should go into tdelibs in KDE4.

Author
David Faure faure.nosp@m.@kde.nosp@m..org

Definition at line 43 of file distributionlist.h.

Constructor & Destructor Documentation

◆ DistributionList() [1/2]

KPIM::DistributionList::DistributionList ( )

Create a distribution list.

Definition at line 6 of file distributionlist.cpp.

◆ DistributionList() [2/2]

KPIM::DistributionList::DistributionList ( const TDEABC::Addressee &  addr)

Create a distribution list from an addressee object (this is a kind of down-cast)

Definition at line 12 of file distributionlist.cpp.

◆ ~DistributionList()

KPIM::DistributionList::~DistributionList ( )
inline

Destructor.

Definition at line 80 of file distributionlist.h.

Member Function Documentation

◆ emails()

TQStringList KPIM::DistributionList::emails ( TDEABC::AddressBook *  book) const

Return list of email addresses, which belong to this distributon list.

These addresses can be directly used by e.g. a mail client.

Parameters
booknecessary to look up entries

Definition at line 184 of file distributionlist.cpp.

◆ entries()

KPIM::DistributionList::Entry::List KPIM::DistributionList::entries ( TDEABC::AddressBook *  book) const

Return list of entries belonging to this distribution list.

This function is mainly useful for a distribution list editor.

Parameters
booknecessary to look up entries

Definition at line 164 of file distributionlist.cpp.

◆ insertEntry() [1/2]

void KPIM::DistributionList::insertEntry ( const Addressee &  addr,
const TQString &  email = TQString() 
)

Insert an entry into this distribution list.

If the entry already exists nothing happens.

Definition at line 52 of file distributionlist.cpp.

◆ insertEntry() [2/2]

void KPIM::DistributionList::insertEntry ( const TQString &  uid,
const TQString &  email = TQString() 
)

Overload, used by resources to avoid looking up the addressee.

Definition at line 59 of file distributionlist.cpp.

◆ name()

TQString KPIM::DistributionList::name ( ) const
inline

HACK: reimplemented from Addressee, but it's NOT virtual there.

Definition at line 86 of file distributionlist.h.

◆ removeEntry() [1/2]

void KPIM::DistributionList::removeEntry ( const Addressee &  addr,
const TQString &  email = TQString() 
)

Remove an entry from this distribution list.

If the entry doesn't exist nothing happens.

Definition at line 69 of file distributionlist.cpp.

◆ removeEntry() [2/2]

void KPIM::DistributionList::removeEntry ( const TQString &  uid,
const TQString &  email = TQString() 
)

Overload, used by resources to avoid looking up the addressee.

Definition at line 76 of file distributionlist.cpp.

◆ setName()

void KPIM::DistributionList::setName ( const TQString &  name)

HACK: reimplemented from Addressee, but it's NOT virtual there.

Definition at line 17 of file distributionlist.cpp.


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