class PasswordDialog

# class PasswordDialog | A dialog for requesting a login and a password from the end user. More...
Full name | `KIO::PasswordDialog`
Definition | `#include <passdlg.h>`
Inherits | KDialogBase (kdeui) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- PasswordDialog ( const QString& prompt, const QString& user, bool enableKeep = false, bool modal=true, QWidget* parent=0, const char* name=0 )
- ~PasswordDialog ()
- void setPrompt ( const QString& prompt )
- void addCommentLine ( const QString& label, const QString comment )
- QString password () const
- QString username () const
- bool keepPassword () const
- void setUserReadOnly ( bool readOnly )
- void setEnableUserField ( bool enable, bool=false )
- void setPassword ( const QString& password )

#### Public Static Methods

- static int getNameAndPassword ( QString& user, QString& pass, bool* keep, const QString& prompt = QString::null, bool readOnly = false, const QString& caption = QString::null, const QString& comment = QString::null, const QString& label = QString::null )

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

## Detailed Description

A dialog for requesting a login and a password from the end user.

KIO-Slave authors are encouraged to use SlaveBase::openPassDlg instead of directly instantiating this dialog.

PasswordDialog ( const QString& prompt, const QString& user, bool enableKeep = false, bool modal=true, QWidget* parent=0, const char* name=0 ) | ### PasswordDialog

Create a password dialog.

Parameters:

prompt | instructional text to be shown.
user | username, if known initially.
enableKeep | if true, makes password persistent until KDE is shutdown.
modal | if true, the dialog will be modal (default:true).
parent | the parent widget (default:NULL).
name | the dialog name (default:NULL).

~PasswordDialog () | ### ~PasswordDialog

Destructor

void setPrompt ( const QString& prompt ) | ### setPrompt

Sets the prompt to show to the user.

void addCommentLine ( const QString& label, const QString comment ) | ### addCommentLine

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.

Parameters:

label | label for comment (ex:"Command:")
comment | the actual comment text.

QString password () | ### password

[const]

Returns the password entered by the user.

QString username () | ### username

[const]

Returns the username entered by the user.

bool keepPassword () | ### keepPassword

[const]

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

void setUserReadOnly ( bool readOnly ) | ### setUserReadOnly

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

Parameters:

readOnly |

void setEnableUserField ( bool enable, bool=false ) | ### setEnableUserField

void setPassword ( const QString& password ) | ### setPassword

Presets the password

int getNameAndPassword ( QString& user, QString& pass, bool* keep, const QString& prompt = QString::null, bool readOnly = false, const QString& caption = QString::null, const QString& comment = QString::null, const QString& label = QString::null ) | ### getNameAndPassword

[static]

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

Parameters:

user | username
pass | password
keep | pointer to flag that indicates
prompt | text to display to user.
readOnly | make the username field read-only.
caption | set the title bar to given text.
comment | extra comment to display to user.
label | optinal label for extra comment.

Returns: Accept/Reject based on the user choice.

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from KDialogBase.

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:57 2003, using kdoc 2.0a54.