summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KIntNumInput.java
blob: 106936c0a7540ffb5b91a37c849f54bf9fdb8925 (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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
//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.TQSize;
import org.kde.qt.TQWidget;
import org.kde.qt.TQResizeEvent;

/**

 KIntNumInput combines a TQSpinBox and optionally a TQSlider
 with a label to make an easy to use control for setting some integer
 parameter. This is especially nice for configuration dialogs,
 which can have many such combinated controls.
 The slider is created only when the user specifies a range
 for the control using the setRange function with the slider
 parameter set to "true".
 A special feature of KIntNumInput, designed specifically for
 the situation when there are several KIntNumInputs in a column,
 is that you can specify what portion of the control is taken by the
 TQSpinBox (the remaining portion is used by the slider). This makes
 it very simple to have all the sliders in a column be the same size.
 It uses KIntValidator validator class. KIntNumInput enforces the
 value to be in the given range, and can display it in any base
 between 2 and 36.
 \image html kintnuminput.png "KDE Int Number Input Spinbox"
 See {@link KIntNumInputSignals} for signals emitted by KIntNumInput
		@version $Id$
 
		@short An input widget for integer numbers, consisting of a spinbox and a slider.

*/
public class KIntNumInput extends KNumInput  {
	protected KIntNumInput(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Constructs an input control for integer values
		 with base 10 and initial value 0.
		     		@short    Constructs an input control for integer values  with base 10 and initial value 0.
	*/
	public KIntNumInput(TQWidget parent, String name) {
		super((Class) null);
		newKIntNumInput(parent,name);
	}
	private native void newKIntNumInput(TQWidget parent, String name);
	public KIntNumInput(TQWidget parent) {
		super((Class) null);
		newKIntNumInput(parent);
	}
	private native void newKIntNumInput(TQWidget parent);
	public KIntNumInput() {
		super((Class) null);
		newKIntNumInput();
	}
	private native void newKIntNumInput();
	/**	
		 Constructor
		 It constructs a TQSpinBox that allows the input of integer numbers
		 in the range of -INT_MAX to +INT_MAX. To set a descriptive label,
		 use setLabel(). To enforce the value being in a range and optionally to
		 attach a slider to it, use setRange().
			@param value initial value for the control
			@param base numeric base used for display
			@param parent parent TQWidget
			@param name internal name for this widget
		     		@short    Constructor  It constructs a TQSpinBox that allows the input of integer numbers  in the range of -INT_MAX to +INT_MAX.
	*/
	public KIntNumInput(int value, TQWidget parent, int base, String name) {
		super((Class) null);
		newKIntNumInput(value,parent,base,name);
	}
	private native void newKIntNumInput(int value, TQWidget parent, int base, String name);
	public KIntNumInput(int value, TQWidget parent, int base) {
		super((Class) null);
		newKIntNumInput(value,parent,base);
	}
	private native void newKIntNumInput(int value, TQWidget parent, int base);
	public KIntNumInput(int value, TQWidget parent) {
		super((Class) null);
		newKIntNumInput(value,parent);
	}
	private native void newKIntNumInput(int value, TQWidget parent);
	public KIntNumInput(int value) {
		super((Class) null);
		newKIntNumInput(value);
	}
	private native void newKIntNumInput(int value);
	/**	
		 Constructor
			 the difference to the one above is the "below" parameter. It tells
		 this instance that it is visually put below some other KNumInput widget.
		 Note that these two KNumInput's need not to have the same parent widget
		 or be in the same layout group.
		 The effect is that it'll adjust it's layout in correspondence
		 with the layout of the other KNumInput's (you can build an arbitrary long
		 chain).
			@param below append KIntNumInput to the KNumInput chain
			@param value initial value for the control
			@param base numeric base used for display
			@param parent parent TQWidget
			@param name internal name for this widget
		     		@short    Constructor
	*/
	public KIntNumInput(KNumInput below, int value, TQWidget parent, int base, String name) {
		super((Class) null);
		newKIntNumInput(below,value,parent,base,name);
	}
	private native void newKIntNumInput(KNumInput below, int value, TQWidget parent, int base, String name);
	public KIntNumInput(KNumInput below, int value, TQWidget parent, int base) {
		super((Class) null);
		newKIntNumInput(below,value,parent,base);
	}
	private native void newKIntNumInput(KNumInput below, int value, TQWidget parent, int base);
	public KIntNumInput(KNumInput below, int value, TQWidget parent) {
		super((Class) null);
		newKIntNumInput(below,value,parent);
	}
	private native void newKIntNumInput(KNumInput below, int value, TQWidget parent);
	public KIntNumInput(KNumInput below, int value) {
		super((Class) null);
		newKIntNumInput(below,value);
	}
	private native void newKIntNumInput(KNumInput below, int value);
	/**	
				@return the current value.
     
		@short
	*/
	public native int value();
	/**	
				@return the curent value in units of the referencePoint.

		@short
	*/
	public native double relativeValue();
	/**	
				@return the current reference point

		@short
	*/
	public native int referencePoint();
	/**	
				@return the suffix displayed behind the value.

		@short   
		@see #setSuffix
	*/
	public native String suffix();
	/**	
				@return the prefix displayed in front of the value.

		@short   
		@see #setPrefix
	*/
	public native String prefix();
	/**	
				@return the string displayed for a special value.

		@short   
		@see #setSpecialValueText
	*/
	public native String specialValueText();
	/**	
			@param min minimum value
			@param max maximum value
			@param step step size for the TQSlider
			@param slider whether the slider is created or not
		     		@short
	*/
	public native void setRange(int min, int max, int step, boolean slider);
	public native void setRange(int min, int max, int step);
	public native void setRange(int min, int max);
	/**	
		 Sets the minimum value.
		     		@short    Sets the minimum value.
	*/
	public native void setMinValue(int min);
	/**	
				@return the minimum value.
     
		@short
	*/
	public native int minValue();
	/**	
		 Sets the maximum value.
		     		@short    Sets the maximum value.
	*/
	public native void setMaxValue(int max);
	/**	
				@return the maximum value.
     
		@short
	*/
	public native int maxValue();
	/**	
		 Sets the special value text. If set, the SpinBox will display
		 this text instead of the numeric value whenever the current
		 value is equal to minVal(). Typically this is used for indicating
		 that the choice has a special (default) meaning.
		     		@short    Sets the special value text.
	*/
	public native void setSpecialValueText(String text);
	public native void setLabel(String label, int a);
	public native void setLabel(String label);
	/**	
		 This method returns the minimum size necessary to display the
		 control. The minimum size is enough to show all the labels
		 in the current font (font change may invalidate the return value).
				@return the minimum size necessary to show the control
     
		@short    This method returns the minimum size necessary to display the  control.
	*/
	public native TQSize minimumSizeHint();
	/**	
		 Sets the value of the control.
		     		@short    Sets the value of the control.
	*/
	public native void setValue(int arg1);
	/**	
		 Sets the value in units of the referencePoint
				@short    Sets the value in units of the referencePoint
	*/
	public native void setRelativeValue(double arg1);
	/**	
		 Sets the reference point for relativeValue.
				@short    Sets the reference point for relativeValue.
	*/
	public native void setReferencePoint(int arg1);
	/**	
		 Sets the suffix to <code>suffix.</code>
		 Use null to disable this feature.
		 Formatting has to be provided (e.g. a space separator between the
		 prepended <code>value</code> and the suffix's text has to be provided
		 as the first character in the suffix).
				@short    Sets the suffix to <code>suffix.</code>
		@see org.kde.qt.TQSpinBox#setSuffix
		@see #setPrefix
	*/
	public native void setSuffix(String suffix);
	/**	
		 Sets the prefix to <code>prefix.</code>
		 Use null to disable this feature.
		 Formatting has to be provided (see above).
				@short    Sets the prefix to <code>prefix.</code>
		@see org.kde.qt.TQSpinBox#setPrefix
		@see #setSuffix
	*/
	public native void setPrefix(String prefix);
	/**	
		 sets focus to the edit widget and marks all text in if mark == true
			     		@short    sets focus to the edit widget and marks all text in if mark == true
	*/
	public native void setEditFocus(boolean mark);
	public native void setEditFocus();
	protected native void doLayout();
	protected native void resizeEvent(TQResizeEvent arg1);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}