//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;

import org.trinitydesktop.qt.TQt;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQWidget;

/**

 A dialog for requesting a login and a password from the end user.
 TDEIO-Slave authors are encouraged to use SlaveBase.openPassDlg
 instead of directly instantiating this dialog.
		@short dialog for requesting login and password from the end user.

*/
public class PasswordDialog extends KDialogBase  {
	protected PasswordDialog(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**
		 Create a password dialog.
			@param prompt instructional text to be shown.
			@param user username, if known initially.
			@param enableKeep if true, shows checkbox that makes password persistent until KDE is shutdown.
			@param modal if true, the dialog will be modal (default:true).
			@param parent the parent widget (default:NULL).
			@param name the dialog name (default:NULL).
		     		@short    Create a password dialog.
	*/
	public PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, TQWidget parent, String name) {
		super((Class) null);
		newPasswordDialog(prompt,user,enableKeep,modal,parent,name);
	}
	private native void newPasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, TQWidget parent, String name);
	public PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, TQWidget parent) {
		super((Class) null);
		newPasswordDialog(prompt,user,enableKeep,modal,parent);
	}
	private native void newPasswordDialog(String prompt, String user, boolean enableKeep, boolean modal, TQWidget parent);
	public PasswordDialog(String prompt, String user, boolean enableKeep, boolean modal) {
		super((Class) null);
		newPasswordDialog(prompt,user,enableKeep,modal);
	}
	private native void newPasswordDialog(String prompt, String user, boolean enableKeep, boolean modal);
	public PasswordDialog(String prompt, String user, boolean enableKeep) {
		super((Class) null);
		newPasswordDialog(prompt,user,enableKeep);
	}
	private native void newPasswordDialog(String prompt, String user, boolean enableKeep);
	public PasswordDialog(String prompt, String user) {
		super((Class) null);
		newPasswordDialog(prompt,user);
	}
	private native void newPasswordDialog(String prompt, String user);
	/**
		 Sets the prompt to show to the user.
			@param prompt instructional text to be shown.
		     		@short    Sets the prompt to show to the user.
	*/
	public native void setPrompt(String prompt);
	/**
		 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.
			@param label label for comment (ex:"Command:")
			@param comment the actual comment text.
		     		@short    Adds a comment line to the dialog.
	*/
	public native void addCommentLine(String label, String comment);
	/**
		 Returns the password entered by the user.
				@return the password

		@short    Returns the password entered by the user.
	*/
	public native String password();
	/**
		 Returns the username entered by the user.
				@return the user name

		@short    Returns the username entered by the user.
	*/
	public native String username();
	/**
		 Determines whether supplied authorization should
		 persist even after the application has been closed.
				@return true to keep the password

		@short    Determines whether supplied authorization should  persist even after the application has been closed.
	*/
	public native boolean keepPassword();
	/**
		 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.
		     		@short    Check or uncheck the "keep password" checkbox.
	*/
	public native void setKeepPassword(boolean b);
	/**
		 Sets the username field read-only and sets the
		 focus to the password field.
			@param readOnly true to set the user field to read-only
		     		@short    Sets the username field read-only and sets the  focus to the password field.
	*/
	public native void setUserReadOnly(boolean readOnly);
	/**
		 Presets the password.
			@param password the password to set
				@short    Presets the password.
	*/
	public native void setPassword(String password);
	/**
		 Presets a number of login+password pairs that the user can choose from.
		 The passwords can be empty if you simply want to offer usernames to choose from.
		 This is incompatible with setUserReadOnly(true).
			@param knownLogins map of known logins: the keys are usernames, the values are passwords.
				@short    Presets a number of login+password pairs that the user can choose from.
	*/
	// void setKnownLogins(const TQMap<TQString, TQString>& arg1); >>>> NOT CONVERTED
	/**
		 A convienence static method for obtaining authorization
		 information from the end user.
			@param user username
			@param pass password
			@param keep pointer to flag that indicates whether to keep password (can be null)
			@param prompt text to display to user.
			@param readOnly make the username field read-only.
			@param caption set the title bar to given text.
			@param comment extra comment to display to user.
			@param label optinal label for extra comment.
				@return Accepted/Rejected based on the user choice.

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