.TH "KABC::StdAddressBook" 3 "28 Jan 2004" "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 "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBAddressBook\fP * \fBself\fP ()"
.br
.RI "\fIReturn the standard addressbook object. \fP"
.ti -1c
.RI "\fBAddressBook\fP * \fBself\fP (bool onlyFastResources)"
.br
.RI "\fIThis is the same as above, but with specified behaviour of resource loading. \fP"
.ti -1c
.RI "bool \fBsave\fP ()"
.br
.RI "\fISave the standard address book to disk. \fP"
.ti -1c
.RI "void \fBhandleCrash\fP ()"
.br
.RI "\fICall this method in your crash handler to allow the library clean up possible locks. \fP"
.ti -1c
.RI "\fBQString\fP \fBfileName\fP ()"
.br
.RI "\fIReturns the default file name for vcard-based addressbook. \fP"
.ti -1c
.RI "\fBQString\fP \fBdirectoryName\fP ()"
.br
.RI "\fIReturns the default directory name for vcard-based addressbook. \fP"
.ti -1c
.RI "void \fBsetAutomaticSave\fP (bool enable)"
.br
.RI "\fISet the automatic save property of the address book. \fP"
.ti -1c
.RI "void \fBclose\fP ()"
.br
.RI "\fICloses the address book. \fP"
.ti -1c
.RI "bool \fBautomaticSave\fP ()"
.br
.RI "\fIReturns whether the address book is saved at destruction time. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBStdAddressBook\fP (bool onlyFastResources)"
.br
.ti -1c
.RI "void \fBinit\fP (bool onlyFastResources)"
.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.
.PP
Example:
.PP
.PP
.nf

  \fBKABC::AddressBook\fP *ab = \fBKABC::StdAddressBook::self()\fP;
.PP
.PP
.PP
.nf
  if ( !ab->\fBload()\fP ) {
    // error
  }
.PP
.PP
.PP
.nf
  \fBKABC::AddressBook::Iterator\fP it;
  for ( it = ab->\fBbegin()\fP; it != ab->\fBend()\fP; ++it ) {
    kdDebug() << 'UID=' << (*it).uid() << endl;
.PP
.PP
.PP
.nf
    // do some other stuff
  }
.PP
.PP
.PP
.nf
  \fBKABC::StdAddressBook::save()\fP;
  
.PP
 
.PP
Definition at line 56 of file stdaddressbook.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBAddressBook\fP * StdAddressBook::self ()\fC [static]\fP"
.PP
Return the standard addressbook object. Definition at line 56 of file stdaddressbook.cpp.
.PP
Referenced by save().
.SS "\fBAddressBook\fP * StdAddressBook::self (bool onlyFastResources)\fC [static]\fP"
.PP
This is the same as above, but with specified behaviour of resource loading. \fBParameters:\fP
.RS 4
\fIonlyFastResource\fP Only resources marked as 'fast' should be loaded 
.RE
.PP
Definition at line 66 of file stdaddressbook.cpp.
.SS "bool StdAddressBook::save ()\fC [static]\fP"
.PP
Save the standard address book to disk. Definition at line 76 of file stdaddressbook.cpp.
.PP
References QPtrList::at(), QPtrList::count(), KABC::AddressBook::deleteRemovedAddressees(), KABC::AddressBook::error(), KABC::AddressBook::requestSaveTicket(), KABC::AddressBook::resources(), KABC::AddressBook::save(), and self().
.SS "void StdAddressBook::handleCrash ()\fC [static]\fP"
.PP
Call this method in your crash handler to allow the library clean up possible locks. Definition at line 51 of file stdaddressbook.cpp.
.SS "\fBQString\fP StdAddressBook::fileName ()\fC [static]\fP"
.PP
Returns the default file name for vcard-based addressbook. Definition at line 41 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. Definition at line 46 of file stdaddressbook.cpp.
.PP
References locateLocal().
.SS "void StdAddressBook::setAutomaticSave (bool enable)\fC [static]\fP"
.PP
Set the automatic save property of the address book. If \fCenable\fP is TRUE (default) the address book is saved at destruction time otherwise you have to call \fBsave\fP() to explicitely save it. Definition at line 181 of file stdaddressbook.cpp.
.SS "void StdAddressBook::close ()\fC [static]\fP"
.PP
Closes the address book. Depending on \fBautomaticSave\fP() it will save the address book first. Definition at line 175 of file stdaddressbook.cpp.
.SS "bool StdAddressBook::automaticSave ()\fC [static]\fP"
.PP
Returns whether the address book is saved at destruction time. See also \fBsetAutomaticSave\fP(). Definition at line 186 of file stdaddressbook.cpp.

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