\section{KOpen\-With\-Dlg Class Reference}
\label{classKOpenWithDlg}\index{KOpenWithDlg@{KOpenWithDlg}}
\char`\"{}Open with\char`\"{} dialog box.  


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

Inheritance diagram for KOpen\-With\-Dlg:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=59pt]{classKOpenWithDlg__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KOpen\-With\-Dlg:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=171pt]{classKOpenWithDlg__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Clear} ()
\item 
void {\bf slot\-Selected} (const {\bf QString} \&\_\-name, const {\bf QString} \&\_\-exec)\label{classKOpenWithDlg_i1}

\item 
void {\bf slot\-Highlighted} (const {\bf QString} \&\_\-name, const {\bf QString} \&\_\-exec)\label{classKOpenWithDlg_i2}

\item 
void {\bf slot\-Text\-Changed} ()\label{classKOpenWithDlg_i3}

\item 
void {\bf slot\-Terminal\-Toggled} (bool)\label{classKOpenWithDlg_i4}

\item 
void {\bf slot\-Db\-Click} ()\label{classKOpenWithDlg_i5}

\item 
void {\bf slot\-OK} ()\label{classKOpenWithDlg_i6}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KOpen\-With\-Dlg} (const {\bf KURL::List} \&urls, {\bf QWidget} $\ast$parent=0L)
\item 
{\bf KOpen\-With\-Dlg} (const {\bf KURL::List} \&urls, const {\bf QString} \&text, const {\bf QString} \&value, {\bf QWidget} $\ast$parent=0L)
\item 
{\bf KOpen\-With\-Dlg} (const {\bf QString} \&service\-Type, const {\bf QString} \&value, {\bf QWidget} $\ast$parent=0L)
\item 
{\bf KOpen\-With\-Dlg} ({\bf QWidget} $\ast$parent=0L)
\item 
{\bf $\sim$KOpen\-With\-Dlg} ()
\item 
{\bf QString} {\bf text} () const 
\item 
void {\bf hide\-No\-Close\-On\-Exit} ()
\item 
void {\bf hide\-Run\-In\-Terminal} ()
\item 
{\bf KService::Ptr} {\bf service} () const 
\item 
void {\bf set\-Save\-New\-Applications} (bool b)
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf accept} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Service\-Type} (const {\bf KURL::List} \&\_\-urls)
\item 
void {\bf init} (const {\bf QString} \&text, const {\bf QString} \&value)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KURLRequester} $\ast$ {\bf edit}\label{classKOpenWithDlg_p0}

\item 
{\bf QString} {\bf m\_\-command}\label{classKOpenWithDlg_p1}

\item 
KApplication\-Tree $\ast$ {\bf m\_\-p\-Tree}\label{classKOpenWithDlg_p2}

\item 
{\bf QLabel} $\ast$ {\bf label}\label{classKOpenWithDlg_p3}

\item 
{\bf QString} {\bf q\-Name}\label{classKOpenWithDlg_p4}

\item 
{\bf QString} {\bf q\-Service\-Type}\label{classKOpenWithDlg_p5}

\item 
bool {\bf m\_\-terminaldirty}\label{classKOpenWithDlg_p6}

\item 
{\bf QCheck\-Box} $\ast$ {\bf terminal}\label{classKOpenWithDlg_p7}

\item 
{\bf QCheck\-Box} $\ast$ {\bf remember}\label{classKOpenWithDlg_p8}

\item 
{\bf QCheck\-Box} $\ast$ {\bf nocloseonexit}\label{classKOpenWithDlg_p9}

\item 
{\bf QPush\-Button} $\ast$ {\bf UNUSED}\label{classKOpenWithDlg_p10}

\item 
{\bf QPush\-Button} $\ast$ {\bf UNUSED2}\label{classKOpenWithDlg_p11}

\item 
{\bf KService::Ptr} {\bf m\_\-p\-Service}\label{classKOpenWithDlg_p12}

\item 
KOpen\-With\-Dlg\-Private $\ast$ {\bf d}\label{classKOpenWithDlg_p13}

\end{CompactItemize}


\subsection{Detailed Description}
\char`\"{}Open with\char`\"{} dialog box. 

Used automatically by {\bf KRun}{\rm (p.\,\pageref{classKRun})}, and used by libkonq.

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




Definition at line 46 of file kopenwith.h.

\subsection{Constructor \& Destructor Documentation}
\index{KOpenWithDlg@{KOpen\-With\-Dlg}!KOpenWithDlg@{KOpenWithDlg}}
\index{KOpenWithDlg@{KOpenWithDlg}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KOpen\-With\-Dlg::KOpen\-With\-Dlg (const {\bf KURL::List} \& {\em urls}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0L})}\label{classKOpenWithDlg_a0}


Create a dialog that asks for a application to open a given URL(s) with. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em urls}]the URLs that should be opened. The list can be empty, if the dialog is used to choose an application but not for some particular URLs. \item[{\em parent}]parent widget \end{description}
\end{Desc}


Definition at line 340 of file kopenwith.cpp.

References QString::arg(), init(), and set\-Service\-Type().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!KOpenWithDlg@{KOpenWithDlg}}
\index{KOpenWithDlg@{KOpenWithDlg}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KOpen\-With\-Dlg::KOpen\-With\-Dlg (const {\bf KURL::List} \& {\em urls}, const {\bf QString} \& {\em text}, const {\bf QString} \& {\em value}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0L})}\label{classKOpenWithDlg_a1}


Create a dialog that asks for a application to open a given URL(s) with. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em urls}]is the URL that should be opened \item[{\em text}]appears as a label on top of the entry box. \item[{\em value}]is the initial value of the line \item[{\em parent}]parent widget \end{description}
\end{Desc}


Definition at line 358 of file kopenwith.cpp.

References KString\-Handler::csqueeze(), QString::from\-Latin1(), init(), and set\-Service\-Type().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!KOpenWithDlg@{KOpenWithDlg}}
\index{KOpenWithDlg@{KOpenWithDlg}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KOpen\-With\-Dlg::KOpen\-With\-Dlg (const {\bf QString} \& {\em service\-Type}, const {\bf QString} \& {\em value}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0L})}\label{classKOpenWithDlg_a2}


Create a dialog to select a service for a given service type. 

Note that this dialog doesn't apply to URLs.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em service\-Type}]the service type we want to choose an application for. \item[{\em value}]is the initial value of the line \item[{\em parent}]parent widget \end{description}
\end{Desc}


Definition at line 370 of file kopenwith.cpp.

References QString::arg(), and init().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!KOpenWithDlg@{KOpenWithDlg}}
\index{KOpenWithDlg@{KOpenWithDlg}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KOpen\-With\-Dlg::KOpen\-With\-Dlg ({\bf QWidget} $\ast$ {\em parent} = {\tt 0L})}\label{classKOpenWithDlg_a3}


Create a dialog to select an application Note that this dialog doesn't apply to URLs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]parent widget \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 384 of file kopenwith.cpp.

References init().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!~KOpenWithDlg@{$\sim$KOpenWithDlg}}
\index{~KOpenWithDlg@{$\sim$KOpenWithDlg}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KOpen\-With\-Dlg::$\sim${\bf KOpen\-With\-Dlg} ()}\label{classKOpenWithDlg_a4}


Destructor. 



Definition at line 550 of file kopenwith.cpp.

\subsection{Member Function Documentation}
\index{KOpenWithDlg@{KOpen\-With\-Dlg}!text@{text}}
\index{text@{text}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KOpen\-With\-Dlg::text () const}\label{classKOpenWithDlg_a5}


\begin{Desc}
\item[Returns:]the text the user entered \end{Desc}


Definition at line 807 of file kopenwith.cpp.

References QString::is\-Empty(), and KURLRequester::url.

Referenced by KRun::display\-Open\-With\-Dialog(), and KFile\-Open\-With\-Handler::display\-Open\-With\-Dialog().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!hideNoCloseOnExit@{hideNoCloseOnExit}}
\index{hideNoCloseOnExit@{hideNoCloseOnExit}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::hide\-No\-Close\-On\-Exit ()}\label{classKOpenWithDlg_a6}


Hide the \char`\"{}Do not \&close when command exits\char`\"{} Checkbox. 



Definition at line 815 of file kopenwith.cpp.

References QCheck\-Box::set\-Checked().

Referenced by hide\-Run\-In\-Terminal().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!hideRunInTerminal@{hideRunInTerminal}}
\index{hideRunInTerminal@{hideRunInTerminal}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::hide\-Run\-In\-Terminal ()}\label{classKOpenWithDlg_a7}


Hide the \char`\"{}Run in \&terminal\char`\"{} Checkbox. 



Definition at line 822 of file kopenwith.cpp.

References hide\-No\-Close\-On\-Exit().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!service@{service}}
\index{service@{service}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KOpen\-With\-Dlg::service () const\hspace{0.3cm}{\tt  [inline]}}\label{classKOpenWithDlg_a8}


\begin{Desc}
\item[Returns:]the chosen service in the application tree Can be null, if the user typed some text and didn't select a service. \end{Desc}


Definition at line 114 of file kopenwith.h.

Referenced by KRun::display\-Open\-With\-Dialog(), and KFile\-Open\-With\-Handler::display\-Open\-With\-Dialog().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!setSaveNewApplications@{setSaveNewApplications}}
\index{setSaveNewApplications@{setSaveNewApplications}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::set\-Save\-New\-Applications (bool {\em b})}\label{classKOpenWithDlg_a9}


Set whether a new .desktop file should be created if the user selects an application for which no corresponding .desktop file can be found. 

Regardless of this setting a new .desktop file may still be created if the user has chosen to remember the file association.

The default is false: no .desktop files are created. \begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 620 of file kopenwith.cpp.\index{KOpenWithDlg@{KOpen\-With\-Dlg}!slotClear@{slotClear}}
\index{slotClear@{slotClear}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::slot\-Clear ()\hspace{0.3cm}{\tt  [slot]}}\label{classKOpenWithDlg_i0}


The slot for clearing the edit widget. 



Definition at line 558 of file kopenwith.cpp.

References KURLRequester::set\-URL().

Referenced by init().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!accept@{accept}}
\index{accept@{accept}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::accept ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKOpenWithDlg_j0}


Reimplemented from {\bf QDialog::accept()} to save history of the combobox. 



Reimplemented from {\bf QDialog}.

Definition at line 828 of file kopenwith.cpp.

References QDialog::accept(), KHistory\-Combo::add\-To\-History(), KURLRequester::combo\-Box(), KCompletion\-Base::completion\-Mode(), KGlobal::config(), KHistory\-Combo::history\-Items, KConfig\-Base::sync(), KURLRequester::url, and KConfig\-Base::write\-Entry().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!setServiceType@{setServiceType}}
\index{setServiceType@{setServiceType}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::set\-Service\-Type (const {\bf KURL::List} \& {\em \_\-urls})\hspace{0.3cm}{\tt  [protected]}}\label{classKOpenWithDlg_b0}


Determine service type from URLs. 



Definition at line 395 of file kopenwith.cpp.

References KMime\-Type::find\-By\-URL().

Referenced by KOpen\-With\-Dlg().\index{KOpenWithDlg@{KOpen\-With\-Dlg}!init@{init}}
\index{init@{init}!KOpenWithDlg@{KOpen\-With\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOpen\-With\-Dlg::init (const {\bf QString} \& {\em text}, const {\bf QString} \& {\em value})\hspace{0.3cm}{\tt  [protected]}}\label{classKOpenWithDlg_b1}


Create a dialog that asks for a application to open a given URL(s) with. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]appears as a label on top of the entry box. \item[{\em value}]is the initial value of the line \end{description}
\end{Desc}


Definition at line 407 of file kopenwith.cpp.

References QWhats\-This::add(), QTool\-Tip::add(), KButton\-Box::add\-Button(), QBox\-Layout::add\-Item(), QBox\-Layout::add\-Layout(), KButton\-Box::add\-Stretch(), QBox\-Layout::add\-Widget(), KURLRequester::button(), KURLRequester::combo\-Box(), KGlobal::config(), QString::is\-Null(), KButton\-Box::layout(), KURLRequester::line\-Edit(), KConfig\-Base::read\-List\-Entry(), KConfig\-Base::read\-Num\-Entry(), KConfig\-Base::read\-Path\-Entry(), QDialog::reject(), KCompletion\-Base::set\-Auto\-Delete\-Completion\-Object(), QCheck\-Box::set\-Checked(), KCompletion\-Base::set\-Completion\-Mode(), KCompletion\-Base::set\-Completion\-Object(), QPush\-Button::set\-Default(), QCombo\-Box::set\-Duplicates\-Enabled(), KHistory\-Combo::set\-History\-Items(), QTool\-Button::set\-Icon\-Set(), QCombo\-Box::set\-Max\-Count(), KLine\-Edit::set\-Read\-Only(), KURLRequester::set\-URL(), and slot\-Clear().

Referenced by KOpen\-With\-Dlg().

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