#include <stdaddressbook.h>
Public Member Functions | |
~StdAddressBook () | |
Addressee | whoAmI () |
void | setWhoAmI (const Addressee &addr) |
Public Member Functions inherited from TDEABC::AddressBook | |
AddressBook () | |
AddressBook (const TQString &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 TQString &uid) |
Addressee::List | allAddressees () |
Addressee::List | findByName (const TQString &name) |
Addressee::List | findByEmail (const TQString &email) |
Addressee::List | findByCategory (const TQString &category) |
virtual TQString | identifier () |
Field::List | fields (int category=Field::All) |
bool | addCustomField (const TQString &label, int category=Field::All, const TQString &key=TQString::null, const TQString &app=TQString::null) |
bool | addResource (Resource *resource) |
bool | removeResource (Resource *resource) |
TQPtrList< Resource > | resources () |
void | setErrorHandler (ErrorHandler *errorHandler) |
void | error (const TQString &msg) |
void | cleanUp () TDE_DEPRECATED |
void | dump () const |
void | emitAddressBookLocked () |
void | emitAddressBookUnlocked () |
void | emitAddressBookChanged () |
bool | loadingHasFinished () const |
Static Public Member Functions | |
static StdAddressBook * | self () |
static StdAddressBook * | self (bool asynchronous) |
static bool | save () TDE_DEPRECATED |
static void | handleCrash () TDE_DEPRECATED |
static TQString | fileName () |
static TQString | directoryName () |
static void | setAutomaticSave (bool state) |
static void | close () |
static bool | automaticSave () |
Protected Member Functions | |
StdAddressBook (bool asynchronous) | |
void | init (bool asynchronous) |
bool | saveAll () |
Protected Member Functions inherited from TDEABC::AddressBook | |
void | deleteRemovedAddressees () |
void | setStandardResource (Resource *) |
Resource * | standardResource () |
KRES::Manager< Resource > * | resourceManager () |
Additional Inherited Members | |
Signals inherited from TDEABC::AddressBook | |
void | addressBookChanged (AddressBook *addressBook) |
void | addressBookLocked (AddressBook *addressBook) |
void | addressBookUnlocked (AddressBook *addressBook) |
void | loadingFinished (Resource *resource) |
void | savingFinished (Resource *resource) |
Protected Slots inherited from TDEABC::AddressBook | |
void | resourceLoadingFinished (Resource *) |
void | resourceSavingFinished (Resource *) |
void | resourceLoadingError (Resource *, const TQString &) |
void | resourceSavingError (Resource *, const TQString &) |
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:
Definition at line 56 of file stdaddressbook.h.
Constructor & Destructor Documentation
◆ ~StdAddressBook()
StdAddressBook::~StdAddressBook | ( | ) |
Destructor.
Definition at line 89 of file stdaddressbook.cpp.
Member Function Documentation
◆ automaticSave()
|
static |
Returns whether the address book is saved at destruction time.
See also setAutomaticSave().
Definition at line 183 of file stdaddressbook.cpp.
◆ close()
|
static |
Closes the address book.
Depending on automaticSave() it will save the address book first.
Definition at line 173 of file stdaddressbook.cpp.
◆ directoryName()
|
static |
Returns the default directory name for vcard-based addressbook.
Definition at line 48 of file stdaddressbook.cpp.
◆ fileName()
|
static |
Returns the default file name for vcard-based addressbook.
Definition at line 43 of file stdaddressbook.cpp.
◆ handleCrash()
|
static |
- Deprecated:
- There is no need to call this function anymore.
Definition at line 53 of file stdaddressbook.cpp.
◆ save()
|
static |
Saves the standard address book to disk.
- Deprecated:
- Use AddressBook::save( Ticket* ) instead
Definition at line 163 of file stdaddressbook.cpp.
◆ self() [1/2]
|
static |
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.
◆ self() [2/2]
|
static |
This is the same as above, but with specified behaviour of resource loading.
- Parameters
-
asynchronous When true, the resources are loaded asynchronous, that means you have the data foremost the addressBookChanged() signal has been emitted. So connect to this signal when using this method!
Definition at line 65 of file stdaddressbook.cpp.
◆ setAutomaticSave()
|
static |
Sets the automatic save property of the address book.
- Parameters
-
state If true, the address book is saved automatically at destruction time, otherwise you have to call AddressBook::save( Ticket* ).
Definition at line 178 of file stdaddressbook.cpp.
◆ setWhoAmI()
void StdAddressBook::setWhoAmI | ( | const Addressee & | addr | ) |
Sets the users contact.
See whoAmI() for more information.
- Parameters
-
addr The users contact.
Definition at line 197 of file stdaddressbook.cpp.
◆ whoAmI()
Addressee StdAddressBook::whoAmI | ( | ) |
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 189 of file stdaddressbook.cpp.
The documentation for this class was generated from the following files: