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
|
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;
import org.kde.qt.Qt;
import org.kde.qt.TQKeySequence;
import org.kde.qt.QtSupport;
/**
A KKeySequence object holds a sequence of up to 4 keys.
Ex: Ctrl+X,I
@short A KKeySequence object holds a sequence of up to 4 keys.
@see KKey
@see TDEShortcut
*/
public class KKeySequence implements QtSupport {
private long _qt;
private boolean _allocatedInJavaWorld = true;
protected KKeySequence(Class dummy){}
public static final int MAX_KEYS = 4;
/**
Create a new null key sequence.
@short Create a new null key sequence.
@see #isNull
@see #null
@see #clear
*/
public KKeySequence() {
newKKeySequence();
}
private native void newKKeySequence();
/**
Copies the given qt key sequence.
@param keySeq the qt key sequence to copy
@short Copies the given qt key sequence.
*/
public KKeySequence(TQKeySequence keySeq) {
newKKeySequence(keySeq);
}
private native void newKKeySequence(TQKeySequence keySeq);
/**
Create a new key sequence that only contains the given key.
@param key the key to add
@short Create a new key sequence that only contains the given key.
*/
public KKeySequence(KKey key) {
newKKeySequence(key);
}
private native void newKKeySequence(KKey key);
/**
Copies the given key sequence.
@param keySeq the key sequence to copy
@short Copies the given key sequence.
*/
public KKeySequence(KKeySequence keySeq) {
newKKeySequence(keySeq);
}
private native void newKKeySequence(KKeySequence keySeq);
/**
Creates a new key sequence that contains the given key sequence.
The description consists of comma-separated keys as
required by KKey.KKey(String).
@param keySeq the description of the key
@short Creates a new key sequence that contains the given key sequence.
@see KKeyServer#Sym#init
@see KKey#KKey(const
*/
public KKeySequence(String keySeq) {
newKKeySequence(keySeq);
}
private native void newKKeySequence(String keySeq);
/**
Clears the key sequence. The key sequence is null after calling this
function.
@short Clears the key sequence.
@see #isNull
*/
public native void clear();
/**
Returns the number of key strokes of this sequence.
@return the number of key strokes
@short Returns the number of key strokes of this sequence.
@see MAX_KEYS
*/
public native int count();
/**
Return the <code>i</code>'th key of this sequence, or a null key if there
are less then i keys.
@param i the key to retrieve
@return the <code>i</code>'th key, or KKey.null() if there are less
than i keys
@short Return the <code>i</code>'th key of this sequence, or a null key if there are less then i keys.
@see MAX_KEYS
*/
public native KKey key(int i);
/**
@short
*/
public native boolean isTriggerOnRelease();
/**
Sets the <code>i</code>'th key of the sequence. You can not introduce gaps
in a sequence, so you must use an <code>i</code> <= count(). Also note that
the maximum length of a key sequence is MAX_KEYS.
@param i the position of the new key (<= count(), <= MAX_KEYS)
@param key the key to set
@return true if successful, false otherwise
@short Sets the <code>i</code>'th key of the sequence.
*/
public native boolean setKey(int i, KKey key);
/**
Returns true if the key sequence is null (after clear() or empty
constructor).
@return true if the key sequence is null
@short Returns true if the key sequence is null (after clear() or empty constructor).
@see #clear
@see #null
*/
public native boolean isNull();
/**
Returns true if this key sequence begins with the given sequence.
@param keySeq the key sequence to search
@return true if this key sequence begins with the given sequence
@short Returns true if this key sequence begins with the given sequence.
*/
public native boolean startsWith(KKeySequence keySeq);
/**
Compares this object with the given key sequence. Returns a negative
number if the given KKeySequence is larger, 0 if they are equal and
a positive number this KKeySequence is larger. Key sequences are
compared by comparing the individual keys, starting from the beginning
until an unequal key has been found. If a sequence contains more
keys, it is considered larger.
@param keySeq the key sequence to compare to
@return a negative number if the given KKeySequence is larger, 0 if
they are equal and a positive number this KKeySequence is larger
@short Compares this object with the given key sequence.
@see KKey#sequence
*/
public native int compare(KKeySequence keySeq);
/**
Compares the keys of both sequences.
@short Compares the keys of both sequences.
@see #compare
*/
public native boolean op_equals(KKeySequence seq);
/**
Compares the keys of both sequences.
@short Compares the keys of both sequences.
@see #compare
*/
public native boolean op_not_equals(KKeySequence seq);
/**
Compares the keys of both sequences.
@short Compares the keys of both sequences.
@see #compare
*/
public native boolean op_lt(KKeySequence seq);
/**
Converts this key sequence to a TQKeySequence.
@return the TQKeySequence
@short Converts this key sequence to a TQKeySequence.
*/
public native TQKeySequence qt();
/**
Returns the qt key code of the first key.
@return the qt key code of the first key
@short Returns the qt key code of the first key.
@see org.kde.qt.Qt#Key
@see KKey#keyCodeQt
*/
public native int keyCodeQt();
/**
Returns the key sequence as a number of key presses as
returned by KKey.toString(), separated by commas.
@return the string represenation of this key sequence
@short Returns the key sequence as a number of key presses as returned by KKey.toString(), separated by commas.
@see KKey#toString
*/
public native String toString();
/**
@short
*/
public native String toStringInternal();
/**
Returns a null key sequence.
@return the null key sequence
@short Returns a null key sequence.
@see #isNull
@see #clear
*/
public static native KKeySequence nil();
/** 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();
}
|