class AddressBook

Address Book. More...

Full nameKABC::AddressBook
Definition#include <addressbook.h>
InheritsQObject (qt) [public ]
Inherited byStdAddressBook
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Signals

Protected Methods


Detailed Description

This class provides access to a collection of address book entries.

Iterator (class)

Iterator

This class provides an iterator for address book entries.

ConstIterator (class)

ConstIterator

This class provides a const iterator for address book entries.

 AddressBook ()

AddressBook

Constructs a address book object.

Parameters:
formatFile format class.

 ~AddressBook ()

~AddressBook

[virtual]

Ticket * requestSaveTicket ( Resource *resource=0 )

requestSaveTicket

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 Ticket object for calling the save() function.

See also: save()

bool  load ()

load

Load address book from file.

bool  save ( Ticket *ticket )

save

Save address book. The address book is saved to the file, the Ticket object has been requested for by requestSaveTicket().

Parameters:
ticketa ticket object returned by requestSaveTicket()

Iterator  begin ()

begin

Returns a iterator for first entry of address book.

ConstIterator  begin ()

begin

[const]

Returns a const iterator for first entry of address book.

Iterator  end ()

end

Returns a iterator for first entry of address book.

ConstIterator  end ()

end

[const]

Returns a const iterator for first entry of address book.

void  clear ()

clear

Removes all entries from address book.

void  insertAddressee ( const Addressee & )

insertAddressee

Insert an Addressee 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.

void  removeAddressee ( const Addressee & )

removeAddressee

Removes entry from the address book.

void  removeAddressee ( const Iterator & )

removeAddressee

This is like removeAddressee() just above, with the difference that the first element is a iterator, returned by begin().

Iterator  find ( const Addressee & )

find

Find the specified entry in address book. Returns end(), if the entry couldn't be found.

Addressee  findByUid ( const QString & )

findByUid

Find the entry specified by an unique id. Returns an empty Addressee object, if the address book does not contain an entry with this id.

Addressee::List  findByName ( const QString & )

findByName

Find all entries with the specified name in the address book. Returns an empty list, if no entries couldn't be found.

Addressee::List  findByEmail ( const QString & )

findByEmail

Find all entries with the specified email address in the address book. Returns an empty list, if no entries couldn't be found.

Addressee::List  findByCategory ( const QString & )

findByCategory

Find all entries wich have the specified category in the address book. Returns an empty list, if no entries couldn't be found.

QString  identifier ()

identifier

[virtual]

Return a string identifying this addressbook.

void  dump ()

dump

[const]

Used for debug output.

void  emitAddressBookLocked ()

emitAddressBookLocked

void  emitAddressBookUnlocked ()

emitAddressBookUnlocked

void  emitAddressBookChanged ()

emitAddressBookChanged

Field::List  fields ( int category = Field::All )

fields

Return list of all Fields known to the address book which are associated with the given field category.

bool  addCustomField ( const QString &label, int category = Field::All, const QString &key = QString::null, const QString &app = QString::null )

addCustomField

Add custom field to address book.

Parameters:
labelUser visible label of the field.
categoryOred list of field categories.
keyIdentifier used as key for reading and writing the field.
appString used as application key for reading and writing the field.

bool  addResource ( Resource * )

addResource

Add address book resource.

bool  removeResource ( Resource * )

removeResource

Remove address book resource.

QPtrList  resources ()

resources

Return pointer list of all resources.

void  setErrorHandler ( ErrorHandler * )

setErrorHandler

Set the ErrorHandler, that is used by error() to provide gui-independend error messages.

void  error ( const QString& )

error

Shows gui independend error messages.

void  cleanUp ()

cleanUp

Query all resources to clean up their lock files

void  addressBookChanged ( AddressBook * )

addressBookChanged

[signal]

Emitted, when the address book has changed on disk.

void  addressBookLocked ( AddressBook * )

addressBookLocked

[signal]

Emitted, when the address book has been locked for writing.

void  addressBookUnlocked ( AddressBook * )

addressBookUnlocked

[signal]

Emitted, when the address book has been unlocked.

void  deleteRemovedAddressees ()

deleteRemovedAddressees

[protected]

void  setStandardResource ( Resource * )

setStandardResource

[protected]

Resource * standardResource ()

standardResource

[protected]


Generated by: caleb on tcdevel on Tue Jan 28 12:54:33 2003, using kdoc $.