summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/PasswordDialog.java
blob: ae954e899a5b1d97cc4e498584b05a34ded25c6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.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);
}