\section{KABC::Resource\-File Class Reference}
\label{classKABC_1_1ResourceFile}\index{KABC::ResourceFile@{KABC::ResourceFile}}
This resource allows access to a local file.  


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

Collaboration diagram for KABC::Resource\-File:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=269pt]{classKABC_1_1ResourceFile__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Resource\-File} (const {\bf KConfig} $\ast$cfg)
\item 
{\bf Resource\-File} (const {\bf QString} \&file\-Name, const {\bf QString} \&format\-Name=\char`\"{}vcard\char`\"{})
\item 
{\bf $\sim$Resource\-File} ()
\item 
virtual void {\bf write\-Config} ({\bf KConfig} $\ast$cfg)
\item 
virtual bool {\bf do\-Open} ()
\item 
virtual void {\bf do\-Close} ()
\item 
virtual {\bf Ticket} $\ast$ {\bf request\-Save\-Ticket} ()
\item 
virtual void {\bf release\-Save\-Ticket} ({\bf Ticket} $\ast$)\label{classKABC_1_1ResourceFile_a7}

\item 
virtual bool {\bf load} ()
\item 
virtual bool {\bf async\-Load} ()\label{classKABC_1_1ResourceFile_a9}

\item 
virtual bool {\bf save} ({\bf Ticket} $\ast$ticket)
\item 
virtual bool {\bf async\-Save} ({\bf Ticket} $\ast$ticket)\label{classKABC_1_1ResourceFile_a11}

\item 
void {\bf set\-File\-Name} (const {\bf QString} \&)
\item 
{\bf QString} {\bf file\-Name} () const 
\item 
void {\bf set\-Format} (const {\bf QString} \&name)
\item 
{\bf QString} {\bf format} () const 
\item 
virtual void {\bf remove\-Addressee} (const {\bf Addressee} \&addr)
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf file\-Changed} ()\label{classKABC_1_1ResourceFile_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf init} (const {\bf QString} \&file\-Name, const {\bf QString} \&format)\label{classKABC_1_1ResourceFile_b0}

\item 
bool {\bf lock} (const {\bf QString} \&file\-Name)\label{classKABC_1_1ResourceFile_b1}

\item 
void {\bf unlock} (const {\bf QString} \&file\-Name)\label{classKABC_1_1ResourceFile_b2}

\end{CompactItemize}


\subsection{Detailed Description}
This resource allows access to a local file. 



Definition at line 48 of file resourcefile.h.

\subsection{Constructor \& Destructor Documentation}
\index{KABC::ResourceFile@{KABC::Resource\-File}!ResourceFile@{ResourceFile}}
\index{ResourceFile@{ResourceFile}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC::Resource\-File::Resource\-File (const {\bf KConfig} $\ast$ {\em cfg})}\label{classKABC_1_1ResourceFile_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cfg}]The config object where custom resource settings are stored. \end{description}
\end{Desc}
\index{KABC::ResourceFile@{KABC::Resource\-File}!ResourceFile@{ResourceFile}}
\index{ResourceFile@{ResourceFile}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC::Resource\-File::Resource\-File (const {\bf QString} \& {\em file\-Name}, const {\bf QString} \& {\em format\-Name} = {\tt \char`\"{}vcard\char`\"{}})}\label{classKABC_1_1ResourceFile_a1}


Construct file resource on file \begin{itemize}
\item file\-Name using format \item format\-Name. \end{itemize}


\index{KABC::ResourceFile@{KABC::Resource\-File}!~ResourceFile@{$\sim$ResourceFile}}
\index{~ResourceFile@{$\sim$ResourceFile}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC::Resource\-File::$\sim${\bf Resource\-File} ()}\label{classKABC_1_1ResourceFile_a2}


Destructor. 



\subsection{Member Function Documentation}
\index{KABC::ResourceFile@{KABC::Resource\-File}!writeConfig@{writeConfig}}
\index{writeConfig@{writeConfig}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KABC::Resource\-File::write\-Config ({\bf KConfig} $\ast$ {\em cfg})\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a3}


Writes the config back. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!doOpen@{doOpen}}
\index{doOpen@{doOpen}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KABC::Resource\-File::do\-Open ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a4}


Tries to open the file and checks for the proper format. 

This method should be called before {\bf load()}{\rm (p.\,\pageref{classKABC_1_1ResourceFile_a8})}. \index{KABC::ResourceFile@{KABC::Resource\-File}!doClose@{doClose}}
\index{doClose@{doClose}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KABC::Resource\-File::do\-Close ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a5}


Closes the file again. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!requestSaveTicket@{requestSaveTicket}}
\index{requestSaveTicket@{requestSaveTicket}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf Ticket}$\ast$ KABC::Resource\-File::request\-Save\-Ticket ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a6}


Requests a save ticket, that is used by {\bf save()}{\rm (p.\,\pageref{classKABC_1_1ResourceFile_a10})}. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!load@{load}}
\index{load@{load}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KABC::Resource\-File::load ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a8}


Loads all addressees from file to the address book. 

Returns true if all addressees could be loaded otherwise false. \index{KABC::ResourceFile@{KABC::Resource\-File}!save@{save}}
\index{save@{save}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KABC::Resource\-File::save ({\bf Ticket} $\ast$ {\em ticket})\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a10}


Saves all addresses from address book to file. 

Returns true if all addressees could be saved otherwise false.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ticket}]The ticket returned by {\bf request\-Save\-Ticket()}{\rm (p.\,\pageref{classKABC_1_1ResourceFile_a6})} \end{description}
\end{Desc}
\index{KABC::ResourceFile@{KABC::Resource\-File}!setFileName@{setFileName}}
\index{setFileName@{setFileName}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KABC::Resource\-File::set\-File\-Name (const {\bf QString} \&)}\label{classKABC_1_1ResourceFile_a12}


Set name of file to be used for saving. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!fileName@{fileName}}
\index{fileName@{fileName}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KABC::Resource\-File::file\-Name () const}\label{classKABC_1_1ResourceFile_a13}


Return name of file used for loading and saving the address book. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!setFormat@{setFormat}}
\index{setFormat@{setFormat}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KABC::Resource\-File::set\-Format (const {\bf QString} \& {\em name})}\label{classKABC_1_1ResourceFile_a14}


Sets a new format by name. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!format@{format}}
\index{format@{format}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KABC::Resource\-File::format () const}\label{classKABC_1_1ResourceFile_a15}


Returns the format name. 

\index{KABC::ResourceFile@{KABC::Resource\-File}!removeAddressee@{removeAddressee}}
\index{removeAddressee@{removeAddressee}!KABC::ResourceFile@{KABC::Resource\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KABC::Resource\-File::remove\-Addressee (const {\bf Addressee} \& {\em addr})\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1ResourceFile_a16}


Remove a addressee from its source. 

This method is mainly called by {\bf KABC::Address\-Book}{\rm (p.\,\pageref{classKABC_1_1AddressBook})}. 

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