.TH "KABC::AddressBook" 3 "28 Jan 2004" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::AddressBook \- \fBAddress\fP Book.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <addressbook.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
Inherited by \fBKABC::StdAddressBook\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBaddressBookChanged\fP (\fBAddressBook\fP *)"
.br
.RI "\fIEmitted, when the address book has changed on disk. \fP"
.ti -1c
.RI "void \fBaddressBookLocked\fP (\fBAddressBook\fP *)"
.br
.RI "\fIEmitted, when the address book has been locked for writing. \fP"
.ti -1c
.RI "void \fBaddressBookUnlocked\fP (\fBAddressBook\fP *)"
.br
.RI "\fIEmitted, when the address book has been unlocked. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBAddressBook\fP ()"
.br
.RI "\fIConstructs a address book object. \fP"
.ti -1c
.RI "\fBTicket\fP * \fBrequestSaveTicket\fP (Resource *resource=0)"
.br
.RI "\fIRequests a ticket for saving the addressbook. \fP"
.ti -1c
.RI "bool \fBload\fP ()"
.br
.RI "\fILoad address book from file. \fP"
.ti -1c
.RI "bool \fBsave\fP (\fBTicket\fP *ticket)"
.br
.RI "\fISave address book. \fP"
.ti -1c
.RI "\fBIterator\fP \fBbegin\fP ()"
.br
.RI "\fIReturns a iterator for first entry of address book. \fP"
.ti -1c
.RI "\fBConstIterator\fP \fBbegin\fP () const "
.br
.RI "\fIReturns a const iterator for first entry of address book. \fP"
.ti -1c
.RI "\fBIterator\fP \fBend\fP ()"
.br
.RI "\fIReturns a iterator for first entry of address book. \fP"
.ti -1c
.RI "\fBConstIterator\fP \fBend\fP () const "
.br
.RI "\fIReturns a const iterator for first entry of address book. \fP"
.ti -1c
.RI "void \fBclear\fP ()"
.br
.RI "\fIRemoves all entries from address book. \fP"
.ti -1c
.RI "void \fBinsertAddressee\fP (const  \fBAddressee\fP &)"
.br
.RI "\fIInsert an \fBAddressee\fP object into address book. \fP"
.ti -1c
.RI "void \fBremoveAddressee\fP (const  \fBAddressee\fP &)"
.br
.RI "\fIRemoves entry from the address book. \fP"
.ti -1c
.RI "void \fBremoveAddressee\fP (const  \fBIterator\fP &)"
.br
.RI "\fIThis is like \fBremoveAddressee\fP() just above, with the difference that the first element is a iterator, returned by \fBbegin\fP(). \fP"
.ti -1c
.RI "\fBIterator\fP \fBfind\fP (const  \fBAddressee\fP &)"
.br
.RI "\fIFind the specified entry in address book. \fP"
.ti -1c
.RI "\fBAddressee\fP \fBfindByUid\fP (const  \fBQString\fP &)"
.br
.RI "\fIFind the entry specified by an unique id. \fP"
.ti -1c
.RI "\fBAddressee::List\fP \fBfindByName\fP (const  \fBQString\fP &)"
.br
.RI "\fIFind all entries with the specified name in the address book. \fP"
.ti -1c
.RI "\fBAddressee::List\fP \fBfindByEmail\fP (const  \fBQString\fP &)"
.br
.RI "\fIFind all entries with the specified email address in the address book. \fP"
.ti -1c
.RI "\fBAddressee::List\fP \fBfindByCategory\fP (const  \fBQString\fP &)"
.br
.RI "\fIFind all entries wich have the specified category in the address book. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBidentifier\fP ()"
.br
.RI "\fIReturn a string identifying this addressbook. \fP"
.ti -1c
.RI "void \fBdump\fP () const "
.br
.RI "\fIUsed for debug output. \fP"
.ti -1c
.RI "void \fBemitAddressBookLocked\fP ()"
.br
.ti -1c
.RI "void \fBemitAddressBookUnlocked\fP ()"
.br
.ti -1c
.RI "void \fBemitAddressBookChanged\fP ()"
.br
.ti -1c
.RI "\fBField::List\fP \fBfields\fP (int category=Field::All)"
.br
.RI "\fIReturn list of all Fields known to the address book which are associated with the given field category. \fP"
.ti -1c
.RI "bool \fBaddCustomField\fP (const  \fBQString\fP &label, int category=Field::All, const  \fBQString\fP &key=QString::null, const  \fBQString\fP &app=QString::null)"
.br
.RI "\fIAdd custom field to address book. \fP"
.ti -1c
.RI "bool \fBaddResource\fP (Resource *)"
.br
.RI "\fIAdd address book resource. \fP"
.ti -1c
.RI "bool \fBremoveResource\fP (Resource *)"
.br
.RI "\fIRemove address book resource. \fP"
.ti -1c
.RI "\fBQPtrList\fP< Resource > \fBresources\fP ()"
.br
.RI "\fIReturn pointer list of all resources. \fP"
.ti -1c
.RI "void \fBsetErrorHandler\fP (\fBErrorHandler\fP *)"
.br
.RI "\fISet the \fC\fBErrorHandler\fP\fP, that is used by \fBerror\fP() to provide gui-independend error messages. \fP"
.ti -1c
.RI "void \fBerror\fP (const  \fBQString\fP &)"
.br
.RI "\fIShows gui independend error messages. \fP"
.ti -1c
.RI "void \fBcleanUp\fP ()"
.br
.RI "\fIQuery all resources to clean up their lock files. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBdeleteRemovedAddressees\fP ()"
.br
.ti -1c
.RI "void \fBsetStandardResource\fP (Resource *)"
.br
.ti -1c
.RI "Resource * \fBstandardResource\fP ()"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBStdAddressBook\fP"
.br
.ti -1c
.RI "Q_OBJECT friend \fBQDataStream\fP & \fBoperator<<\fP (\fBQDataStream\fP &, const  \fBAddressBook\fP &)"
.br
.ti -1c
.RI "\fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &, \fBAddressBook\fP &)"
.br
.in -1c
.SH "Detailed Description"
.PP 
\fBAddress\fP Book. 

This class provides access to a collection of address book entries. 
.PP
Definition at line 41 of file addressbook.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KABC::AddressBook::AddressBook ()"
.PP
Constructs a address book object. \fBParameters:\fP
.RS 4
\fIformat\fP File format class. 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "\fBTicket\fP* KABC::AddressBook::requestSaveTicket (Resource * resource = 0)"
.PP
Requests a ticket for saving the addressbook. Calling this function locks the addressbook for all other processes. If the address book is already locked the function returns 0. You need the returned \fBTicket\fP object for calling the \fBsave\fP() function.
.PP
\fBSee also:\fP
.RS 4
\fBsave()\fP 
.RE
.PP
Referenced by KABC::StdAddressBook::save().
.SS "bool KABC::AddressBook::load ()"
.PP
Load address book from file. 
.SS "bool KABC::AddressBook::save (\fBTicket\fP * ticket)"
.PP
Save address book. The address book is saved to the file, the \fBTicket\fP object has been requested for by \fBrequestSaveTicket\fP().
.PP
\fBParameters:\fP
.RS 4
\fIticket\fP a ticket object returned by \fBrequestSaveTicket\fP() 
.RE
.PP
Referenced by KABC::StdAddressBook::save().
.SS "\fBIterator\fP KABC::AddressBook::begin ()"
.PP
Returns a iterator for first entry of address book. Referenced by KABC::BinaryFormat::saveAll().
.SS "\fBConstIterator\fP KABC::AddressBook::begin () const"
.PP
Returns a const iterator for first entry of address book. 
.SS "\fBIterator\fP KABC::AddressBook::end ()"
.PP
Returns a iterator for first entry of address book. Referenced by KABC::BinaryFormat::saveAll().
.SS "\fBConstIterator\fP KABC::AddressBook::end () const"
.PP
Returns a const iterator for first entry of address book. 
.SS "void KABC::AddressBook::clear ()"
.PP
Removes all entries from address book. 
.SS "void KABC::AddressBook::insertAddressee (const \fBAddressee\fP &)"
.PP
Insert an \fBAddressee\fP object into address book. If an object with the same unique id already exists in the address book it it replaced by the new one. If not the new object is appended to the address book. Referenced by KABC::BinaryFormat::loadAll().
.SS "void KABC::AddressBook::removeAddressee (const \fBAddressee\fP &)"
.PP
Removes entry from the address book. 
.SS "void KABC::AddressBook::removeAddressee (const \fBIterator\fP &)"
.PP
This is like \fBremoveAddressee\fP() just above, with the difference that the first element is a iterator, returned by \fBbegin\fP(). 
.SS "\fBIterator\fP KABC::AddressBook::find (const \fBAddressee\fP &)"
.PP
Find the specified entry in address book. Returns \fBend()\fP, if the entry couldn't be found. 
.SS "\fBAddressee\fP KABC::AddressBook::findByUid (const \fBQString\fP &)"
.PP
Find the entry specified by an unique id. Returns an empty \fBAddressee\fP object, if the address book does not contain an entry with this id. Referenced by KABC::DistributionListManager::load().
.SS "\fBAddressee::List\fP KABC::AddressBook::findByName (const \fBQString\fP &)"
.PP
Find all entries with the specified name in the address book. Returns an empty list, if no entries couldn't be found. 
.SS "\fBAddressee::List\fP KABC::AddressBook::findByEmail (const \fBQString\fP &)"
.PP
Find all entries with the specified email address in the address book. Returns an empty list, if no entries couldn't be found. 
.SS "\fBAddressee::List\fP KABC::AddressBook::findByCategory (const \fBQString\fP &)"
.PP
Find all entries wich have the specified category in the address book. Returns an empty list, if no entries couldn't be found. 
.SS "virtual \fBQString\fP KABC::AddressBook::identifier ()\fC [virtual]\fP"
.PP
Return a string identifying this addressbook. Referenced by KABC::DistributionListManager::load(), and KABC::DistributionListManager::save().
.SS "void KABC::AddressBook::dump () const"
.PP
Used for debug output. 
.SS "\fBField::List\fP KABC::AddressBook::fields (int category = Field::All)"
.PP
Return list of all Fields known to the address book which are associated with the given field category. 
.SS "bool KABC::AddressBook::addCustomField (const \fBQString\fP & label, int category = Field::All, const \fBQString\fP & key = QString::null, const \fBQString\fP & app = QString::null)"
.PP
Add custom field to address book. \fBParameters:\fP
.RS 4
\fIlabel\fP User visible label of the field. 
.br
\fIcategory\fP Ored list of field categories. 
.br
\fIkey\fP Identifier used as key for reading and writing the field. 
.br
\fIapp\fP String used as application key for reading and writing the field. 
.RE
.PP

.SS "bool KABC::AddressBook::addResource (Resource *)"
.PP
Add address book resource. 
.SS "bool KABC::AddressBook::removeResource (Resource *)"
.PP
Remove address book resource. 
.SS "\fBQPtrList\fP<Resource> KABC::AddressBook::resources ()"
.PP
Return pointer list of all resources. Referenced by KABC::ResourceSelectDialog::getResource(), KABC::ResourceSelectDialog::ResourceSelectDialog(), and KABC::StdAddressBook::save().
.SS "void KABC::AddressBook::setErrorHandler (\fBErrorHandler\fP *)"
.PP
Set the \fC\fBErrorHandler\fP\fP, that is used by \fBerror\fP() to provide gui-independend error messages. 
.SS "void KABC::AddressBook::error (const \fBQString\fP &)"
.PP
Shows gui independend error messages. Referenced by KABC::StdAddressBook::save().
.SS "void KABC::AddressBook::cleanUp ()"
.PP
Query all resources to clean up their lock files. 
.SS "void KABC::AddressBook::addressBookChanged (\fBAddressBook\fP *)\fC [signal]\fP"
.PP
Emitted, when the address book has changed on disk. 
.SS "void KABC::AddressBook::addressBookLocked (\fBAddressBook\fP *)\fC [signal]\fP"
.PP
Emitted, when the address book has been locked for writing. 
.SS "void KABC::AddressBook::addressBookUnlocked (\fBAddressBook\fP *)\fC [signal]\fP"
.PP
Emitted, when the address book has been unlocked. 

.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
