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


Signals | |
void | addressBookChanged (AddressBook *addressBook) |
void | addressBookLocked (AddressBook *addressBook) |
void | addressBookUnlocked (AddressBook *addressBook) |
void | loadingFinished (Resource *resource) |
void | savingFinished (Resource *resource) |
Public Member Functions | |
AddressBook () | |
AddressBook (const QString &config) | |
virtual | ~AddressBook () |
Ticket * | requestSaveTicket (Resource *resource=0) |
void | releaseSaveTicket (Ticket *ticket) |
bool | load () |
bool | asyncLoad () |
bool | save (Ticket *ticket) |
bool | asyncSave (Ticket *ticket) |
ConstIterator | begin () const |
Iterator | begin () |
ConstIterator | end () const |
Iterator | end () |
void | clear () |
void | insertAddressee (const Addressee &addr) |
void | removeAddressee (const Addressee &addr) |
void | removeAddressee (const Iterator &it) |
Iterator | find (const Addressee &addr) |
Addressee | findByUid (const QString &uid) |
Addressee::List | allAddressees () |
Addressee::List | findByName (const QString &name) |
Addressee::List | findByEmail (const QString &email) |
Addressee::List | findByCategory (const QString &category) |
virtual QString | identifier () |
Field::List | fields (int category=Field::All) |
bool | addCustomField (const QString &label, int category=Field::All, const QString &key=QString::null, const QString &app=QString::null) |
bool | addResource (Resource *resource) |
bool | removeResource (Resource *resource) |
QPtrList< Resource > | resources () |
void | setErrorHandler (ErrorHandler *errorHandler) |
void | error (const QString &msg) |
void | cleanUp () KDE_DEPRECATED |
void | dump () const |
void | emitAddressBookLocked () |
void | emitAddressBookUnlocked () |
void | emitAddressBookChanged () |
Protected Slots | |
void | resourceLoadingFinished (Resource *) |
void | resourceSavingFinished (Resource *) |
void | resourceLoadingError (Resource *, const QString &) |
void | resourceSavingError (Resource *, const QString &) |
Protected Member Functions | |
void | deleteRemovedAddressees () |
void | setStandardResource (Resource *) |
Resource * | standardResource () |
KRES::Manager< Resource > * | resourceManager () |
Friends | |
class | StdAddressBook |
KABC_EXPORT QDataStream & | operator<< (QDataStream &, const AddressBook &) |
KABC_EXPORT QDataStream & | operator>> (QDataStream &, AddressBook &) |
Classes | |
class | ConstIterator |
Address Book Const Iterator. More... | |
class | Iterator |
Address Book Iterator. More... |
Detailed Description
Address Book.This class provides access to a collection of address book entries.
Definition at line 43 of file addressbook.h.
Constructor & Destructor Documentation
|
Constructs an address book object. You have to add the resources manually before calling load(). |
|
Constructs an address book object. The resources are loaded automatically.
|
|
Destructor.
|
Member Function Documentation
|
Requests a ticket for saving the addressbook. Calling this function locks the addressbook for all other processes. You need the returned ticket object for calling the save() function.
|
|
Releases the ticket requested previously with requestSaveTicket(). Call this function, if you want to release a ticket without saving. |
|
Loads all addressees synchronously.
|
|
Loads all addressees asynchronously. This function returns immediately and emits the addressBookChanged() signal as soon as the loading has finished.
|
|
Saves all addressees of one resource synchronously. If the save is successfull the ticket is deleted.
|
|
Saves all addressees of one resource asynchronously. If the save is successfull the ticket is deleted.
|
|
Returns an iterator pointing to the first addressee of address book. This iterator equals end() if the address book is empty. |
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. |
|
Returns an iterator pointing to the last addressee of address book. This iterator equals begin() if the address book is empty. |
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. |
|
Removes all addressees from the address book.
|
|
Insert an addressee into the address book. If an addressee with the same unique id already exists, it is replaced by the new one, otherwise it is appended.
|
|
Removes an addressee from the address book.
|
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
|
Returns an iterator pointing to the specified addressee. It will return end() if no addressee matched.
|
|
Searches an addressee with the specified unique identifier.
Referenced by KABC::StdAddressBook::whoAmI(). |
|
Returns a list of all addressees in the address book.
|
|
Searches all addressees which match the specified name.
|
|
Searches all addressees which match the specified email address.
|
|
Searches all addressees which belongs to the specified category.
|
|
Returns a string identifying this addressbook. The identifier is created by concatenation of the resource identifiers. |
|
Returns a list of all Fields known to the address book which are associated with the given field category.
|
|
Add custom field to address book.
|
|
Adds a resource to the address book.
|
|
Removes a resource from the address book.
|
|
Returns a list of all resources.
|
|
Sets the
|
|
Shows GUI independent error messages.
|
|
|
|
Used for debug output. This function prints out the list of all addressees to kdDebug(5700). |
|
Emitted when one of the resources discovered a change in its backend or the asynchronous loading of all resources has finished. You should connect to this signal to update the presentation of the contact data in your application.
|
|
Emitted when one of the resources has been locked for writing.
|
|
Emitted when one of the resources has been unlocked. You should connect to this signal if you want to save your changes to a resource which is currently locked, and want to get notified when saving is possible again.
|
|
Emitted when the asynchronous loading of one resource has finished after calling asyncLoad().
|
|
Emitted when the asynchronous saving of one resource has finished after calling asyncSave().
|
The documentation for this class was generated from the following file: