.TH "KABC::StdAddressBook" kde3 "11 Jun 2005" "Version Version 3.4.1" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::StdAddressBook \- Standard \fBKDE\fP address book.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <stdaddressbook.h>\fP
.PP
Inherits \fBKABC::AddressBook\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fB~StdAddressBook\fP ()"
.br
.ti -1c
.RI "\fBAddressee\fP \fBwhoAmI\fP ()"
.br
.ti -1c
.RI "void \fBsetWhoAmI\fP (const \fBAddressee\fP &addr)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBStdAddressBook\fP * \fBself\fP ()"
.br
.ti -1c
.RI "static \fBStdAddressBook\fP * \fBself\fP (bool asynchronous)"
.br
.ti -1c
.RI "static bool \fBsave\fP () KDE_DEPRECATED"
.br
.ti -1c
.RI "static void \fBhandleCrash\fP () KDE_DEPRECATED"
.br
.ti -1c
.RI "static \fBQString\fP \fBfileName\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBdirectoryName\fP ()"
.br
.ti -1c
.RI "static void \fBsetAutomaticSave\fP (bool state)"
.br
.ti -1c
.RI "static void \fBclose\fP ()"
.br
.ti -1c
.RI "static bool \fBautomaticSave\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBStdAddressBook\fP (bool asynchronous)"
.br
.ti -1c
.RI "void \fBinit\fP (bool asynchronous)"
.br
.ti -1c
.RI "bool \fBsaveAll\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Standard \fBKDE\fP address book. 

This class provides access to the standard \fBKDE\fP address book shared by all applications.
.PP
It's implemented as a singleton. Use \fBself()\fP to get the address book object. On the first \fBself()\fP call the address book also gets loaded.
.PP
Example:
.PP
.PP
.nf
  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 );
  }
.fi
.PP
 
.PP
Definition at line 56 of file stdaddressbook.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "StdAddressBook::~\fBStdAddressBook\fP ()"
.PP
Destructor. 
.PP
Definition at line 93 of file stdaddressbook.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBStdAddressBook\fP * StdAddressBook::self ()\fC [static]\fP"
.PP
Returns the standard addressbook object. 
.PP
It also loads all resources of the users standard address book synchronously. 
.PP
Definition at line 57 of file stdaddressbook.cpp.
.PP
References endl(), kdDebug(), and KStaticDeleter< type >::setObject().
.PP
Referenced by KABC::AddresseeDialog::AddresseeDialog().
.SS "\fBStdAddressBook\fP * StdAddressBook::self (bool asynchronous)\fC [static]\fP"
.PP
This is the same as above, but with specified behaviour of resource loading. 
.PP
\fBParameters:\fP
.RS 4
\fIasynchronous\fP When true, the resources are loaded asynchronous, that means you have the data foremost the \fBaddressBookChanged()\fP signal has been emitted. So connect to this signal when using this method! 
.RE
.PP

.PP
Definition at line 67 of file stdaddressbook.cpp.
.PP
References endl(), kdDebug(), and KStaticDeleter< type >::setObject().
.SS "bool StdAddressBook::save ()\fC [static]\fP"
.PP
Saves the standard address book to disk. 
.PP
\fBDeprecated\fP
.RS 4
Use \fBAddressBook::save( Ticket* )\fP instead 
.RE
.PP

.PP
Definition at line 167 of file stdaddressbook.cpp.
.PP
References endl(), kdDebug(), and saveAll().
.SS "void StdAddressBook::handleCrash ()\fC [static]\fP"
.PP
\fBDeprecated\fP
.RS 4
There is no need to call this function anymore. 
.RE
.PP

.PP
Definition at line 53 of file stdaddressbook.cpp.
.SS "\fBQString\fP StdAddressBook::fileName ()\fC [static]\fP"
.PP
Returns the default file name for vcard-based addressbook. 
.PP
Definition at line 43 of file stdaddressbook.cpp.
.PP
References locateLocal().
.SS "\fBQString\fP StdAddressBook::directoryName ()\fC [static]\fP"
.PP
Returns the default directory name for vcard-based addressbook. 
.PP
Definition at line 48 of file stdaddressbook.cpp.
.PP
References locateLocal().
.SS "void StdAddressBook::setAutomaticSave (bool state)\fC [static]\fP"
.PP
Sets the automatic save property of the address book. 
.PP
\fBParameters:\fP
.RS 4
\fIstate\fP If true, the address book is saved automatically at destruction time, otherwise you have to call \fBAddressBook::save( Ticket* )\fP. 
.RE
.PP

.PP
Definition at line 182 of file stdaddressbook.cpp.
.SS "void StdAddressBook::close ()\fC [static]\fP"
.PP
Closes the address book. 
.PP
Depending on \fBautomaticSave()\fP it will save the address book first. 
.PP
Definition at line 177 of file stdaddressbook.cpp.
.PP
References KStaticDeleter< type >::destructObject().
.SS "bool StdAddressBook::automaticSave ()\fC [static]\fP"
.PP
Returns whether the address book is saved at destruction time. 
.PP
See also \fBsetAutomaticSave()\fP. 
.PP
Definition at line 187 of file stdaddressbook.cpp.
.SS "\fBAddressee\fP StdAddressBook::whoAmI ()"
.PP
Returns the contact, that is associated with the owner of the address book. 
.PP
This contact should be used by other programs to access user specific data. 
.PP
Definition at line 193 of file stdaddressbook.cpp.
.PP
References KABC::AddressBook::findByUid(), KConfigBase::readEntry(), and KConfigBase::setGroup().
.SS "void StdAddressBook::setWhoAmI (const \fBAddressee\fP & addr)"
.PP
Sets the users contact. 
.PP
See \fBwhoAmI()\fP for more information.
.PP
\fBParameters:\fP
.RS 4
\fIaddr\fP The users contact. 
.RE
.PP

.PP
Definition at line 201 of file stdaddressbook.cpp.
.PP
References KConfigBase::setGroup(), and KConfigBase::writeEntry().

.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
