\section{KIO::Password\-Dialog Class Reference}
\label{classKIO_1_1PasswordDialog}\index{KIO::PasswordDialog@{KIO::PasswordDialog}}
A dialog for requesting a login and a password from the end user. dialog for requesting login and password from the end user.  


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

Inheritance diagram for KIO::Password\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKIO_1_1PasswordDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::Password\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKIO_1_1PasswordDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Password\-Dialog} (const {\bf QString} \&prompt, const {\bf QString} \&user, bool enable\-Keep=false, bool modal=true, {\bf QWidget} $\ast$parent=0, const char $\ast$name=0)
\item 
{\bf $\sim$Password\-Dialog} ()
\item 
void {\bf set\-Prompt} (const {\bf QString} \&prompt)
\item 
void {\bf add\-Comment\-Line} (const {\bf QString} \&label, const {\bf QString} comment)
\item 
{\bf QString} {\bf password} () const 
\item 
{\bf QString} {\bf username} () const 
\item 
bool {\bf keep\-Password} () const 
\item 
void {\bf set\-Keep\-Password} (bool b)
\item 
void {\bf set\-User\-Read\-Only} (bool read\-Only)
\item 
KDE\_\-DEPRECATED void {\bf set\-Enable\-User\-Field} (bool enable, bool=false)
\item 
void {\bf set\-Password} (const {\bf QString} \&password)
\item 
void {\bf set\-Known\-Logins} (const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \&known\-Logins)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static int {\bf get\-Name\-And\-Password} ({\bf QString} \&user, {\bf QString} \&pass, bool $\ast$keep, const {\bf QString} \&prompt=QString::null, bool read\-Only=false, const {\bf QString} \&caption=QString::null, const {\bf QString} \&comment=QString::null, const {\bf QString} \&label=QString::null)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIO_1_1PasswordDialog_b0}

\end{CompactItemize}


\subsection{Detailed Description}
A dialog for requesting a login and a password from the end user. dialog for requesting login and password from the end user. 

KIO-Slave authors are encouraged to use {\bf Slave\-Base::open\-Pass\-Dlg}{\rm (p.\,\pageref{classKIO_1_1SlaveBase_a65})} instead of directly instantiating this dialog. 



Definition at line 36 of file passdlg.h.

\subsection{Constructor \& Destructor Documentation}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!PasswordDialog@{PasswordDialog}}
\index{PasswordDialog@{PasswordDialog}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIO::Password\-Dialog::Password\-Dialog (const {\bf QString} \& {\em prompt}, const {\bf QString} \& {\em user}, bool {\em enable\-Keep} = {\tt false}, bool {\em modal} = {\tt true}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKIO_1_1PasswordDialog_a0}


Create a password dialog. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prompt}]instructional text to be shown. \item[{\em user}]username, if known initially. \item[{\em enable\-Keep}]if true, shows checkbox that makes password persistent until {\bf KDE} is shutdown. \item[{\em modal}]if true, the dialog will be modal (default:true). \item[{\em parent}]the parent widget (default:NULL). \item[{\em name}]the dialog name (default:NULL). \end{description}
\end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!~PasswordDialog@{$\sim$PasswordDialog}}
\index{~PasswordDialog@{$\sim$PasswordDialog}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIO::Password\-Dialog::$\sim${\bf Password\-Dialog} ()}\label{classKIO_1_1PasswordDialog_a1}


Destructor. 



\subsection{Member Function Documentation}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!setPrompt@{setPrompt}}
\index{setPrompt@{setPrompt}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Password\-Dialog::set\-Prompt (const {\bf QString} \& {\em prompt})}\label{classKIO_1_1PasswordDialog_a2}


Sets the prompt to show to the user. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prompt}]instructional text to be shown. \end{description}
\end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!addCommentLine@{addCommentLine}}
\index{addCommentLine@{addCommentLine}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Password\-Dialog::add\-Comment\-Line (const {\bf QString} \& {\em label}, const {\bf QString} {\em comment})}\label{classKIO_1_1PasswordDialog_a3}


Adds a comment line to the dialog. 

This function allows you to add one additional comment line to this widget. Calling this function after a comment has already been added will not have any effect.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em label}]label for comment (ex:\char`\"{}Command:\char`\"{}) \item[{\em comment}]the actual comment text. \end{description}
\end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!password@{password}}
\index{password@{password}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIO::Password\-Dialog::password () const}\label{classKIO_1_1PasswordDialog_a4}


Returns the password entered by the user. 

\begin{Desc}
\item[Returns:]the password \end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!username@{username}}
\index{username@{username}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIO::Password\-Dialog::username () const}\label{classKIO_1_1PasswordDialog_a5}


Returns the username entered by the user. 

\begin{Desc}
\item[Returns:]the user name \end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!keepPassword@{keepPassword}}
\index{keepPassword@{keepPassword}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::Password\-Dialog::keep\-Password () const}\label{classKIO_1_1PasswordDialog_a6}


Determines whether supplied authorization should persist even after the application has been closed. 

\begin{Desc}
\item[Returns:]true to keep the password \end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!setKeepPassword@{setKeepPassword}}
\index{setKeepPassword@{setKeepPassword}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Password\-Dialog::set\-Keep\-Password (bool {\em b})}\label{classKIO_1_1PasswordDialog_a7}


Check or uncheck the \char`\"{}keep password\char`\"{} checkbox. 

This can be used to check it before showing the dialog, to tell the user that the password is stored already (e.g. in the wallet). enable\-Keep must have been set to true in the constructor. \index{KIO::PasswordDialog@{KIO::Password\-Dialog}!setUserReadOnly@{setUserReadOnly}}
\index{setUserReadOnly@{setUserReadOnly}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Password\-Dialog::set\-User\-Read\-Only (bool {\em read\-Only})}\label{classKIO_1_1PasswordDialog_a8}


Sets the username field read-only and sets the focus to the password field. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em read\-Only}]true to set the user field to read-only \end{description}
\end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!setEnableUserField@{setEnableUserField}}
\index{setEnableUserField@{setEnableUserField}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED void KIO::Password\-Dialog::set\-Enable\-User\-Field (bool {\em enable}, bool = {\tt false})\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1PasswordDialog_a9}


\begin{Desc}
\item[{\bf Deprecated}]. Use {\bf set\-User\-Read\-Only(bool)}{\rm (p.\,\pageref{classKIO_1_1PasswordDialog_a8})}. \end{Desc}


Definition at line 116 of file passdlg.h.\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!setPassword@{setPassword}}
\index{setPassword@{setPassword}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Password\-Dialog::set\-Password (const {\bf QString} \& {\em password})}\label{classKIO_1_1PasswordDialog_a10}


Presets the password. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em password}]the password to set \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!setKnownLogins@{setKnownLogins}}
\index{setKnownLogins@{setKnownLogins}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Password\-Dialog::set\-Known\-Logins (const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \& {\em known\-Logins})}\label{classKIO_1_1PasswordDialog_a11}


Presets a number of login+password pairs that the user can choose from. 

The passwords can be empty if you simply want to offer usernames to choose from. This is incompatible with set\-User\-Read\-Only(true). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em known\-Logins}]map of known logins: the keys are usernames, the values are passwords. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}
\index{KIO::PasswordDialog@{KIO::Password\-Dialog}!getNameAndPassword@{getNameAndPassword}}
\index{getNameAndPassword@{getNameAndPassword}!KIO::PasswordDialog@{KIO::Password\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int KIO::Password\-Dialog::get\-Name\-And\-Password ({\bf QString} \& {\em user}, {\bf QString} \& {\em pass}, bool $\ast$ {\em keep}, const {\bf QString} \& {\em prompt} = {\tt QString::null}, bool {\em read\-Only} = {\tt false}, const {\bf QString} \& {\em caption} = {\tt QString::null}, const {\bf QString} \& {\em comment} = {\tt QString::null}, const {\bf QString} \& {\em label} = {\tt QString::null})\hspace{0.3cm}{\tt  [static]}}\label{classKIO_1_1PasswordDialog_e0}


A convienence static method for obtaining authorization information from the end user. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em user}]username \item[{\em pass}]password \item[{\em keep}]pointer to flag that indicates whether to keep password (can be null) \item[{\em prompt}]text to display to user. \item[{\em read\-Only}]make the username field read-only. \item[{\em caption}]set the title bar to given text. \item[{\em comment}]extra comment to display to user. \item[{\em label}]optinal label for extra comment.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Accepted/Rejected based on the user choice. \end{Desc}


Referenced by Observer::open\-Pass\-Dlg().

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