\section{KABC::Std\-Address\-Book Class Reference}
\label{classKABC_1_1StdAddressBook}\index{KABC::StdAddressBook@{KABC::StdAddressBook}}
Standard {\bf KDE} address book.  


{\tt \#include $<$stdaddressbook.h$>$}

Inheritance diagram for KABC::Std\-Address\-Book:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=82pt]{classKABC_1_1StdAddressBook__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KABC::Std\-Address\-Book:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=121pt]{classKABC_1_1StdAddressBook__coll__graph}
\end{center}
\end{figure}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Address\-Book} $\ast$ {\bf self} ()
\begin{CompactList}\small\item\em Return the standard addressbook object. \item\end{CompactList}\item 
{\bf Address\-Book} $\ast$ {\bf self} (bool only\-Fast\-Resources)
\begin{CompactList}\small\item\em This is the same as above, but with specified behaviour of resource loading. \item\end{CompactList}\item 
bool {\bf save} ()
\begin{CompactList}\small\item\em Save the standard address book to disk. \item\end{CompactList}\item 
void {\bf handle\-Crash} ()
\begin{CompactList}\small\item\em Call this method in your crash handler to allow the library clean up possible locks. \item\end{CompactList}\item 
{\bf QString} {\bf file\-Name} ()
\begin{CompactList}\small\item\em Returns the default file name for vcard-based addressbook. \item\end{CompactList}\item 
{\bf QString} {\bf directory\-Name} ()
\begin{CompactList}\small\item\em Returns the default directory name for vcard-based addressbook. \item\end{CompactList}\item 
void {\bf set\-Automatic\-Save} (bool enable)
\begin{CompactList}\small\item\em Set the automatic save property of the address book. \item\end{CompactList}\item 
void {\bf close} ()
\begin{CompactList}\small\item\em Closes the address book. \item\end{CompactList}\item 
bool {\bf automatic\-Save} ()
\begin{CompactList}\small\item\em Returns whether the address book is saved at destruction time. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Std\-Address\-Book} (bool only\-Fast\-Resources)\label{classKABC_1_1StdAddressBook_b1}

\item 
void {\bf init} (bool only\-Fast\-Resources)\label{classKABC_1_1StdAddressBook_b3}

\end{CompactItemize}


\subsection{Detailed Description}
Standard {\bf KDE} address book. 

This class provides access to the standard {\bf KDE} address book shared by all applications.

It's implemented as a singleton. Use {\bf self}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e0})}() to get the address book object.

Example:

\small\begin{alltt}
  {\bf KABC::AddressBook}{\rm (p.\,\pageref{classKABC_1_1AddressBook})} *ab = {\bf KABC::StdAddressBook::self()}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e0})};\end{alltt}\normalsize 


\small\begin{alltt}  if ( !ab-$>${\bf load()}{\rm (p.\,\pageref{classKABC_1_1AddressBook_a3})} ) \{
    // error
  \}\end{alltt}\normalsize 


\small\begin{alltt}  {\bf KABC::AddressBook::Iterator}{\rm (p.\,\pageref{classKABC_1_1AddressBook_1_1Iterator})} it;
  for ( it = ab-$>${\bf begin()}{\rm (p.\,\pageref{classKABC_1_1AddressBook_a5})}; it != ab-$>${\bf end()}{\rm (p.\,\pageref{classKABC_1_1AddressBook_a7})}; ++it ) \{
    kdDebug() $<$$<$ "UID=" $<$$<$ (*it).uid() $<$$<$ endl;\end{alltt}\normalsize 


\small\begin{alltt}    // do some other stuff
  \}\end{alltt}\normalsize 


\small\begin{alltt}  {\bf KABC::StdAddressBook::save()}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e2})};
  \end{alltt}\normalsize 
 



Definition at line 56 of file stdaddressbook.h.

\subsection{Member Function Documentation}
\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!self@{self}}
\index{self@{self}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Address\-Book} $\ast$ Std\-Address\-Book::self ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e0}


Return the standard addressbook object. 



Definition at line 56 of file stdaddressbook.cpp.

Referenced by save().\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!self@{self}}
\index{self@{self}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Address\-Book} $\ast$ Std\-Address\-Book::self (bool {\em only\-Fast\-Resources})\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e1}


This is the same as above, but with specified behaviour of resource loading. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em only\-Fast\-Resource}]Only resources marked as 'fast' should be loaded \end{description}
\end{Desc}


Definition at line 66 of file stdaddressbook.cpp.\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!save@{save}}
\index{save@{save}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Std\-Address\-Book::save ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e2}


Save the standard address book to disk. 



Definition at line 76 of file stdaddressbook.cpp.

References QPtr\-List::at(), QPtr\-List::count(), KABC::Address\-Book::delete\-Removed\-Addressees(), KABC::Address\-Book::error(), KABC::Address\-Book::request\-Save\-Ticket(), KABC::Address\-Book::resources(), KABC::Address\-Book::save(), and self().\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!handleCrash@{handleCrash}}
\index{handleCrash@{handleCrash}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Std\-Address\-Book::handle\-Crash ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e3}


Call this method in your crash handler to allow the library clean up possible locks. 



Definition at line 51 of file stdaddressbook.cpp.\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!fileName@{fileName}}
\index{fileName@{fileName}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} Std\-Address\-Book::file\-Name ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e4}


Returns the default file name for vcard-based addressbook. 



Definition at line 41 of file stdaddressbook.cpp.

References locate\-Local().\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!directoryName@{directoryName}}
\index{directoryName@{directoryName}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} Std\-Address\-Book::directory\-Name ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e5}


Returns the default directory name for vcard-based addressbook. 



Definition at line 46 of file stdaddressbook.cpp.

References locate\-Local().\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!setAutomaticSave@{setAutomaticSave}}
\index{setAutomaticSave@{setAutomaticSave}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Std\-Address\-Book::set\-Automatic\-Save (bool {\em enable})\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e6}


Set the automatic save property of the address book. 

If {\tt enable} is TRUE (default) the address book is saved at destruction time otherwise you have to call {\bf save}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e2})}() to explicitely save it. 

Definition at line 181 of file stdaddressbook.cpp.\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!close@{close}}
\index{close@{close}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Std\-Address\-Book::close ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e7}


Closes the address book. 

Depending on {\bf automatic\-Save}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e8})}() it will save the address book first. 

Definition at line 175 of file stdaddressbook.cpp.\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!automaticSave@{automaticSave}}
\index{automaticSave@{automaticSave}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Std\-Address\-Book::automatic\-Save ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e8}


Returns whether the address book is saved at destruction time. 

See also {\bf set\-Automatic\-Save}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e6})}(). 

Definition at line 186 of file stdaddressbook.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
stdaddressbook.h\item 
stdaddressbook.cpp\end{CompactItemize}
