\section{KIO::Job Class Reference}
\label{classKIO_1_1Job}\index{KIO::Job@{KIO::Job}}
The base class for all jobs.  


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

Inheritance diagram for KIO::Job:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=156pt]{classKIO_1_1Job__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::Job:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=305pt]{classKIO_1_1Job__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf result} ({\bf KIO::Job} $\ast$job)
\item 
void {\bf canceled} ({\bf KIO::Job} $\ast$job)
\item 
void {\bf info\-Message} ({\bf KIO::Job} $\ast$job, const {\bf QString} \&msg)
\item 
void {\bf connected} ({\bf KIO::Job} $\ast$job)
\item 
void {\bf percent} ({\bf KIO::Job} $\ast$job, unsigned long percent)
\item 
void {\bf total\-Size} ({\bf KIO::Job} $\ast$job, {\bf KIO::filesize\_\-t} size)
\item 
void {\bf processed\-Size} ({\bf KIO::Job} $\ast$job, {\bf KIO::filesize\_\-t} size)
\item 
void {\bf speed} ({\bf KIO::Job} $\ast$job, unsigned long bytes\_\-per\_\-second)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf kill} (bool quietly=true)
\item 
int {\bf error} () const 
\item 
int {\bf progress\-Id} () const 
\item 
const {\bf QString} \& {\bf error\-Text} () const 
\item 
{\bf QString} {\bf error\-String} () const 
\item 
{\bf QString\-List} {\bf detailed\-Error\-Strings} (const {\bf KURL} $\ast$req\-Url=0L, int method=-1) const 
\item 
void {\bf show\-Error\-Dialog} ({\bf QWidget} $\ast${\bf parent}=0L)
\item 
void {\bf set\-Auto\-Error\-Handling\-Enabled} (bool enable, {\bf QWidget} $\ast$parent\-Widget=0)
\item 
bool {\bf is\-Auto\-Error\-Handling\-Enabled} () const 
\item 
void {\bf set\-Interactive} (bool enable)
\item 
bool {\bf is\-Interactive} () const 
\item 
void {\bf set\-Window} ({\bf QWidget} $\ast$window)
\item 
{\bf QWidget} $\ast$ {\bf window} () const 
\item 
void {\bf set\-Parent\-Job} ({\bf Job} $\ast$parent\-Job)
\item 
{\bf Job} $\ast$ {\bf parent\-Job} () const 
\item 
void {\bf set\-Meta\-Data} (const {\bf KIO::Meta\-Data} \&meta\-Data)
\item 
void {\bf add\-Meta\-Data} (const {\bf QString} \&key, const {\bf QString} \&value)
\item 
void {\bf add\-Meta\-Data} (const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \&values)
\item 
void {\bf merge\-Meta\-Data} (const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \&values)
\item 
{\bf Meta\-Data} {\bf outgoing\-Meta\-Data} () const \label{classKIO_1_1Job_a20}

\item 
{\bf Meta\-Data} {\bf meta\-Data} () const 
\item 
{\bf QString} {\bf query\-Meta\-Data} (const {\bf QString} \&key)
\item 
{\bf KIO::filesize\_\-t} {\bf get\-Processed\-Size} ()
\end{CompactItemize}
\subsection*{Protected Types}
\begin{CompactItemize}
\item 
enum \{ {\bf EF\_\-Transfer\-Job\-Async} =  (1 $<$$<$ 0), 
{\bf EF\_\-Transfer\-Job\-Need\-Data} =  (1 $<$$<$ 1), 
{\bf EF\_\-Transfer\-Job\-Data\-Sent} =  (1 $<$$<$ 2), 
{\bf EF\_\-List\-Job\-Unrestricted} =  (1 $<$$<$ 3)
 \}
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Result} ({\bf KIO::Job} $\ast$job)
\item 
void {\bf slot\-Speed} ({\bf KIO::Job} $\ast$job, unsigned long bytes\_\-per\_\-second)
\item 
void {\bf slot\-Info\-Message} ({\bf KIO::Job} $\ast$job, const {\bf QString} \&msg)
\item 
void {\bf slot\-Speed\-Timeout} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Job} (bool show\-Progress\-Info)\label{classKIO_1_1Job_b0}

\item 
virtual void {\bf add\-Subjob} ({\bf Job} $\ast$job, bool inherit\-Meta\-Data=true)
\item 
virtual void {\bf remove\-Subjob} ({\bf Job} $\ast$job)
\item 
void {\bf remove\-Subjob} ({\bf Job} $\ast$job, bool merge\-Meta\-Data, bool emit\-Result\-If\-Last)
\item 
void {\bf emit\-Percent} ({\bf KIO::filesize\_\-t} processed\-Size, {\bf KIO::filesize\_\-t} total\-Size)
\item 
void {\bf emit\-Speed} (unsigned long bytes\_\-per\_\-second)
\item 
void {\bf emit\-Result} ()
\item 
void {\bf set\-Processed\-Size} ({\bf KIO::filesize\_\-t} size)
\item 
int \& {\bf extra\-Flags} ()\label{classKIO_1_1Job_b8}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIO_1_1Job_b9}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QPtr\-List}$<$ {\bf Job} $>$ {\bf subjobs}\label{classKIO_1_1Job_p0}

\item 
int {\bf m\_\-error}\label{classKIO_1_1Job_p1}

\item 
{\bf QString} {\bf m\_\-error\-Text}\label{classKIO_1_1Job_p2}

\item 
unsigned long {\bf m\_\-percent}\label{classKIO_1_1Job_p3}

\item 
int {\bf m\_\-progress\-Id}\label{classKIO_1_1Job_p4}

\item 
{\bf QTimer} $\ast$ {\bf m\_\-speed\-Timer}\label{classKIO_1_1Job_p5}

\item 
{\bf QGuarded\-Ptr}$<$ {\bf QWidget} $>$ {\bf m\_\-window}\label{classKIO_1_1Job_p6}

\item 
{\bf Meta\-Data} {\bf m\_\-outgoing\-Meta\-Data}\label{classKIO_1_1Job_p7}

\item 
{\bf Meta\-Data} {\bf m\_\-incoming\-Meta\-Data}\label{classKIO_1_1Job_p8}

\end{CompactItemize}


\subsection{Detailed Description}
The base class for all jobs. 

For all jobs created in an application, the code looks like



\footnotesize\begin{verbatim}   KIO::Job * job = KIO::someoperation( some parameters );
   connect( job, SIGNAL( result( KIO::Job * ) ),
            this, SLOT( slotResult( KIO::Job * ) ) );
\end{verbatim}
\normalsize
 (other connects, specific to the job)

And slot\-Result is usually at least:



\footnotesize\begin{verbatim}  if ( job->error() )
      job->showErrorDialog( this or 0L  );
\end{verbatim}
\normalsize
 \begin{Desc}
\item[See also:]{\bf KIO::Scheduler}{\rm (p.\,\pageref{classKIO_1_1Scheduler})} 

KIO::Slave \end{Desc}




Definition at line 68 of file jobclasses.h.

\subsection{Member Function Documentation}
\index{KIO::Job@{KIO::Job}!kill@{kill}}
\index{kill@{kill}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KIO::Job::kill (bool {\em quietly} = {\tt true})\hspace{0.3cm}{\tt  [virtual]}}\label{classKIO_1_1Job_a1}


Abort this job. 

This kills all subjobs and deletes the job.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em quietly}]if false, {\bf Job}{\rm (p.\,\pageref{classKIO_1_1Job})} will emit signal result and ask kio\_\-uiserver to close the progress window. {\tt quietly} is set to true for subjobs. Whether applications should call with true or false depends on whether they rely on result being emitted or not. \end{description}
\end{Desc}


Reimplemented in {\bf KIO::Simple\-Job} {\rm (p.\,\pageref{classKIO_1_1SimpleJob_a3})}.

Referenced by KImage\-File\-Preview::clear\-Preview(), KIO::Simple\-Job::kill(), and KIO::Progress\-Base::slot\-Stop().\index{KIO::Job@{KIO::Job}!error@{error}}
\index{error@{error}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KIO::Job::error () const\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1Job_a2}


Returns the error code, if there has been an error. 

Only call this method from the slot connected to {\bf result()}{\rm (p.\,\pageref{classKIO_1_1Job_l0})}. \begin{Desc}
\item[Returns:]the error code for this job, 0 if no error. Error codes are defined in {\bf KIO::Error}{\rm (p.\,\pageref{namespaceKIO_a259})}. \end{Desc}


Definition at line 95 of file jobclasses.h.

Referenced by KIO::Delete\-Job::slot\-Result(), KIO::Transfer\-Job::slot\-Result(), and KIO::Chmod\-Job::slot\-Result().\index{KIO::Job@{KIO::Job}!progressId@{progressId}}
\index{progressId@{progressId}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KIO::Job::progress\-Id () const\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1Job_a3}


Returns the progress id for this job. 

\begin{Desc}
\item[Returns:]the progress id for this job, as returned by uiserver \end{Desc}


Definition at line 101 of file jobclasses.h.\index{KIO::Job@{KIO::Job}!errorText@{errorText}}
\index{errorText@{errorText}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QString}\& KIO::Job::error\-Text () const\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1Job_a4}


Returns the error text if there has been an error. 

Only call if error is not 0. This is really internal, better use error\-String or error\-Dialog.

\begin{Desc}
\item[Returns:]a string to help understand the error, usually the url related to the error. Only valid if {\bf error()}{\rm (p.\,\pageref{classKIO_1_1Job_a2})} is not 0. \end{Desc}


Definition at line 111 of file jobclasses.h.\index{KIO::Job@{KIO::Job}!errorString@{errorString}}
\index{errorString@{errorString}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIO\_\-EXPORT {\bf QString} KIO::Job::error\-String () const}\label{classKIO_1_1Job_a5}


Converts an error code and a non-i18n error message into an error message in the current language. 

The low level (non-i18n) error message (usually a url) is put into the translated error message using 1.

Example for errid == ERR\_\-CANNOT\_\-OPEN\_\-FOR\_\-READING: 

\footnotesize\begin{verbatim}   i18n( "Could not read\n%1" ).arg( errortext );
\end{verbatim}
\normalsize
 Use this to display the error yourself, but for a dialog box use {\bf Job::show\-Error\-Dialog}{\rm (p.\,\pageref{classKIO_1_1Job_a7})}. Do not call it if {\bf error()}{\rm (p.\,\pageref{classKIO_1_1Job_a2})} is not 0. \begin{Desc}
\item[Returns:]the error message and if there is no error, a message telling the user that the app is broken, so check with {\bf error()}{\rm (p.\,\pageref{classKIO_1_1Job_a2})} whether there is an error \end{Desc}


Definition at line 195 of file global.cpp.

References KIO::build\-Error\-String().\index{KIO::Job@{KIO::Job}!detailedErrorStrings@{detailedErrorStrings}}
\index{detailedErrorStrings@{detailedErrorStrings}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIO\_\-EXPORT {\bf QString\-List} KIO::Job::detailed\-Error\-Strings (const {\bf KURL} $\ast$ {\em req\-Url} = {\tt 0L}, int {\em method} = {\tt -1}) const}\label{classKIO_1_1Job_a6}


Converts an error code and a non-i18n error message into i18n strings suitable for presentation in a detailed error message box. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em req\-Url}]the request URL that generated this error message \item[{\em method}]the method that generated this error message (unimplemented) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the following strings: caption, error + description, causes+solutions \end{Desc}


Definition at line 445 of file global.cpp.

References QString::arg(), KLocale::format\-Date\-Time(), QString::from\-Latin1(), QString::is\-Null(), QString\-List::join(), KGlobal::locale(), and KIO::raw\-Error\-Detail().\index{KIO::Job@{KIO::Job}!showErrorDialog@{showErrorDialog}}
\index{showErrorDialog@{showErrorDialog}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::show\-Error\-Dialog ({\bf QWidget} $\ast$ {\em parent} = {\tt 0L})}\label{classKIO_1_1Job_a7}


Display a dialog box to inform the user of the error given by this job. 

Only call if error is not 0, and only in the slot connected to result. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the parent widget for the dialog box, can be 0 for top-level \end{description}
\end{Desc}


Referenced by KDir\-Lister::handle\-Error().\index{KIO::Job@{KIO::Job}!setAutoErrorHandlingEnabled@{setAutoErrorHandlingEnabled}}
\index{setAutoErrorHandlingEnabled@{setAutoErrorHandlingEnabled}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::set\-Auto\-Error\-Handling\-Enabled (bool {\em enable}, {\bf QWidget} $\ast$ {\em parent\-Widget} = {\tt 0})}\label{classKIO_1_1Job_a8}


Enable or disable the automatic error handling. 

When automatic error handling is enabled and an error occurs, then {\bf show\-Error\-Dialog()}{\rm (p.\,\pageref{classKIO_1_1Job_a7})} is called with the specified {\tt parent\-Widget} (if supplied) , right before the emission of the result signal.

The default is false.

See also is\-Auto\-Error\-Handling\-Enabled , show\-Error\-Dialog

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enable}]enable or disable automatic error handling \item[{\em parent\-Widget}]the parent widget, passed to show\-Error\-Dialog. Can be 0 for top-level \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf is\-Auto\-Error\-Handling\-Enabled()}{\rm (p.\,\pageref{classKIO_1_1Job_a9})} \end{Desc}


Referenced by KDir\-Operator::del(), and KDir\-Operator::trash().\index{KIO::Job@{KIO::Job}!isAutoErrorHandlingEnabled@{isAutoErrorHandlingEnabled}}
\index{isAutoErrorHandlingEnabled@{isAutoErrorHandlingEnabled}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::Job::is\-Auto\-Error\-Handling\-Enabled () const}\label{classKIO_1_1Job_a9}


Returns whether automatic error handling is enabled or disabled. 

See also set\-Auto\-Error\-Handling\-Enabled . \begin{Desc}
\item[Returns:]true if automatic error handling is enabled \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Auto\-Error\-Handling\-Enabled()}{\rm (p.\,\pageref{classKIO_1_1Job_a8})} \end{Desc}
\index{KIO::Job@{KIO::Job}!setInteractive@{setInteractive}}
\index{setInteractive@{setInteractive}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::set\-Interactive (bool {\em enable})}\label{classKIO_1_1Job_a10}


Enable or disable the message display from the job. 

The default is true. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enable}]enable or disable message display \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4.1 \end{Desc}


Reimplemented in {\bf KIO::Copy\-Job} {\rm (p.\,\pageref{classKIO_1_1CopyJob_a5})}.

Referenced by KIO::Copy\-Job::set\-Interactive().\index{KIO::Job@{KIO::Job}!isInteractive@{isInteractive}}
\index{isInteractive@{isInteractive}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::Job::is\-Interactive () const}\label{classKIO_1_1Job_a11}


Returns whether message display is enabled or disabled. 

See also set\-Interactive . \begin{Desc}
\item[Returns:]true if message display is enabled \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Interactive()}{\rm (p.\,\pageref{classKIO_1_1Job_a10})} \end{Desc}
\begin{Desc}
\item[Since:]3.4.1 \end{Desc}
\index{KIO::Job@{KIO::Job}!setWindow@{setWindow}}
\index{setWindow@{setWindow}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::set\-Window ({\bf QWidget} $\ast$ {\em window})}\label{classKIO_1_1Job_a12}


Associate this job with a window given by {\tt window}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em window}]the window to associate to \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf window()}{\rm (p.\,\pageref{classKIO_1_1Job_a13})} \end{Desc}


Referenced by KDir\-Operator::del(), and KDir\-Operator::trash().\index{KIO::Job@{KIO::Job}!window@{window}}
\index{window@{window}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget}$\ast$ KIO::Job::window () const}\label{classKIO_1_1Job_a13}


Returns the window this job is associated with. 

\begin{Desc}
\item[Returns:]the associated window \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Window()}{\rm (p.\,\pageref{classKIO_1_1Job_a12})} \end{Desc}
\index{KIO::Job@{KIO::Job}!setParentJob@{setParentJob}}
\index{setParentJob@{setParentJob}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::set\-Parent\-Job ({\bf Job} $\ast$ {\em parent\-Job})}\label{classKIO_1_1Job_a14}


Set the parent {\bf Job}{\rm (p.\,\pageref{classKIO_1_1Job})}. 

One example use of this is when {\bf File\-Copy\-Job}{\rm (p.\,\pageref{classKIO_1_1FileCopyJob})} calls open\_\-Rename\-Dlg, it must pass the correct progress ID of the parent {\bf Copy\-Job}{\rm (p.\,\pageref{classKIO_1_1CopyJob})} (to hide the progress dialog). You can set the parent job only once. By default a job does not have a parent job. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent\-Job}]the new parent job \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{KIO::Job@{KIO::Job}!parentJob@{parentJob}}
\index{parentJob@{parentJob}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Job}$\ast$ KIO::Job::parent\-Job () const}\label{classKIO_1_1Job_a15}


Returns the parent job, if there is one. 

\begin{Desc}
\item[Returns:]the parent job, or 0 if there is none \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Parent\-Job}{\rm (p.\,\pageref{classKIO_1_1Job_a14})} \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{KIO::Job@{KIO::Job}!setMetaData@{setMetaData}}
\index{setMetaData@{setMetaData}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::set\-Meta\-Data (const {\bf KIO::Meta\-Data} \& {\em meta\-Data})}\label{classKIO_1_1Job_a16}


Set meta data to be sent to the slave, replacing existing meta data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em meta\-Data}]the meta data to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf add\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a17})} 

{\bf merge\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a19})} \end{Desc}
\index{KIO::Job@{KIO::Job}!addMetaData@{addMetaData}}
\index{addMetaData@{addMetaData}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::add\-Meta\-Data (const {\bf QString} \& {\em key}, const {\bf QString} \& {\em value})}\label{classKIO_1_1Job_a17}


Add key/value pair to the meta data that is sent to the slave. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key of the meta data \item[{\em value}]the value of the meta data \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a16})} 

{\bf merge\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a19})} \end{Desc}


Referenced by KIO::dav\-Prop\-Find(), KIO::get(), KIO::Transfer\-Job::slot\-Finished(), and KIO::stored\-Get().\index{KIO::Job@{KIO::Job}!addMetaData@{addMetaData}}
\index{addMetaData@{addMetaData}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::add\-Meta\-Data (const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \& {\em values})}\label{classKIO_1_1Job_a18}


Add key/value pairs to the meta data that is sent to the slave. 

If a certain key already existed, it will be overridden. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em values}]the meta data to add \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a16})} 

{\bf merge\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a19})} \end{Desc}
\index{KIO::Job@{KIO::Job}!mergeMetaData@{mergeMetaData}}
\index{mergeMetaData@{mergeMetaData}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::merge\-Meta\-Data (const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \& {\em values})}\label{classKIO_1_1Job_a19}


Add key/value pairs to the meta data that is sent to the slave. 

If a certain key already existed, it will remain unchanged. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em values}]the meta data to merge \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a16})} 

{\bf add\-Meta\-Data()}{\rm (p.\,\pageref{classKIO_1_1Job_a17})} \end{Desc}
\index{KIO::Job@{KIO::Job}!metaData@{metaData}}
\index{metaData@{metaData}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Meta\-Data} KIO::Job::meta\-Data () const}\label{classKIO_1_1Job_a21}


Get meta data received from the slave. 

(Valid when first data is received and/or slave is finished) \begin{Desc}
\item[Returns:]the job's meta data \end{Desc}
\index{KIO::Job@{KIO::Job}!queryMetaData@{queryMetaData}}
\index{queryMetaData@{queryMetaData}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIO::Job::query\-Meta\-Data (const {\bf QString} \& {\em key})}\label{classKIO_1_1Job_a22}


Query meta data received from the slave. 

(Valid when first data is received and/or slave is finished) \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key of the meta data to retrieve \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the value of the meta data, or QString::null if the {\tt key} does not exist \end{Desc}


Referenced by KIO::List\-Job::slot\-Finished(), KIO::Mimetype\-Job::slot\-Finished(), KIO::Transfer\-Job::slot\-Finished(), KIO::Stat\-Job::slot\-Finished(), and KIO::Mkdir\-Job::slot\-Finished().\index{KIO::Job@{KIO::Job}!getProcessedSize@{getProcessedSize}}
\index{getProcessedSize@{getProcessedSize}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIO::filesize\_\-t} KIO::Job::get\-Processed\-Size ()}\label{classKIO_1_1Job_a23}


Returns the processed size for this job. 

\begin{Desc}
\item[See also:]{\bf processed\-Size}{\rm (p.\,\pageref{classKIO_1_1Job_l6})} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Referenced by KIO::Transfer\-Job::send\-Async\-Data().\index{KIO::Job@{KIO::Job}!result@{result}}
\index{result@{result}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::result ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l0}


Emitted when the job is finished, in any case (completed, canceled, failed...). 

Use error to know the result. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \end{description}
\end{Desc}
\index{KIO::Job@{KIO::Job}!canceled@{canceled}}
\index{canceled@{canceled}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::canceled ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l1}


\begin{Desc}
\item[{\bf Deprecated}]. Don't use ! Emitted when the job is canceled. Signal {\bf result()}{\rm (p.\,\pageref{classKIO_1_1Job_l0})} is emitted as well, and {\bf error()}{\rm (p.\,\pageref{classKIO_1_1Job_a2})} is, in this case, ERR\_\-USER\_\-CANCELED.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \end{description}
\end{Desc}
\index{KIO::Job@{KIO::Job}!infoMessage@{infoMessage}}
\index{infoMessage@{infoMessage}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::info\-Message ({\bf KIO::Job} $\ast$ {\em job}, const {\bf QString} \& {\em msg})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l2}


Emitted to display information about this job, as sent by the slave. 

Examples of message are \char`\"{}Resolving host\char`\"{}, \char`\"{}Connecting to host...\char`\"{}, etc. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \item[{\em msg}]the info message \end{description}
\end{Desc}


Referenced by KIO::Simple\-Job::slot\-Info\-Message().\index{KIO::Job@{KIO::Job}!connected@{connected}}
\index{connected@{connected}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::connected ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l3}


Emitted when the slave successfully connected to the host. 

There is no guarantee the slave will send this, and this is currently unused (in the applications). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \end{description}
\end{Desc}


Referenced by KIO::Simple\-Job::slot\-Connected().\index{KIO::Job@{KIO::Job}!percent@{percent}}
\index{percent@{percent}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::percent ({\bf KIO::Job} $\ast$ {\em job}, unsigned long {\em percent})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l4}


Progress signal showing the overall progress of the job This is valid for any kind of job, and allows using a a progress bar very easily. 

(see {\bf KProgress}). Note that this signal is not emitted for finished jobs. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \item[{\em percent}]the percentage \end{description}
\end{Desc}


Referenced by KIO::Delete\-Job::slot\-Processed\-Size().\index{KIO::Job@{KIO::Job}!totalSize@{totalSize}}
\index{totalSize@{totalSize}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::total\-Size ({\bf KIO::Job} $\ast$ {\em job}, {\bf KIO::filesize\_\-t} {\em size})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l5}


Emitted when we know the size of this job (data size for transfers, number of entries for listings). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \item[{\em size}]the total size in bytes \end{description}
\end{Desc}


Referenced by KIO::Simple\-Job::slot\-Total\-Size().\index{KIO::Job@{KIO::Job}!processedSize@{processedSize}}
\index{processedSize@{processedSize}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::processed\-Size ({\bf KIO::Job} $\ast$ {\em job}, {\bf KIO::filesize\_\-t} {\em size})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l6}


Regularly emitted to show the progress of this job (current data size for transfers, entries listed). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \item[{\em size}]the processed size in bytes \end{description}
\end{Desc}


Referenced by KIO::Transfer\-Job::send\-Async\-Data(), KIO::Delete\-Job::slot\-Processed\-Size(), and KIO::Simple\-Job::slot\-Processed\-Size().\index{KIO::Job@{KIO::Job}!speed@{speed}}
\index{speed@{speed}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::speed ({\bf KIO::Job} $\ast$ {\em job}, unsigned long {\em bytes\_\-per\_\-second})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1Job_l7}


Emitted to display information about the speed of this job. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the job that emitted this signal \item[{\em bytes\_\-per\_\-second}]the speed in bytes/s \end{description}
\end{Desc}
\index{KIO::Job@{KIO::Job}!slotResult@{slotResult}}
\index{slotResult@{slotResult}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KIO::Job::slot\-Result ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKIO_1_1Job_j0}


Called whenever a subjob finishes. 

Default implementation checks for errors and propagates to parent job, then calls remove\-Subjob. Override if you don't want subjobs errors to be propagated. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf result()}{\rm (p.\,\pageref{classKIO_1_1Job_l0})} \end{Desc}


Reimplemented in {\bf KDir\-Size} {\rm (p.\,\pageref{classKDirSize_j0})}, {\bf KIO::Chmod\-Job} {\rm (p.\,\pageref{classKIO_1_1ChmodJob_j0})}, {\bf KIO::Transfer\-Job} {\rm (p.\,\pageref{classKIO_1_1TransferJob_a2})}, {\bf KIO::File\-Copy\-Job} {\rm (p.\,\pageref{classKIO_1_1FileCopyJob_j0})}, {\bf KIO::List\-Job} {\rm (p.\,\pageref{classKIO_1_1ListJob_j2})}, {\bf KIO::Copy\-Job} {\rm (p.\,\pageref{classKIO_1_1CopyJob_j2})}, {\bf KIO::Delete\-Job} {\rm (p.\,\pageref{classKIO_1_1DeleteJob_j2})}, {\bf KIO::Meta\-Info\-Job} {\rm (p.\,\pageref{classKIO_1_1MetaInfoJob_j0})}, and {\bf KIO::Preview\-Job} {\rm (p.\,\pageref{classKIO_1_1PreviewJob_j0})}.

Referenced by KDir\-Size::slot\-Result(), and KIO::Delete\-Job::slot\-Result().\index{KIO::Job@{KIO::Job}!slotSpeed@{slotSpeed}}
\index{slotSpeed@{slotSpeed}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::slot\-Speed ({\bf KIO::Job} $\ast$ {\em job}, unsigned long {\em bytes\_\-per\_\-second})\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKIO_1_1Job_j1}


Forward signal from subjob. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob \item[{\em bytes\_\-per\_\-second}]the speed in bytes/s \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf speed()}{\rm (p.\,\pageref{classKIO_1_1Job_l7})} \end{Desc}
\index{KIO::Job@{KIO::Job}!slotInfoMessage@{slotInfoMessage}}
\index{slotInfoMessage@{slotInfoMessage}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::slot\-Info\-Message ({\bf KIO::Job} $\ast$ {\em job}, const {\bf QString} \& {\em msg})\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKIO_1_1Job_j2}


Forward signal from subjob. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob \item[{\em msg}]the info message \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf info\-Message()}{\rm (p.\,\pageref{classKIO_1_1Job_l2})} \end{Desc}
\index{KIO::Job@{KIO::Job}!slotSpeedTimeout@{slotSpeedTimeout}}
\index{slotSpeedTimeout@{slotSpeedTimeout}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::slot\-Speed\-Timeout ()\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKIO_1_1Job_j3}


Remove speed information. 

\index{KIO::Job@{KIO::Job}!addSubjob@{addSubjob}}
\index{addSubjob@{addSubjob}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KIO::Job::add\-Subjob ({\bf Job} $\ast$ {\em job}, bool {\em inherit\-Meta\-Data} = {\tt true})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKIO_1_1Job_b1}


Add a job that has to be finished before a result is emitted. 

This has obviously to be called before the finish signal is emitted by the slave.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob to add \item[{\em inherit\-Meta\-Data}]if true, the subjob will inherit the meta data from this job. \end{description}
\end{Desc}


Referenced by KIO::Delete\-Job::slot\-Result().\index{KIO::Job@{KIO::Job}!removeSubjob@{removeSubjob}}
\index{removeSubjob@{removeSubjob}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KIO::Job::remove\-Subjob ({\bf Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKIO_1_1Job_b2}


Mark a sub job as being done. 

If it's the last to wait on the job will emit a result - jobs with two steps might want to override slot\-Result in order to avoid calling this method.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob to add \end{description}
\end{Desc}


Referenced by KIO::List\-Job::slot\-Result(), and KIO::Transfer\-Job::slot\-Result().\index{KIO::Job@{KIO::Job}!removeSubjob@{removeSubjob}}
\index{removeSubjob@{removeSubjob}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::remove\-Subjob ({\bf Job} $\ast$ {\em job}, bool {\em merge\-Meta\-Data}, bool {\em emit\-Result\-If\-Last})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1Job_b3}


Overloaded version of remove\-Subjob. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob to remove \item[{\em merge\-Meta\-Data}]if set, the metadata received by the subjob is merged into this job. \item[{\em emit\-Result\-If\-Last}]if this was the last subjob, emit result, i.e. terminate this job. \end{description}
\end{Desc}
\index{KIO::Job@{KIO::Job}!emitPercent@{emitPercent}}
\index{emitPercent@{emitPercent}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::emit\-Percent ({\bf KIO::filesize\_\-t} {\em processed\-Size}, {\bf KIO::filesize\_\-t} {\em total\-Size})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1Job_b4}


Utility function for inherited jobs. 

Emits the percent signal if bigger than m\_\-percent, after calculating it from the parameters.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em processed\-Size}]the processed size in bytes \item[{\em total\-Size}]the total size in bytes \end{description}
\end{Desc}


Referenced by KIO::Transfer\-Job::send\-Async\-Data(), and KIO::Simple\-Job::slot\-Processed\-Size().\index{KIO::Job@{KIO::Job}!emitSpeed@{emitSpeed}}
\index{emitSpeed@{emitSpeed}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::emit\-Speed (unsigned long {\em bytes\_\-per\_\-second})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1Job_b5}


Utility function for inherited jobs. 

Emits the speed signal and starts the timer for removing that info

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bytes\_\-per\_\-second}]the speed in bytes\_\-per\_\-second \end{description}
\end{Desc}


Referenced by KIO::Simple\-Job::slot\-Speed().\index{KIO::Job@{KIO::Job}!emitResult@{emitResult}}
\index{emitResult@{emitResult}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::emit\-Result ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1Job_b6}


Utility function to emit the result signal, and suicide this job. 

It first tells the observer to hide the progress dialog for this job. 

Referenced by KIO::Meta\-Info\-Job::Meta\-Info\-Job(), KIO::Simple\-Job::slot\-Finished(), KIO::Transfer\-Job::slot\-Result(), and KIO::Chmod\-Job::slot\-Result().\index{KIO::Job@{KIO::Job}!setProcessedSize@{setProcessedSize}}
\index{setProcessedSize@{setProcessedSize}!KIO::Job@{KIO::Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Job::set\-Processed\-Size ({\bf KIO::filesize\_\-t} {\em size})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1Job_b7}


Set the processed size, does not emit processed\-Size \begin{Desc}
\item[Since:]3.2. \end{Desc}




Referenced by KIO::Transfer\-Job::send\-Async\-Data(), KIO::Delete\-Job::slot\-Processed\-Size(), and KIO::Simple\-Job::slot\-Processed\-Size().

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