.TH "KIO::PasswordDialog" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
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.  

.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
.ti -1c
.RI "\fB~PasswordDialog\fP ()"
.br
.ti -1c
.RI "void \fBsetPrompt\fP (const \fBQString\fP &prompt)"
.br
.ti -1c
.RI "void \fBaddCommentLine\fP (const \fBQString\fP &label, const \fBQString\fP comment)"
.br
.ti -1c
.RI "\fBQString\fP \fBpassword\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBusername\fP () const "
.br
.ti -1c
.RI "bool \fBkeepPassword\fP () const "
.br
.ti -1c
.RI "void \fBsetKeepPassword\fP (bool b)"
.br
.ti -1c
.RI "void \fBsetUserReadOnly\fP (bool readOnly)"
.br
.ti -1c
.RI "KDE_DEPRECATED void \fBsetEnableUserField\fP (bool enable, bool=false)"
.br
.ti -1c
.RI "void \fBsetPassword\fP (const \fBQString\fP &password)"
.br
.ti -1c
.RI "void \fBsetKnownLogins\fP (const \fBQMap\fP< \fBQString\fP, \fBQString\fP > &knownLogins)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static 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
.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. dialog for requesting login and 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 36 of file passdlg.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KIO::PasswordDialog::PasswordDialog (const \fBQString\fP & prompt, const \fBQString\fP & user, bool enableKeep = \fCfalse\fP, bool modal = \fCtrue\fP, \fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Create a password dialog. 
.PP
\fBParameters:\fP
.RS 4
\fIprompt\fP instructional text to be shown. 
.br
\fIuser\fP username, if known initially. 
.br
\fIenableKeep\fP if true, shows checkbox that 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. 
.PP
.SH "Member Function Documentation"
.PP 
.SS "void KIO::PasswordDialog::setPrompt (const \fBQString\fP & prompt)"
.PP
Sets the prompt to show to the user. 
.PP
\fBParameters:\fP
.RS 4
\fIprompt\fP instructional text to be shown. 
.RE
.PP

.SS "void KIO::PasswordDialog::addCommentLine (const \fBQString\fP & label, const \fBQString\fP comment)"
.PP
Adds a comment line to the dialog. 
.PP
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.
.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. 
.PP
\fBReturns:\fP
.RS 4
the password 
.RE
.PP

.SS "\fBQString\fP KIO::PasswordDialog::username () const"
.PP
Returns the username entered by the user. 
.PP
\fBReturns:\fP
.RS 4
the user name 
.RE
.PP

.SS "bool KIO::PasswordDialog::keepPassword () const"
.PP
Determines whether supplied authorization should persist even after the application has been closed. 
.PP
\fBReturns:\fP
.RS 4
true to keep the password 
.RE
.PP

.SS "void KIO::PasswordDialog::setKeepPassword (bool b)"
.PP
Check or uncheck the 'keep password' checkbox. 
.PP
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). enableKeep must have been set to true in the constructor. 
.SS "void KIO::PasswordDialog::setUserReadOnly (bool readOnly)"
.PP
Sets the username field read-only and sets the focus to the password field. 
.PP
\fBParameters:\fP
.RS 4
\fIreadOnly\fP true to set the user field to read-only 
.RE
.PP

.SS "KDE_DEPRECATED void KIO::PasswordDialog::setEnableUserField (bool enable, bool = \fCfalse\fP)\fC [inline]\fP"
.PP
\fBDeprecated\fP
.RS 4
. Use \fBsetUserReadOnly(bool)\fP. 
.RE
.PP

.PP
Definition at line 116 of file passdlg.h.
.SS "void KIO::PasswordDialog::setPassword (const \fBQString\fP & password)"
.PP
Presets the password. 
.PP
\fBParameters:\fP
.RS 4
\fIpassword\fP the password to set 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.SS "void KIO::PasswordDialog::setKnownLogins (const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & knownLogins)"
.PP
Presets a number of login+password pairs that the user can choose from. 
.PP
The passwords can be empty if you simply want to offer usernames to choose from. This is incompatible with setUserReadOnly(true). 
.PP
\fBParameters:\fP
.RS 4
\fIknownLogins\fP map of known logins: the keys are usernames, the values are passwords. 
.RE
.PP
\fBSince:\fP
.RS 4
3.4 
.RE
.PP

.SS "static int KIO::PasswordDialog::getNameAndPassword (\fBQString\fP & user, \fBQString\fP & pass, bool * keep, const \fBQString\fP & prompt = \fCQString::null\fP, bool readOnly = \fCfalse\fP, const \fBQString\fP & caption = \fCQString::null\fP, const \fBQString\fP & comment = \fCQString::null\fP, const \fBQString\fP & label = \fCQString::null\fP)\fC [static]\fP"
.PP
A convienence static method for obtaining authorization information from the end user. 
.PP
\fBParameters:\fP
.RS 4
\fIuser\fP username 
.br
\fIpass\fP password 
.br
\fIkeep\fP pointer to flag that indicates whether to keep password (can be null) 
.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
Accepted/Rejected based on the user choice. 
.RE
.PP

.PP
Referenced by Observer::openPassDlg().

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