org.kde.koala

Class PasswordDialog

public class PasswordDialog extends KDialogBase

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.

UNKNOWN: dialog for requesting login and password from the end user.

Constructor Summary
protected PasswordDialog(Class dummy)
PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, QWidget parent, String name)
Create a password dialog.
PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, QWidget parent)
PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal)
PasswordDialog(String prompt, String user, boolean enableKeep)
PasswordDialog(String prompt, String user)
Method Summary
voidaddCommentLine(String label, String comment)
Adds a comment line to the dialog.
StringclassName()
static intgetNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly, String caption, String comment, String label)
A convienence static method for obtaining authorization information from the end user.
static intgetNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly, String caption, String comment)
static intgetNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly, String caption)
static intgetNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly)
static intgetNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt)
static intgetNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep)
booleankeepPassword()
Determines whether supplied authorization should persist even after the application has been closed.
QMetaObjectmetaObject()
Stringpassword()
Returns the password entered by the user.
voidsetKeepPassword(boolean b)
Check or uncheck the "keep password" checkbox.
voidsetPassword(String password)
Presets the password.
voidsetPrompt(String prompt)
Sets the prompt to show to the user.
voidsetUserReadOnly(boolean readOnly)
Sets the username field read-only and sets the focus to the password field.
Stringusername()
Returns the username entered by the user.

Constructor Detail

PasswordDialog

protected PasswordDialog(Class dummy)

PasswordDialog

public PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, QWidget parent, String name)
Create a password dialog.

Parameters: prompt instructional text to be shown. user username, if known initially. enableKeep if true, shows checkbox that 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).

UNKNOWN: Create a password dialog.

PasswordDialog

public PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, QWidget parent)

PasswordDialog

public PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal)

PasswordDialog

public PasswordDialog(String prompt, String user, boolean enableKeep)

PasswordDialog

public PasswordDialog(String prompt, String user)

Method Detail

addCommentLine

public void addCommentLine(String label, String comment)
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.

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

UNKNOWN: Adds a comment line to the dialog.

className

public String className()

getNameAndPassword

public static int getNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly, String caption, String comment, String label)
A convienence static method for obtaining authorization information from the end user.

Parameters: user username pass password keep pointer to flag that indicates whether to keep password (can be null) 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: Accepted/Rejected based on the user choice.

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

getNameAndPassword

public static int getNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly, String caption, String comment)

getNameAndPassword

public static int getNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly, String caption)

getNameAndPassword

public static int getNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt, boolean readOnly)

getNameAndPassword

public static int getNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep, String prompt)

getNameAndPassword

public static int getNameAndPassword(StringBuffer user, StringBuffer pass, boolean[] keep)

keepPassword

public boolean keepPassword()
Determines whether supplied authorization should persist even after the application has been closed.

Returns: true to keep the password

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

metaObject

public QMetaObject metaObject()

password

public String password()
Returns the password entered by the user.

Returns: the password

UNKNOWN: Returns the password entered by the user.

setKeepPassword

public void setKeepPassword(boolean b)
Check or uncheck the "keep password" 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). enableKeep must have been set to true in the constructor.

UNKNOWN: Check or uncheck the "keep password" checkbox.

setPassword

public void setPassword(String password)
Presets the password.

Parameters: password the password to set

UNKNOWN: Presets the password.

setPrompt

public void setPrompt(String prompt)
Sets the prompt to show to the user.

Parameters: prompt instructional text to be shown.

UNKNOWN: Sets the prompt to show to the user.

setUserReadOnly

public void setUserReadOnly(boolean readOnly)
Sets the username field read-only and sets the focus to the password field.

Parameters: readOnly true to set the user field to read-only

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

username

public String username()
Returns the username entered by the user.

Returns: the user name

UNKNOWN: Returns the username entered by the user.