\section{KParts::Browser\-Run Class Reference}
\label{classKParts_1_1BrowserRun}\index{KParts::BrowserRun@{KParts::BrowserRun}}
This class extends {\bf KRun} to provide additional functionality for browsers: \char`\"{}save or open\char`\"{} dialog boxes \char`\"{}save\char`\"{} functionality support for HTTP POST (including saving the result to a temp file if opening a separate application) warning before launching executables off the web custom error handling (i.e.  


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

Inheritance diagram for KParts::Browser\-Run:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKParts_1_1BrowserRun__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KParts::Browser\-Run:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=297pt]{classKParts_1_1BrowserRun__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Ask\-Save\-Result} \{ {\bf Save}, 
{\bf Open}, 
{\bf Cancel}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Browser\-Run} (const  {\bf KURL} \&url, const  {\bf KParts::URLArgs} \&args, {\bf KParts::Read\-Only\-Part} $\ast$part, {\bf QWidget} $\ast$window, bool remove\-Referrer, bool trusted\-Source)
\item 
{\bf Browser\-Run} (const  {\bf KURL} \&url, const  {\bf KParts::URLArgs} \&args, {\bf KParts::Read\-Only\-Part} $\ast$part, {\bf QWidget} $\ast$window, bool remove\-Referrer, bool trusted\-Source, bool hide\-Error\-Dialog)
\item 
{\bf KURL} {\bf url} () const \label{classKParts_1_1BrowserRun_a3}

\item 
bool {\bf hide\-Error\-Dialog} () const \label{classKParts_1_1BrowserRun_a4}

\item 
virtual void {\bf save} (const  {\bf KURL} \&url, const  {\bf QString} \&suggested\-Filename)\label{classKParts_1_1BrowserRun_a5}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
Ask\-Save\-Result {\bf ask\-Save} (const  {\bf KURL} \&url, {\bf KService::Ptr} offer, const  {\bf QString} \&mime\-Type, const  {\bf QString} \&suggested\-Filename=QString::null)\label{classKParts_1_1BrowserRun_e0}

\item 
void {\bf simple\-Save} (const  {\bf KURL} \&url, const  {\bf QString} \&suggested\-Filename)\label{classKParts_1_1BrowserRun_e1}

\item 
bool {\bf allow\-Execution} (const  {\bf QString} \&service\-Type, const  {\bf KURL} \&url)\label{classKParts_1_1BrowserRun_e2}

\item 
bool {\bf is\-Executable} (const  {\bf QString} \&service\-Type)\label{classKParts_1_1BrowserRun_e3}

\item 
bool {\bf is\-Text\-Executable} (const  {\bf QString} \&service\-Type)\label{classKParts_1_1BrowserRun_e4}

\end{CompactItemize}
\subsection*{Protected Types}
\begin{CompactItemize}
\item 
enum {\bf Non\-Embeddable\-Result} \{ {\bf Handled}, 
{\bf Not\-Handled}, 
{\bf Delayed}
 \}
\begin{CompactList}\small\item\em Not\-Handled means that found\-Mime\-Type should call {\bf KRun::found\-Mime\-Type}, i.e. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Browser\-Scan\-Finished} ({\bf KIO::Job} $\ast$job)\label{classKParts_1_1BrowserRun_j0}

\item 
void {\bf slot\-Browser\-Mimetype} ({\bf KIO::Job} $\ast$job, const  {\bf QString} \&type)\label{classKParts_1_1BrowserRun_j1}

\item 
void {\bf slot\-Copy\-To\-Temp\-File\-Result} ({\bf KIO::Job} $\ast$job)\label{classKParts_1_1BrowserRun_j2}

\item 
virtual void {\bf slot\-Stat\-Result} ({\bf KIO::Job} $\ast$job)\label{classKParts_1_1BrowserRun_j3}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf scan\-File} ()
\begin{CompactList}\small\item\em Reimplemented from {\bf KRun}. \item\end{CompactList}\item 
virtual void {\bf init} ()
\begin{CompactList}\small\item\em Reimplemented from {\bf KRun}. \item\end{CompactList}\item 
virtual void {\bf handle\-Error} ({\bf KIO::Job} $\ast$job)
\begin{CompactList}\small\item\em Called when an error happens. \item\end{CompactList}\item 
{\bf Non\-Embeddable\-Result} {\bf handle\-Non\-Embeddable} (const  {\bf QString} \&mime\-Type)
\begin{CompactList}\small\item\em Helper for found\-Mime\-Type: call this if the mimetype couldn't be embedded. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KParts::URLArgs} {\bf m\_\-args}\label{classKParts_1_1BrowserRun_p0}

\item 
{\bf KParts::Read\-Only\-Part} $\ast$ {\bf m\_\-part}\label{classKParts_1_1BrowserRun_p1}

\item 
{\bf QWidget} $\ast$ {\bf m\_\-window}\label{classKParts_1_1BrowserRun_p2}

\item 
{\bf QString} {\bf m\_\-suggested\-Filename}\label{classKParts_1_1BrowserRun_p3}

\item 
{\bf QString} {\bf m\_\-s\-Mime\-Type}\label{classKParts_1_1BrowserRun_p4}

\item 
bool {\bf m\_\-b\-Remove\-Referrer}\label{classKParts_1_1BrowserRun_p5}

\item 
bool {\bf m\_\-b\-Trusted\-Source}\label{classKParts_1_1BrowserRun_p6}

\end{CompactItemize}


\subsection{Detailed Description}
This class extends {\bf KRun} to provide additional functionality for browsers: \char`\"{}save or open\char`\"{} dialog boxes \char`\"{}save\char`\"{} functionality support for HTTP POST (including saving the result to a temp file if opening a separate application) warning before launching executables off the web custom error handling (i.e. 

\begin{itemize}
\item $\ast$ - $\ast$ - $\ast$ - $\ast$ - treating errors as HTML pages)\item generation of SSL metadata depending on the previous URL shown by the part \begin{Desc}
\item[Author:]David Faure $<${\tt faure@kde.org}$>$ \end{Desc}
\end{itemize}




Definition at line 39 of file browserrun.h.

\subsection{Member Enumeration Documentation}
\index{KParts::BrowserRun@{KParts::Browser\-Run}!NonEmbeddableResult@{NonEmbeddableResult}}
\index{NonEmbeddableResult@{NonEmbeddableResult}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KParts::Browser\-Run::Non\-Embeddable\-Result}\hspace{0.3cm}{\tt  [protected]}}\label{classKParts_1_1BrowserRun_x3}


Not\-Handled means that found\-Mime\-Type should call {\bf KRun::found\-Mime\-Type}, i.e. 

launch an external app. 

Definition at line 114 of file browserrun.h.

\subsection{Constructor \& Destructor Documentation}
\index{KParts::BrowserRun@{KParts::Browser\-Run}!BrowserRun@{BrowserRun}}
\index{BrowserRun@{BrowserRun}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KParts::Browser\-Run::Browser\-Run (const {\bf KURL} \& {\em url}, const {\bf KParts::URLArgs} \& {\em args}, {\bf KParts::Read\-Only\-Part} $\ast$ {\em part}, {\bf QWidget} $\ast$ {\em window}, bool {\em remove\-Referrer}, bool {\em trusted\-Source})}\label{classKParts_1_1BrowserRun_a0}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]the URL we're probing \item[{\em args}]URL args - includes data for a HTTP POST, etc. \item[{\em part}]the part going to open this URL - can be 0L if not created yet \item[{\em window}]the mainwindow - passed to {\bf KIO::Job::set\-Window()} \item[{\em remove\-Referrer}]if true, the \char`\"{}referrer\char`\"{} metadata from {\tt args} isn't passed on \item[{\em trusted\-Source}]if false, a warning will be shown before launching an executable Always pass false for {\tt trusted\-Source}, except for local directory views. \end{description}
\end{Desc}
\index{KParts::BrowserRun@{KParts::Browser\-Run}!BrowserRun@{BrowserRun}}
\index{BrowserRun@{BrowserRun}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KParts::Browser\-Run::Browser\-Run (const {\bf KURL} \& {\em url}, const {\bf KParts::URLArgs} \& {\em args}, {\bf KParts::Read\-Only\-Part} $\ast$ {\em part}, {\bf QWidget} $\ast$ {\em window}, bool {\em remove\-Referrer}, bool {\em trusted\-Source}, bool {\em hide\-Error\-Dialog})}\label{classKParts_1_1BrowserRun_a1}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]the URL we're probing \item[{\em args}]URL args - includes data for a HTTP POST, etc. \item[{\em part}]the part going to open this URL - can be 0L if not created yet \item[{\em window}]the mainwindow - passed to {\bf KIO::Job::set\-Window()} \item[{\em remove\-Referrer}]if true, the \char`\"{}referrer\char`\"{} metadata from {\tt args} isn't passed on \item[{\em trusted\-Source}]if false, a warning will be shown before launching an executable \item[{\em hide\-Error\-Dialog}]if true, no dialog will be shown in case of errors. Always pass false for {\tt trusted\-Source}, except for local directory views. \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\index{KParts::BrowserRun@{KParts::Browser\-Run}!scanFile@{scanFile}}
\index{scanFile@{scanFile}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KParts::Browser\-Run::scan\-File ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKParts_1_1BrowserRun_b0}


Reimplemented from {\bf KRun}. 



Reimplemented from {\bf KRun}.\index{KParts::BrowserRun@{KParts::Browser\-Run}!init@{init}}
\index{init@{init}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KParts::Browser\-Run::init ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKParts_1_1BrowserRun_b1}


Reimplemented from {\bf KRun}. 



Reimplemented from {\bf KRun}.\index{KParts::BrowserRun@{KParts::Browser\-Run}!handleError@{handleError}}
\index{handleError@{handleError}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KParts::Browser\-Run::handle\-Error ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKParts_1_1BrowserRun_b2}


Called when an error happens. 

NOTE: {\tt job} could be 0L, if you passed hide\-Error\-Dialog=true. The default implementation shows a message box, but only when job != 0 .... It is strongly recommended to reimplement this method if you passed hide\-Error\-Dialog=true. \index{KParts::BrowserRun@{KParts::Browser\-Run}!handleNonEmbeddable@{handleNonEmbeddable}}
\index{handleNonEmbeddable@{handleNonEmbeddable}!KParts::BrowserRun@{KParts::Browser\-Run}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Non\-Embeddable\-Result} KParts::Browser\-Run::handle\-Non\-Embeddable (const {\bf QString} \& {\em mime\-Type})\hspace{0.3cm}{\tt  [protected]}}\label{classKParts_1_1BrowserRun_b3}


Helper for found\-Mime\-Type: call this if the mimetype couldn't be embedded. 



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