KABC::AddressBook Class Reference
Address Book. More...
#include <addressbook.h>
Inheritance diagram for KABC::AddressBook:


Signals | |
void | addressBookChanged (AddressBook *) |
Emitted, when the address book has changed on disk. | |
void | addressBookLocked (AddressBook *) |
Emitted, when the address book has been locked for writing. | |
void | addressBookUnlocked (AddressBook *) |
Emitted, when the address book has been unlocked. | |
Public Member Functions | |
AddressBook () | |
Constructs a address book object. | |
Ticket * | requestSaveTicket (Resource *resource=0) |
Requests a ticket for saving the addressbook. | |
bool | load () |
Load address book from file. | |
bool | save (Ticket *ticket) |
Save address book. | |
Iterator | begin () |
Returns a iterator for first entry of address book. | |
ConstIterator | begin () const |
Returns a const iterator for first entry of address book. | |
Iterator | end () |
Returns a iterator for first entry of address book. | |
ConstIterator | end () const |
Returns a const iterator for first entry of address book. | |
void | clear () |
Removes all entries from address book. | |
void | insertAddressee (const Addressee &) |
Insert an Addressee object into address book. | |
void | removeAddressee (const Addressee &) |
Removes entry from the address book. | |
void | removeAddressee (const Iterator &) |
This is like removeAddressee() just above, with the difference that the first element is a iterator, returned by begin(). | |
Iterator | find (const Addressee &) |
Find the specified entry in address book. | |
Addressee | findByUid (const QString &) |
Find the entry specified by an unique id. | |
Addressee::List | findByName (const QString &) |
Find all entries with the specified name in the address book. | |
Addressee::List | findByEmail (const QString &) |
Find all entries with the specified email address in the address book. | |
Addressee::List | findByCategory (const QString &) |
Find all entries wich have the specified category in the address book. | |
virtual QString | identifier () |
Return a string identifying this addressbook. | |
void | dump () const |
Used for debug output. | |
void | emitAddressBookLocked () |
void | emitAddressBookUnlocked () |
void | emitAddressBookChanged () |
Field::List | fields (int category=Field::All) |
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) |
Add custom field to address book. | |
bool | addResource (Resource *) |
Add address book resource. | |
bool | removeResource (Resource *) |
Remove address book resource. | |
QPtrList< Resource > | resources () |
Return pointer list of all resources. | |
void | setErrorHandler (ErrorHandler *) |
Set the ErrorHandler , that is used by error() to provide gui-independend error messages. | |
void | error (const QString &) |
Shows gui independend error messages. | |
void | cleanUp () |
Query all resources to clean up their lock files. | |
Protected Member Functions | |
void | deleteRemovedAddressees () |
void | setStandardResource (Resource *) |
Resource * | standardResource () |
Friends | |
class | StdAddressBook |
Q_OBJECT friend QDataStream & | operator<< (QDataStream &, const AddressBook &) |
QDataStream & | operator>> (QDataStream &, AddressBook &) |
Detailed Description
Address Book.This class provides access to a collection of address book entries.
Definition at line 41 of file addressbook.h.
Constructor & Destructor Documentation
|
Constructs a address book object.
|
Member Function Documentation
|
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.
Referenced by KABC::StdAddressBook::save(). |
|
Load address book from file.
|
|
Save address book. The address book is saved to the file, the Ticket object has been requested for by requestSaveTicket().
Referenced by KABC::StdAddressBook::save(). |
|
Returns a iterator for first entry of address book.
Referenced by KABC::BinaryFormat::saveAll(). |
|
Returns a const iterator for first entry of address book.
|
|
Returns a iterator for first entry of address book.
Referenced by KABC::BinaryFormat::saveAll(). |
|
Returns a const iterator for first entry of address book.
|
|
Removes all entries from address book.
|
|
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. Referenced by KABC::BinaryFormat::loadAll(). |
|
Removes entry from the address book.
|
|
This is like removeAddressee() just above, with the difference that the first element is a iterator, returned by begin().
|
|
Find the specified entry in address book. Returns end(), if the entry couldn't be found. |
|
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. Referenced by KABC::DistributionListManager::load(). |
|
Find all entries with the specified name in the address book. Returns an empty list, if no entries couldn't be found. |
|
Find all entries with the specified email address in the address book. Returns an empty list, if no entries couldn't be found. |
|
Find all entries wich have the specified category in the address book. Returns an empty list, if no entries couldn't be found. |
|
Return a string identifying this addressbook.
Referenced by KABC::DistributionListManager::load(), and KABC::DistributionListManager::save(). |
|
Used for debug output.
|
|
Return list of all Fields known to the address book which are associated with the given field category.
|
|
Add custom field to address book.
|
|
Add address book resource.
|
|
Remove address book resource.
|
|
Return pointer list of all resources.
Referenced by KABC::ResourceSelectDialog::getResource(), KABC::ResourceSelectDialog::ResourceSelectDialog(), and KABC::StdAddressBook::save(). |
|
Set the
|
|
Shows gui independend error messages.
Referenced by KABC::StdAddressBook::save(). |
|
Query all resources to clean up their lock files.
|
|
Emitted, when the address book has changed on disk.
|
|
Emitted, when the address book has been locked for writing.
|
|
Emitted, when the address book has been unlocked.
|
The documentation for this class was generated from the following file: