summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KInputDialog.java
blob: 4b6317a624c8a2a494258468dc8281f5adfbef39 (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
145
146
147
148
//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 java.util.ArrayList;
import org.kde.qt.TQValidator;
import org.kde.qt.TQWidget;

/**

 The KInputDialog class provides a simple dialog to get a single value
 from the user. The value can be a string, a number (either an integer or
 a float) or an item from a list. This class is designed to be source
 compatible with TQInputDialog.
 Five static convenience functions are provided: getText(), getInteger().
 getDouble(), getItem() and getItemList().
		@author Nadeem Hasan <nhasan@kde.org>
 
		@short    The KInputDialog class provides a simple dialog to get a single value  from the user.

*/
public class KInputDialog extends KDialogBase  {
	protected KInputDialog(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Static convenience function to get a string from the user.
			 caption is the text that is displayed in the title bar. label is the
		 text that appears as a label for the line edit. value is the initial
		 value of the line edit. ok will be set to true if user pressed Ok
		 and false if user pressed Cancel.
			 If you provide a validator, the Ok button is disabled as long as
		 the validator doesn't return Acceptable. If there is no validator,
		 the Ok button is enabled whenever the line edit isn't empty. If you
		 want to accept empty input, create a trivial TQValidator that
		 always returns acceptable, e.g. TQRegExpValidator with a regexp
		 of ".*".
			@param caption Caption of the dialog
			@param label Text of the label for the line edit
			@param value Initial value of the line edit
			@param ok This boolean would be set to true if user pressed Ok
			@param parent Parent of the dialog widget
			@param name Name of the dialog widget
			@param validator A {@link TQValidator} to be associated with the line edit
			@param mask Mask associated with the line edit. See the
		                  documentation for {@link TQLineEdit} about masks.
				@return String user entered if Ok was pressed, else a null string
     
		@short    Static convenience function to get a string from the user.
	*/
	public static native String getText(String caption, String label, String value, boolean[] ok, TQWidget parent, String name, TQValidator validator, String mask);
	public static native String getText(String caption, String label, String value, boolean[] ok, TQWidget parent, String name, TQValidator validator);
	public static native String getText(String caption, String label, String value, boolean[] ok, TQWidget parent, String name);
	public static native String getText(String caption, String label, String value, boolean[] ok, TQWidget parent);
	public static native String getText(String caption, String label, String value, boolean[] ok);
	public static native String getText(String caption, String label, String value);
	public static native String getText(String caption, String label);
	/**	 
		 Same as {@link #getText} except it provides an extra parameter to specify 
		 a TQWhatsThis text for the input widget.
			 ### KDE4: Merge with getText.
				@short     Same as @ref getText except it provides an extra parameter to specify   a TQWhatsThis text for the input widget.
	*/
	public static native String text(String caption, String label, String value, boolean[] ok, TQWidget parent, String name, TQValidator validator, String mask, String whatsThis);
	public static native String text(String caption, String label, String value, boolean[] ok, TQWidget parent, String name, TQValidator validator, String mask);
	public static native String text(String caption, String label, String value, boolean[] ok, TQWidget parent, String name, TQValidator validator);
	public static native String text(String caption, String label, String value, boolean[] ok, TQWidget parent, String name);
	public static native String text(String caption, String label, String value, boolean[] ok, TQWidget parent);
	public static native String text(String caption, String label, String value, boolean[] ok);
	public static native String text(String caption, String label, String value);
	public static native String text(String caption, String label);
	/**	
		 Static convenience function to get a multiline string from the user.
			 caption is the text that is displayed in the title bar. label is the
		 text that appears as a label for the line edit. value is the initial
		 value of the line edit. ok will be set to true if user pressed Ok
		 and false if user pressed Cancel.
			@param caption Caption of the dialog
			@param label Text of the label for the line edit
			@param value Initial value of the line edit
			@param ok This boolean would be set to true if user pressed Ok
			@param parent Parent of the dialog widget
			@param name Name of the dialog widget
				@return String user entered if Ok was pressed, else a null string

		@short    Static convenience function to get a multiline string from the user.
	*/
	public static native String getMultiLineText(String caption, String label, String value, boolean[] ok, TQWidget parent, String name);
	public static native String getMultiLineText(String caption, String label, String value, boolean[] ok, TQWidget parent);
	public static native String getMultiLineText(String caption, String label, String value, boolean[] ok);
	public static native String getMultiLineText(String caption, String label, String value);
	public static native String getMultiLineText(String caption, String label);
	/**	
		 Static convenience function to let the user select an item from a
		 list. caption is the text that is displayed in the title bar.
		 label is the text that appears as the label for the list. list
		 is the string list which is inserted into the list, and current
		 is the number of the item which should be the selected item. If 
		 editable is true, the user can enter their own text.
			@param caption Caption of the dialog
			@param label Text of the label for the spin box
			@param list List of item for user to choose from
			@param current Index of the selected item
			@param editable If true, user can enter own text
			@param ok This boolean would be set to true if user pressed Ok
			@param parent Parent of the dialog widget
			@param name Name of the dialog widget
				@return Text of the selected item. If <code>editable</code> is true this can be
         a text entered by the user.
     
		@short    Static convenience function to let the user select an item from a  list.
	*/
	public static native String getItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok, TQWidget parent, String name);
	public static native String getItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok, TQWidget parent);
	public static native String getItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok);
	public static native String getItem(String caption, String label, String[] list, int current, boolean editable);
	public static native String getItem(String caption, String label, String[] list, int current);
	public static native String getItem(String caption, String label, String[] list);
	/**	
		 Static convenience function to let the user select one or more
		 items from a listbox. caption is the text that is displayed in the
		 title bar. label is the text that appears as the label for the listbox.
		 list is the string list which is inserted into the listbox, select
		 is the list of item(s) that should be the selected. If multiple is 
		 true, the user can select multiple items.
			@param caption Caption of the dialog
			@param label Text of the label for the spin box
			@param list List of item for user to choose from
			@param select List of item(s) that should be selected
			@param multiple If true, user can select multiple items
			@param ok This boolean would be set to true if user pressed Ok
			@param parent Parent of the dialog widget
			@param name Name of the dialog widget
				@return List of selected items if multiple is true, else currently
         selected item as an ArrayList
     
		@short    Static convenience function to let the user select one or more  items from a listbox.
	*/
	public static native ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok, TQWidget parent, String name);
	public static native ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok, TQWidget parent);
	public static native ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok);
	public static native ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple);
	public static native ArrayList getItemList(String caption, String label, String[] list, String[] select);
	public static native ArrayList getItemList(String caption, String label, String[] list);
	public static native ArrayList getItemList(String caption, String label);
}