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 Methods | |
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. | |
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. |
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.
Definition at line 201 of file addressbook.cpp. |
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.
Definition at line 284 of file addressbook.cpp. Referenced by KABC::StdAddressBook::save(). |
|
Load address book from file.
Definition at line 217 of file addressbook.cpp. |
|
Save address book. The address book is saved to the file, the Ticket object has been requested for by requestSaveTicket().
Definition at line 239 of file addressbook.cpp. References KABC::Ticket::resource(). Referenced by KABC::StdAddressBook::save(). |
|
Returns a iterator for first entry of address book.
Definition at line 251 of file addressbook.cpp. References KABC::AddressBook::Iterator::d. Referenced by dump(), find(), findByCategory(), findByEmail(), findByName(), findByUid(), removeAddressee(), and KABC::BinaryFormat::saveAll(). |
|
Returns a const iterator for first entry of address book.
Definition at line 258 of file addressbook.cpp. References KABC::AddressBook::ConstIterator::d. |
|
Returns a iterator for first entry of address book.
Definition at line 265 of file addressbook.cpp. References KABC::AddressBook::Iterator::d. Referenced by dump(), find(), findByCategory(), findByEmail(), findByName(), findByUid(), removeAddressee(), and KABC::BinaryFormat::saveAll(). |
|
Returns a const iterator for first entry of address book.
Definition at line 272 of file addressbook.cpp. References KABC::AddressBook::ConstIterator::d. |
|
Removes all entries from address book.
Definition at line 279 of file addressbook.cpp. Referenced by load(). |
|
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. Definition at line 301 of file addressbook.cpp. References QDateTime::currentDateTime(), KABC::Addressee::resource(), KABC::Addressee::setChanged(), KABC::Addressee::setResource(), and KABC::Addressee::uid(). Referenced by KABC::BinaryFormat::loadAll(). |
|
Removes entry from the address book.
Definition at line 329 of file addressbook.cpp. References begin(), end(), and KABC::Addressee::uid(). |
|
This is like removeAddressee() just above, with the difference that the first element is a iterator, returned by begin().
Definition at line 340 of file addressbook.cpp. References KABC::AddressBook::Iterator::d. |
|
Find the specified entry in address book. Returns end(), if the entry couldn't be found. Definition at line 346 of file addressbook.cpp. References begin(), end(), and KABC::Addressee::uid(). |
|
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. Definition at line 357 of file addressbook.cpp. References begin(), and end(). 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. Definition at line 368 of file addressbook.cpp. References QValueList< Addressee >::append(), begin(), and end(). |
|
Find all entries with the specified email address in the address book. Returns an empty list, if no entries couldn't be found. Definition at line 382 of file addressbook.cpp. References QValueList< Addressee >::append(), begin(), and end(). |
|
Find all entries wich have the specified category in the address book. Returns an empty list, if no entries couldn't be found. Definition at line 400 of file addressbook.cpp. References QValueList< Addressee >::append(), begin(), and end(). |
|
Return a string identifying this addressbook.
Definition at line 426 of file addressbook.cpp. References identifier(). Referenced by identifier(), KABC::DistributionListManager::load(), and KABC::DistributionListManager::save(). |
|
Used for debug output.
Definition at line 414 of file addressbook.cpp. |
|
Return list of all Fields known to the address book which are associated with the given field category.
Definition at line 438 of file addressbook.cpp. References QValueList< Field * >::append(). |
|
Add custom field to address book.
Definition at line 455 of file addressbook.cpp. References KGlobal::instance(), KInstance::instanceName(), QString::isNull(), KStdAccel::key(), and KStdAccel::label(). |
|
Add address book resource.
Definition at line 490 of file addressbook.cpp. |
|
Remove address book resource.
Definition at line 501 of file addressbook.cpp. |
|
Return pointer list of all resources.
Definition at line 509 of file addressbook.cpp. Referenced by KABC::ResourceSelectDialog::getResource(), KABC::ResourceSelectDialog::ResourceSelectDialog(), and KABC::StdAddressBook::save(). |
|
Set the
Definition at line 514 of file addressbook.cpp. |
|
Shows gui independend error messages.
Definition at line 520 of file addressbook.cpp. Referenced by load(), and KABC::StdAddressBook::save(). |
|
Query all resources to clean up their lock files.
Definition at line 553 of file addressbook.cpp. |
|
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 files: