class PasswordDialog

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

Full nameKIO::PasswordDialog
Definition#include <passdlg.h>
InheritsKDialog (kdeui) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


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 ( QWidget* parent=0, const char* name=0, WFlags wflags=0, bool modal=true, bool enableKeep=false )

PasswordDialog

Create a password dialog.

Parameters:
parentthe parent widget (default:NULL).
namethe dialog name (default:NULL).
wfagswindow flags.
modalif true, the dialog will be modal(default:true).
enableKeepshows or hides the keep password check box.

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

PasswordDialog

Create a password dialog.

Parameters:
promptinstructional text to be shown.
userusername, if known initially.
enableKeepif true, makes password persistent until KDE is shutdown.
modalif true, the dialog will be modal (default:true).
parentthe parent widget (default:NULL).
namethe dialog name (default:NULL).
wfagswindow flags.

 PasswordDialog ( QWidget* parent, const char* name, bool modal, WFlags wflags, const QString& head, const QString& user, const QString& pass )

PasswordDialog

IMPORTANT: This function is added for binary compatability with the previous password dialog and as such should be avoided!

Parameters:
parentthe parent widget
namethe dialog name
modalif true, the dialog will be modal
wflagswindow flags, passed to QDialog
headthe text to show in the dialog, on top of the two fields
useruser name, if known initially
passpassword, if known initially

 ~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:
labellabel for comment (ex:"Command:")
commentthe 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.

QString  user ()

user

QString  password ()

password

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

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:
userusername
passpassword
keeppointer to flag that indicates
prompttext to display to user.
readOnlymake the username field read-only.
captionset the title bar to given text.
commentextra comment to display to user.
labeloptinal label for extra comment.

Returns: Accept/Reject based on the user choice.


Generated by: faure on ftp.kde.com on Tue May 1 07:17:36 2001, using kdoc 2.0a53.