.TH "KIO::PasswordDialog" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIO::PasswordDialog \- A dialog for requesting a login and a password from the end user.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <passdlg.h>\fP
.PP
Inherits \fBKDialogBase\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBPasswordDialog\fP (const  \fBQString\fP &prompt, const  \fBQString\fP &user, bool enableKeep=false, bool modal=true, \fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fICreate a password dialog. \fP"
.ti -1c
.RI "\fB~PasswordDialog\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "void \fBsetPrompt\fP (const  \fBQString\fP &prompt)"
.br
.RI "\fISets the prompt to show to the user. \fP"
.ti -1c
.RI "void \fBaddCommentLine\fP (const  \fBQString\fP &label, const  \fBQString\fP comment)"
.br
.RI "\fIAdds a comment line to the dialog. \fP"
.ti -1c
.RI "\fBQString\fP \fBpassword\fP () const "
.br
.RI "\fIReturns the password entered by the user. \fP"
.ti -1c
.RI "\fBQString\fP \fBusername\fP () const "
.br
.RI "\fIReturns the username entered by the user. \fP"
.ti -1c
.RI "bool \fBkeepPassword\fP () const "
.br
.RI "\fIDetermines whether supplied authorization should persist even after the application has been closed. \fP"
.ti -1c
.RI "void \fBsetUserReadOnly\fP (bool readOnly)"
.br
.RI "\fISets the username field read-only and sets the focus to the password field. \fP"
.ti -1c
.RI "void \fBsetEnableUserField\fP (bool enable, bool=false)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP. \fP"
.ti -1c
.RI "void \fBsetPassword\fP (const  \fBQString\fP &password)"
.br
.RI "\fIPresets the password 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP
\fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "int \fBgetNameAndPassword\fP (\fBQString\fP &user, \fBQString\fP &pass, bool *keep, const  \fBQString\fP &prompt=QString::null, bool readOnly=false, const  \fBQString\fP &caption=QString::null, const  \fBQString\fP &comment=QString::null, const  \fBQString\fP &label=QString::null)"
.br
.RI "\fIA convienence static method for obtaining authorization information from the end user. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A dialog for requesting a login and a password from the end user. 

KIO-Slave authors are encouraged to use \fBSlaveBase::openPassDlg\fP instead of directly instantiating this dialog. 
.PP
Definition at line 35 of file passdlg.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KIO::PasswordDialog::PasswordDialog (const \fBQString\fP & prompt, const \fBQString\fP & user, bool enableKeep = false, bool modal = true, \fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Create a password dialog. \fBParameters:\fP
.RS 4
\fIprompt\fP instructional text to be shown. 
.br
\fIuser\fP username, if known initially. 
.br
\fIenableKeep\fP if true, makes password persistent until \fBKDE\fP is shutdown. 
.br
\fImodal\fP if true, the dialog will be modal (default:true). 
.br
\fIparent\fP the parent widget (default:NULL). 
.br
\fIname\fP the dialog name (default:NULL). 
.RE
.PP

.SS "KIO::PasswordDialog::~\fBPasswordDialog\fP ()"
.PP
Destructor. 
.SH "Member Function Documentation"
.PP 
.SS "void KIO::PasswordDialog::setPrompt (const \fBQString\fP & prompt)"
.PP
Sets the prompt to show to the user. 
.SS "void KIO::PasswordDialog::addCommentLine (const \fBQString\fP & label, const \fBQString\fP comment)"
.PP
Adds a comment line to the dialog. This function allows you to add one additional comment line to this widget. Calling this fucntion after a comment has already been added will not have any effect.
.PP
\fBParameters:\fP
.RS 4
\fIlabel\fP label for comment (ex:'Command:') 
.br
\fIcomment\fP the actual comment text. 
.RE
.PP

.SS "\fBQString\fP KIO::PasswordDialog::password () const"
.PP
Returns the password entered by the user. 
.SS "\fBQString\fP KIO::PasswordDialog::username () const"
.PP
Returns the username entered by the user. 
.SS "bool KIO::PasswordDialog::keepPassword () const"
.PP
Determines whether supplied authorization should persist even after the application has been closed. 
.SS "void KIO::PasswordDialog::setUserReadOnly (bool readOnly)"
.PP
Sets the username field read-only and sets the focus to the password field. \fBParameters:\fP
.RS 4
\fIreadOnly\fP .RE
.PP
Referenced by setEnableUserField().
.SS "void KIO::PasswordDialog::setEnableUserField (bool enable, bool = false)\fC [inline]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP. Use \fBsetUserReadOnly\fP(bool). Definition at line 103 of file passdlg.h.
.PP
References setUserReadOnly().
.SS "void KIO::PasswordDialog::setPassword (const \fBQString\fP & password)"
.PP
Presets the password 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP

.SS "int KIO::PasswordDialog::getNameAndPassword (\fBQString\fP & user, \fBQString\fP & pass, bool * keep, const \fBQString\fP & prompt = QString::null, bool readOnly = false, const \fBQString\fP & caption = QString::null, const \fBQString\fP & comment = QString::null, const \fBQString\fP & label = QString::null)\fC [static]\fP"
.PP
A convienence static method for obtaining authorization information from the end user. \fBParameters:\fP
.RS 4
\fIuser\fP username 
.br
\fIpass\fP password 
.br
\fIkeep\fP pointer to flag that indicates 
.br
\fIprompt\fP text to display to user. 
.br
\fIreadOnly\fP make the username field read-only. 
.br
\fIcaption\fP set the title bar to given text. 
.br
\fIcomment\fP extra comment to display to user. 
.br
\fIlabel\fP optinal label for extra comment.
.RE
.PP
\fBReturns:\fP
.RS 4
Accept/Reject based on the user choice. 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
