\section{KEncoding\-File\-Dialog Class Reference}
\label{classKEncodingFileDialog}\index{KEncodingFileDialog@{KEncodingFileDialog}}
Provides a user (and developer) friendly way to select files with support for choosing encoding.  


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

Inheritance diagram for KEncoding\-File\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=72pt]{classKEncodingFileDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KEncoding\-File\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=240pt]{classKEncodingFileDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KEncoding\-File\-Dialog} (const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&encoding=QString::null, const {\bf QString} \&filter=QString::null, const {\bf QString} \&caption=QString::null, {\bf KFile\-Dialog::Operation\-Mode} type=KFile\-Dialog::Opening, {\bf QWidget} $\ast$parent=0, const char $\ast$name=\char`\"{}\char`\"{}, bool modal=true)
\item 
{\bf $\sim$KEncoding\-File\-Dialog} ()
\item 
{\bf QString} {\bf selected\-Encoding} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static Result {\bf get\-Open\-File\-Name\-And\-Encoding} (const {\bf QString} \&encoding=QString::null, const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&filter=QString::null, {\bf QWidget} $\ast$parent=0, const {\bf QString} \&caption=QString::null)
\item 
static Result {\bf get\-Open\-File\-Names\-And\-Encoding} (const {\bf QString} \&encoding=QString::null, const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&filter=QString::null, {\bf QWidget} $\ast$parent=0, const {\bf QString} \&caption=QString::null)
\item 
static Result {\bf get\-Open\-URLAnd\-Encoding} (const {\bf QString} \&encoding=QString::null, const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&filter=QString::null, {\bf QWidget} $\ast$parent=0, const {\bf QString} \&caption=QString::null)
\item 
static Result {\bf get\-Open\-URLs\-And\-Encoding} (const {\bf QString} \&encoding=QString::null, const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&filter=QString::null, {\bf QWidget} $\ast$parent=0, const {\bf QString} \&caption=QString::null)
\item 
static Result {\bf get\-Save\-File\-Name\-And\-Encoding} (const {\bf QString} \&encoding=QString::null, const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&filter=QString::null, {\bf QWidget} $\ast$parent=0, const {\bf QString} \&caption=QString::null)
\item 
static Result {\bf get\-Save\-URLAnd\-Encoding} (const {\bf QString} \&encoding=QString::null, const {\bf QString} \&start\-Dir=QString::null, const {\bf QString} \&filter=QString::null, {\bf QWidget} $\ast$parent=0, const {\bf QString} \&caption=QString::null)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKEncodingFileDialog_b0}

\end{CompactItemize}


\subsection{Detailed Description}
Provides a user (and developer) friendly way to select files with support for choosing encoding. 

The dialog has been designed to allow applications to customise it by subclassing. It uses geometry management to ensure that subclasses can easily add children that will be incorporated into the layout. 



Definition at line 39 of file kencodingfiledialog.h.

\subsection{Constructor \& Destructor Documentation}
\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!KEncodingFileDialog@{KEncodingFileDialog}}
\index{KEncodingFileDialog@{KEncodingFileDialog}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::KEncoding\-File\-Dialog (const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, const {\bf QString} \& {\em caption} = {\tt QString::null}, {\bf KFile\-Dialog::Operation\-Mode} {\em type} = {\tt KFileDialog::Opening}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt \char`\"{}\char`\"{}}, bool {\em modal} = {\tt true})}\label{classKEncodingFileDialog_a0}


Constructs a file dialog for text files with encoding selection possibility. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword.\end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. If it's QString::null, the global default encoding will be shown.\item[{\em caption}]The caption of the dialog\item[{\em type}]This can either be \begin{itemize}
\item Opening (open dialog, the default setting) \item Saving \end{itemize}
\item[{\em parent}]The parent widget of this dialog \item[{\em name}]The name of this object \item[{\em modal}]Whether to create a modal dialog or not\end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 39 of file kencodingfiledialog.cpp.

References KGlobal::charsets(), QCombo\-Box::clear(), KCharsets::codec\-For\-Name(), QString::from\-Latin1(), KTool\-Bar::get\-Combo(), KTool\-Bar::id\-At(), KTool\-Bar::insert\-Combo(), KTool\-Bar::insert\-Separator(), QString::is\-Empty(), QText\-Codec::name(), KDialog::set\-Caption(), KFile\-Dialog::set\-Operation\-Mode(), and KFile\-Dialog::tool\-Bar().\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!~KEncodingFileDialog@{$\sim$KEncodingFileDialog}}
\index{~KEncodingFileDialog@{$\sim$KEncodingFileDialog}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::$\sim${\bf KEncoding\-File\-Dialog} ()}\label{classKEncodingFileDialog_a1}


Destructs the file dialog. 



Definition at line 81 of file kencodingfiledialog.cpp.

\subsection{Member Function Documentation}
\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!selectedEncoding@{selectedEncoding}}
\index{selectedEncoding@{selectedEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KEncoding\-File\-Dialog::selected\-Encoding () const}\label{classKEncodingFileDialog_a2}


\begin{Desc}
\item[Returns:]The selected encoding if the constructor with the encoding parameter was used, otherwise QString::null. \end{Desc}


Definition at line 87 of file kencodingfiledialog.cpp.\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!getOpenFileNameAndEncoding@{getOpenFileNameAndEncoding}}
\index{getOpenFileNameAndEncoding@{getOpenFileNameAndEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::Result KEncoding\-File\-Dialog::get\-Open\-File\-Name\-And\-Encoding (const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const {\bf QString} \& {\em caption} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKEncodingFileDialog_e0}


Creates a modal file dialog and return the selected filename or an empty string if none was chosen additionally a chosen encoding value is returned. 

Note that with this method the user must select an existing filename.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword. \end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. \item[{\em filter}]This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See {\bf set\-Filter()}{\rm (p.\,\pageref{classKFileDialog_a14})} for details on how to do this... \item[{\em parent}]The widget the dialog will be centered on initially. \item[{\em caption}]The name of the dialog widget. \end{description}
\end{Desc}


Definition at line 96 of file kencodingfiledialog.cpp.\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!getOpenFileNamesAndEncoding@{getOpenFileNamesAndEncoding}}
\index{getOpenFileNamesAndEncoding@{getOpenFileNamesAndEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::Result KEncoding\-File\-Dialog::get\-Open\-File\-Names\-And\-Encoding (const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const {\bf QString} \& {\em caption} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKEncodingFileDialog_e1}


Creates a modal file dialog and returns the selected encoding and the selected filenames or an empty list if none was chosen. 

Note that with this method the user must select an existing filename.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword. \end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. \item[{\em filter}]This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See {\bf set\-Filter()}{\rm (p.\,\pageref{classKFileDialog_a14})} for details on how to do this. \item[{\em parent}]The widget the dialog will be centered on initially. \item[{\em caption}]The name of the dialog widget. \end{description}
\end{Desc}


Definition at line 114 of file kencodingfiledialog.cpp.\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!getOpenURLAndEncoding@{getOpenURLAndEncoding}}
\index{getOpenURLAndEncoding@{getOpenURLAndEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::Result KEncoding\-File\-Dialog::get\-Open\-URLAnd\-Encoding (const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const {\bf QString} \& {\em caption} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKEncodingFileDialog_e2}


Creates a modal file dialog and returns the selected encoding and URL or an empty string if none was chosen. 

Note that with this method the user must select an existing URL.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword. \end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. \item[{\em filter}]This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See {\bf set\-Filter()}{\rm (p.\,\pageref{classKFileDialog_a14})} for details on how to do this... \item[{\em parent}]The widget the dialog will be centered on initially. \item[{\em caption}]The name of the dialog widget. \end{description}
\end{Desc}


Definition at line 132 of file kencodingfiledialog.cpp.\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!getOpenURLsAndEncoding@{getOpenURLsAndEncoding}}
\index{getOpenURLsAndEncoding@{getOpenURLsAndEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::Result KEncoding\-File\-Dialog::get\-Open\-URLs\-And\-Encoding (const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const {\bf QString} \& {\em caption} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKEncodingFileDialog_e3}


Creates a modal file dialog and returns the selected encoding URLs or an empty list if none was chosen. 

Note that with this method the user must select an existing filename.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword. \end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. \item[{\em filter}]This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See {\bf set\-Filter()}{\rm (p.\,\pageref{classKFileDialog_a14})} for details on how to do this... \item[{\em parent}]The widget the dialog will be centered on initially. \item[{\em caption}]The name of the dialog widget. \end{description}
\end{Desc}


Definition at line 148 of file kencodingfiledialog.cpp.\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!getSaveFileNameAndEncoding@{getSaveFileNameAndEncoding}}
\index{getSaveFileNameAndEncoding@{getSaveFileNameAndEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::Result KEncoding\-File\-Dialog::get\-Save\-File\-Name\-And\-Encoding (const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const {\bf QString} \& {\em caption} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKEncodingFileDialog_e4}


Creates a modal file dialog and returns the selected encoding and filename or an empty string if none was chosen. 

Note that with this method the user need not select an existing filename.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item a relative path or a filename determining the directory to start in and the file to be selected. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword. \end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. \item[{\em filter}]This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See {\bf set\-Filter()}{\rm (p.\,\pageref{classKFileDialog_a14})} for details on how to do this... \item[{\em parent}]The widget the dialog will be centered on initially. \item[{\em caption}]The name of the dialog widget. \end{description}
\end{Desc}


Definition at line 167 of file kencodingfiledialog.cpp.

References KRecent\-Document::add(), QString::at(), and QString::is\-Empty().\index{KEncodingFileDialog@{KEncoding\-File\-Dialog}!getSaveURLAndEncoding@{getSaveURLAndEncoding}}
\index{getSaveURLAndEncoding@{getSaveURLAndEncoding}!KEncodingFileDialog@{KEncoding\-File\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KEncoding\-File\-Dialog::Result KEncoding\-File\-Dialog::get\-Save\-URLAnd\-Encoding (const {\bf QString} \& {\em encoding} = {\tt QString::null}, const {\bf QString} \& {\em start\-Dir} = {\tt QString::null}, const {\bf QString} \& {\em filter} = {\tt QString::null}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const {\bf QString} \& {\em caption} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKEncodingFileDialog_e5}


Creates a modal file dialog and returns the selected encoding and filename or an empty string if none was chosen. 

Note that with this method the user need not select an existing filename.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\-Dir}]This can either be \begin{itemize}
\item The URL of the directory to start in. \item a relative path or a filename determining the directory to start in and the file to be selected. \item QString::null to start in the current working directory, or the last directory where a file has been selected. \item ':$<$keyword$>$' to start in the directory last used by a filedialog in the same application that specified the same keyword. \item '::$<$keyword$>$' to start in the directory last used by a filedialog in any application that specified the same keyword. \end{itemize}
\item[{\em encoding}]The encoding shown in the encoding combo. \item[{\em filter}]This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See {\bf set\-Filter()}{\rm (p.\,\pageref{classKFileDialog_a14})} for details on how to do this... \item[{\em parent}]The widget the dialog will be centered on initially. \item[{\em caption}]The name of the dialog widget. \end{description}
\end{Desc}


Definition at line 192 of file kencodingfiledialog.cpp.

References KRecent\-Document::add(), QString::at(), and KURL::is\-Valid().

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