\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=79pt]{classKABC_1_1StdAddressBook__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KABC::Std\-Address\-Book:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=111pt]{classKABC_1_1StdAddressBook__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf $\sim$Std\-Address\-Book} ()
\item 
{\bf Addressee} {\bf who\-Am\-I} ()
\item 
void {\bf set\-Who\-Am\-I} (const {\bf Addressee} \&addr)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf Std\-Address\-Book} $\ast$ {\bf self} ()
\item 
static {\bf Std\-Address\-Book} $\ast$ {\bf self} (bool asynchronous)
\item 
static bool {\bf save} () KDE\_\-DEPRECATED
\item 
static void {\bf handle\-Crash} () KDE\_\-DEPRECATED
\item 
static {\bf QString} {\bf file\-Name} ()
\item 
static {\bf QString} {\bf directory\-Name} ()
\item 
static void {\bf set\-Automatic\-Save} (bool state)
\item 
static void {\bf close} ()
\item 
static bool {\bf automatic\-Save} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Std\-Address\-Book} (bool asynchronous)\label{classKABC_1_1StdAddressBook_b1}

\item 
void {\bf init} (bool asynchronous)\label{classKABC_1_1StdAddressBook_b2}

\item 
bool {\bf save\-All} ()\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. On the first {\bf self()}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_e0})} call the address book also gets loaded.

Example:



\footnotesize\begin{verbatim}  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 );
  }
\end{verbatim}
\normalsize
 



Definition at line 56 of file stdaddressbook.h.

\subsection{Constructor \& Destructor Documentation}
\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!~StdAddressBook@{$\sim$StdAddressBook}}
\index{~StdAddressBook@{$\sim$StdAddressBook}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Std\-Address\-Book::$\sim${\bf Std\-Address\-Book} ()}\label{classKABC_1_1StdAddressBook_a0}


Destructor. 



Definition at line 93 of file stdaddressbook.cpp.

\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 Std\-Address\-Book} $\ast$ Std\-Address\-Book::self ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e0}


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(), kd\-Debug(), and KStatic\-Deleter$<$ type $>$::set\-Object().

Referenced by KABC::Addressee\-Dialog::Addressee\-Dialog().\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 Std\-Address\-Book} $\ast$ Std\-Address\-Book::self (bool {\em asynchronous})\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 asynchronous}]When true, the resources are loaded asynchronous, that means you have the data foremost the {\bf address\-Book\-Changed()}{\rm (p.\,\pageref{classKABC_1_1AddressBook_l0})} signal has been emitted. So connect to this signal when using this method! \end{description}
\end{Desc}


Definition at line 67 of file stdaddressbook.cpp.

References endl(), kd\-Debug(), and KStatic\-Deleter$<$ type $>$::set\-Object().\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}


Saves the standard address book to disk. 

\begin{Desc}
\item[{\bf Deprecated}]Use {\bf Address\-Book::save( Ticket$\ast$ )}{\rm (p.\,\pageref{classKABC_1_1AddressBook_a7})} instead \end{Desc}


Definition at line 167 of file stdaddressbook.cpp.

References endl(), kd\-Debug(), and save\-All().\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}


\begin{Desc}
\item[{\bf Deprecated}]There is no need to call this function anymore. \end{Desc}


Definition at line 53 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 43 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 48 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 state})\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1StdAddressBook_e6}


Sets the automatic save property of the address book. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]If true, the address book is saved automatically at destruction time, otherwise you have to call {\bf Address\-Book::save( Ticket$\ast$ )}{\rm (p.\,\pageref{classKABC_1_1AddressBook_a7})}. \end{description}
\end{Desc}


Definition at line 182 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 177 of file stdaddressbook.cpp.

References KStatic\-Deleter$<$ type $>$::destruct\-Object().\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 187 of file stdaddressbook.cpp.\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!whoAmI@{whoAmI}}
\index{whoAmI@{whoAmI}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Addressee} Std\-Address\-Book::who\-Am\-I ()}\label{classKABC_1_1StdAddressBook_a1}


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::Address\-Book::find\-By\-Uid(), KConfig\-Base::read\-Entry(), and KConfig\-Base::set\-Group().\index{KABC::StdAddressBook@{KABC::Std\-Address\-Book}!setWhoAmI@{setWhoAmI}}
\index{setWhoAmI@{setWhoAmI}!KABC::StdAddressBook@{KABC::Std\-Address\-Book}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Std\-Address\-Book::set\-Who\-Am\-I (const {\bf Addressee} \& {\em addr})}\label{classKABC_1_1StdAddressBook_a2}


Sets the users contact. 

See {\bf who\-Am\-I()}{\rm (p.\,\pageref{classKABC_1_1StdAddressBook_a1})} for more information.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]The users contact. \end{description}
\end{Desc}


Definition at line 201 of file stdaddressbook.cpp.

References KConfig\-Base::set\-Group(), and KConfig\-Base::write\-Entry().

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