\section{Observer Class Reference}
\label{classObserver}\index{Observer@{Observer}}
Observer for {\bf KIO::Job}{\rm (p.\,\pageref{classKIO_1_1Job})} progress information This class, of which there is always only one instance, \char`\"{}observes\char`\"{} what jobs do and forwards this information to the progress-info server. Observer for {\bf KIO::Job}{\rm (p.\,\pageref{classKIO_1_1Job})} progress information.  


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

Inheritance diagram for Observer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=89pt]{classObserver__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Observer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=109pt]{classObserver__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Total\-Size} ({\bf KIO::Job} $\ast$, KIO::filesize\_\-t size)\label{classObserver_i0}

\item 
void {\bf slot\-Total\-Files} ({\bf KIO::Job} $\ast$, unsigned long files)\label{classObserver_i1}

\item 
void {\bf slot\-Total\-Dirs} ({\bf KIO::Job} $\ast$, unsigned long dirs)\label{classObserver_i2}

\item 
void {\bf slot\-Processed\-Size} ({\bf KIO::Job} $\ast$, KIO::filesize\_\-t size)\label{classObserver_i3}

\item 
void {\bf slot\-Processed\-Files} ({\bf KIO::Job} $\ast$, unsigned long files)\label{classObserver_i4}

\item 
void {\bf slot\-Processed\-Dirs} ({\bf KIO::Job} $\ast$, unsigned long dirs)\label{classObserver_i5}

\item 
void {\bf slot\-Speed} ({\bf KIO::Job} $\ast$, unsigned long bytes\_\-per\_\-second)\label{classObserver_i6}

\item 
void {\bf slot\-Percent} ({\bf KIO::Job} $\ast$, unsigned long percent)\label{classObserver_i7}

\item 
void {\bf slot\-Info\-Message} ({\bf KIO::Job} $\ast$, const  {\bf QString} \&msg)\label{classObserver_i8}

\item 
void {\bf slot\-Copying} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&from, const  {\bf KURL} \&to)\label{classObserver_i9}

\item 
void {\bf slot\-Moving} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&from, const  {\bf KURL} \&to)\label{classObserver_i10}

\item 
void {\bf slot\-Deleting} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&url)\label{classObserver_i11}

\item 
void {\bf slot\-Transferring} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&url)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
void {\bf slot\-Creating\-Dir} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&dir)\label{classObserver_i13}

\item 
void {\bf slot\-Can\-Resume} ({\bf KIO::Job} $\ast$, KIO::filesize\_\-t offset)\label{classObserver_i14}

\end{CompactItemize}
\subsection*{DCOP Member Functions}
\begin{CompactItemize}
\item 
void {\bf kill\-Job} (int progress\-Id)
\begin{CompactList}\small\item\em Called by the UI Server (using DCOP) if the user presses cancel. \item\end{CompactList}\item 
KIO::Meta\-Data {\bf metadata} (int progress\-Id)
\begin{CompactList}\small\item\em Called by the UI Server (using DCOP) to get all the metadata of the job. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
int {\bf new\-Job} ({\bf KIO::Job} $\ast$job, bool show\-Progress)
\begin{CompactList}\small\item\em Called by the job constructor, to signal its presence to the UI Server. \item\end{CompactList}\item 
void {\bf job\-Finished} (int progress\-Id)
\begin{CompactList}\small\item\em Called by the job destructor, to tell the UI Server that the job ended. \item\end{CompactList}\item 
bool {\bf open\-Pass\-Dlg} (const  {\bf QString} \&prompt, {\bf QString} \&user, {\bf QString} \&pass, bool read\-Only)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.}. \item\end{CompactList}\item 
bool {\bf open\-Pass\-Dlg} ({\bf KIO::Auth\-Info} \&info)\label{classObserver_a3}

\item 
KIO::Rename\-Dlg\_\-Result {\bf open\_\-Rename\-Dlg} ({\bf KIO::Job} $\ast$job, const  {\bf QString} \&caption, const  {\bf QString} \&src, const  {\bf QString} \&dest, KIO::Rename\-Dlg\_\-Mode mode, {\bf QString} \&new\-Dest, KIO::filesize\_\-t size\-Src=(KIO::filesize\_\-t)-1, KIO::filesize\_\-t size\-Dest=(KIO::filesize\_\-t)-1, time\_\-t ctime\-Src=(time\_\-t)-1, time\_\-t ctime\-Dest=(time\_\-t)-1, time\_\-t mtime\-Src=(time\_\-t)-1, time\_\-t mtime\-Dest=(time\_\-t)-1)
\begin{CompactList}\small\item\em See {\bf renamedlg.h}{\rm (p.\,\pageref{renamedlg_8h})}. \item\end{CompactList}\item 
KIO::Skip\-Dlg\_\-Result {\bf open\_\-Skip\-Dlg} ({\bf KIO::Job} $\ast$job, bool multi, const  {\bf QString} \&error\_\-text)
\begin{CompactList}\small\item\em See {\bf skipdlg.h}{\rm (p.\,\pageref{skipdlg_8h})}. \item\end{CompactList}\item 
void {\bf stating} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&url)\label{classObserver_a6}

\item 
void {\bf mounting} ({\bf KIO::Job} $\ast$, const  {\bf QString} \&dev, const  {\bf QString} \&point)\label{classObserver_a7}

\item 
void {\bf unmounting} ({\bf KIO::Job} $\ast$, const  {\bf QString} \&point)\label{classObserver_a8}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Observer} $\ast$ {\bf self} ()
\item 
int {\bf message\-Box} (int progress\-Id, int type, const  {\bf QString} \&text, const  {\bf QString} \&caption, const  {\bf QString} \&button\-Yes, const  {\bf QString} \&button\-No)
\begin{CompactList}\small\item\em Popup a message box. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classObserver_b2}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
UIServer\_\-stub $\ast$ {\bf m\_\-uiserver}\label{classObserver_p0}

\item 
{\bf QInt\-Dict}$<$ {\bf KIO::Job} $>$ {\bf m\_\-dct\-Jobs}\label{classObserver_p1}

\end{CompactItemize}
\subsection*{Static Protected Attributes}
\begin{CompactItemize}
\item 
{\bf Observer} $\ast$ {\bf s\_\-p\-Observer} = 0L\label{classObserver_t0}

\end{CompactItemize}


\subsection{Detailed Description}
Observer for {\bf KIO::Job}{\rm (p.\,\pageref{classKIO_1_1Job})} progress information This class, of which there is always only one instance, \char`\"{}observes\char`\"{} what jobs do and forwards this information to the progress-info server. Observer for {\bf KIO::Job}{\rm (p.\,\pageref{classKIO_1_1Job})} progress information. 

It is a DCOP object so that the UI server can call the kill method when the user presses Cancel.

\begin{Desc}
\item[Author:]David Faure $<${\tt faure@kde.org}$>$ \end{Desc}




Definition at line 52 of file observer.h.

\subsection{Member Function Documentation}
\index{Observer@{Observer}!self@{self}}
\index{self@{self}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Observer}$\ast$ Observer::self ()\hspace{0.3cm}{\tt  [inline, static]}}\label{classObserver_e0}


\begin{Desc}
\item[Returns:]the unique observer object \end{Desc}


Definition at line 62 of file observer.h.

Referenced by KIO::mimetype(), KIO::mount(), KIO::Slave\-Interface::open\-Pass\-Dlg(), KIO::stat(), and KIO::unmount().\index{Observer@{Observer}!newJob@{newJob}}
\index{newJob@{newJob}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Observer::new\-Job ({\bf KIO::Job} $\ast$ {\em job}, bool {\em show\-Progress})}\label{classObserver_a0}


Called by the job constructor, to signal its presence to the UI Server. 

\begin{Desc}
\item[Returns:]the progress ID assigned by the UI Server to the Job. \end{Desc}


Definition at line 81 of file observer.cpp.\index{Observer@{Observer}!jobFinished@{jobFinished}}
\index{jobFinished@{jobFinished}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Observer::job\-Finished (int {\em progress\-Id})}\label{classObserver_a1}


Called by the job destructor, to tell the UI Server that the job ended. 



Definition at line 93 of file observer.cpp.\index{Observer@{Observer}!openPassDlg@{openPassDlg}}
\index{openPassDlg@{openPassDlg}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Observer::open\-Pass\-Dlg (const {\bf QString} \& {\em prompt}, {\bf QString} \& {\em user}, {\bf QString} \& {\em pass}, bool {\em read\-Only})}\label{classObserver_a2}


{\bf This class or method is obsolete, it is provided for compatibility only.}. 



Definition at line 227 of file observer.cpp.

References KIO::Auth\-Info::password, KIO::Auth\-Info::prompt, KIO::Auth\-Info::read\-Only, and KIO::Auth\-Info::username.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg().\index{Observer@{Observer}!messageBox@{messageBox}}
\index{messageBox@{messageBox}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Observer::message\-Box (int {\em progress\-Id}, int {\em type}, const {\bf QString} \& {\em text}, const {\bf QString} \& {\em caption}, const {\bf QString} \& {\em button\-Yes}, const {\bf QString} \& {\em button\-No})\hspace{0.3cm}{\tt  [static]}}\label{classObserver_e1}


Popup a message box. 

See {\bf KIO::Slave\-Base}{\rm (p.\,\pageref{classKIO_1_1SlaveBase})}. This doesn't use DCOP anymore, it shows the dialog in the application's process. Otherwise, other apps would block when trying to communicate with {\bf UIServer}{\rm (p.\,\pageref{classUIServer})}. 

Definition at line 260 of file observer.cpp.

References QPtr\-List::append(), QPtr\-List::count(), KMessage\-Box::information(), KMessage\-Box::question\-Yes\-No(), QPtr\-List::set\-Auto\-Delete(), QString\-List::split(), QString::utf8(), KMessage\-Box::warning\-Continue\-Cancel(), KMessage\-Box::warning\-Yes\-No(), and KMessage\-Box::warning\-Yes\-No\-Cancel().\index{Observer@{Observer}!open_RenameDlg@{open\_\-RenameDlg}}
\index{open_RenameDlg@{open\_\-RenameDlg}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Rename\-Dlg\_\-Result Observer::open\_\-Rename\-Dlg ({\bf KIO::Job} $\ast$ {\em job}, const {\bf QString} \& {\em caption}, const {\bf QString} \& {\em src}, const {\bf QString} \& {\em dest}, KIO::Rename\-Dlg\_\-Mode {\em mode}, {\bf QString} \& {\em new\-Dest}, KIO::filesize\_\-t {\em size\-Src} = (KIO::filesize\_\-t)-1, KIO::filesize\_\-t {\em size\-Dest} = (KIO::filesize\_\-t)-1, time\_\-t {\em ctime\-Src} = (time\_\-t)-1, time\_\-t {\em ctime\-Dest} = (time\_\-t)-1, time\_\-t {\em mtime\-Src} = (time\_\-t)-1, time\_\-t {\em mtime\-Dest} = (time\_\-t)-1)}\label{classObserver_a4}


See {\bf renamedlg.h}{\rm (p.\,\pageref{renamedlg_8h})}. 



Definition at line 365 of file observer.cpp.

References KIO::Job::progress\-Id().\index{Observer@{Observer}!open_SkipDlg@{open\_\-SkipDlg}}
\index{open_SkipDlg@{open\_\-SkipDlg}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Skip\-Dlg\_\-Result Observer::open\_\-Skip\-Dlg ({\bf KIO::Job} $\ast$ {\em job}, bool {\em multi}, const {\bf QString} \& {\em error\_\-text})}\label{classObserver_a5}


See {\bf skipdlg.h}{\rm (p.\,\pageref{skipdlg_8h})}. 



Definition at line 393 of file observer.cpp.

References KIO::Job::progress\-Id().\index{Observer@{Observer}!killJob@{killJob}}
\index{killJob@{killJob}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Observer::kill\-Job (int {\em progress\-Id})}\label{classObserver_z0}


Called by the UI Server (using DCOP) if the user presses cancel. 



Definition at line 99 of file observer.cpp.\index{Observer@{Observer}!metadata@{metadata}}
\index{metadata@{metadata}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Meta\-Data Observer::metadata (int {\em progress\-Id})}\label{classObserver_z1}


Called by the UI Server (using DCOP) to get all the metadata of the job. 



Definition at line 110 of file observer.cpp.\index{Observer@{Observer}!slotTransferring@{slotTransferring}}
\index{slotTransferring@{slotTransferring}!Observer@{Observer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Observer::slot\-Transferring ({\bf KIO::Job} $\ast$, const {\bf KURL} \& {\em url})\hspace{0.3cm}{\tt  [slot]}}\label{classObserver_i12}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 194 of file observer.cpp.

References KIO::Job::progress\-Id().

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