KABC::StdAddressBook Class Reference
Standard KDE address book. More...
#include <stdaddressbook.h>
Inheritance diagram for KABC::StdAddressBook:

Public Member Functions | |
~StdAddressBook () | |
Addressee | whoAmI () |
void | setWhoAmI (const Addressee &addr) |
Static Public Member Functions | |
StdAddressBook * | self () |
StdAddressBook * | self (bool asyncronous) |
bool | save () KDE_DEPRECATED |
void | handleCrash () KDE_DEPRECATED |
QString | fileName () |
QString | directoryName () |
void | setAutomaticSave (bool state) |
void | close () |
bool | automaticSave () |
Protected Member Functions | |
StdAddressBook (bool asynchronous) | |
void | init (bool asynchronous) |
bool | saveAll () |
Detailed Description
Standard KDE address book.This class provides access to the standard KDE address book shared by all applications.
It's implemented as a singleton. Use self() to get the address book object. On the first self() call the address book also gets loaded.
Example:
KABC::AddressBook *ab = KABC::StdAddressBook::self(); AddressBook::Ticket *ticket = ab->requestSaveTicket(); if ( ticket ) { KABC::AddressBook::Iterator it; for ( it = ab->begin(); it != ab->end(); ++it ) { kdDebug() << "UID=" << (*it).uid() << endl; // do some other stuff } KABC::StdAddressBook::save( ticket ); }
Definition at line 56 of file stdaddressbook.h.
Constructor & Destructor Documentation
|
Destructor. Definition at line 93 of file stdaddressbook.cpp. |
Member Function Documentation
|
Returns the standard addressbook object. It also loads all resources of the users standard address book synchronously. Definition at line 57 of file stdaddressbook.cpp. References endl(), and kdDebug(). Referenced by KABC::AddresseeDialog::AddresseeDialog(). |
|
This is the same as above, but with specified behaviour of resource loading.
|
|
Saves the standard address book to disk.
|
|
|
|
Returns the default file name for vcard-based addressbook. Definition at line 43 of file stdaddressbook.cpp. References locateLocal(). Referenced by KABC::ResourceFile::ResourceFile(), and KABC::ResourceFile::writeConfig(). |
|
Returns the default directory name for vcard-based addressbook. Definition at line 48 of file stdaddressbook.cpp. References locateLocal(). |
|
Sets the automatic save property of the address book.
|
|
Closes the address book. Depending on automaticSave() it will save the address book first. Definition at line 177 of file stdaddressbook.cpp. |
|
Returns whether the address book is saved at destruction time. See also setAutomaticSave(). Definition at line 187 of file stdaddressbook.cpp. |
|
Returns the contact, that is associated with the owner of the address book. This contact should be used by other programs to access user specific data. Definition at line 193 of file stdaddressbook.cpp. References KABC::AddressBook::findByUid(), KConfigBase::readEntry(), and KConfigBase::setGroup(). |
|
Sets the users contact. See whoAmI() for more information.
References KConfigBase::setGroup(), KABC::Addressee::uid(), and KConfigBase::writeEntry(). |
The documentation for this class was generated from the following files: