org.kde.koala

Class KKeySequence

public class KKeySequence extends Object implements QtSupport

A KKeySequence object holds a sequence of up to 4 keys. Ex: Ctrl+X,I

See Also: KKey KShortcut

UNKNOWN: A KKeySequence object holds a sequence of up to 4 keys.

Field Summary
static intMAX_KEYS
Constructor Summary
protected KKeySequence(Class dummy)
KKeySequence()
Create a new null key sequence.
KKeySequence(QKeySequence keySeq)
Copies the given qt key sequence.
KKeySequence(KKey key)
Create a new key sequence that only contains the given key.
KKeySequence(KKeySequence keySeq)
Copies the given key sequence.
KKeySequence(String keySeq)
Creates a new key sequence that contains the given key sequence.
Method Summary
voidclear()
Clears the key sequence.
intcompare(KKeySequence keySeq)
Compares this object with the given key sequence.
intcount()
Returns the number of key strokes of this sequence.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisNull()
Returns true if the key sequence is null (after clear() or empty constructor).
booleanisTriggerOnRelease()
KKeykey(int i)
Return the i'th key of this sequence, or a null key if there are less then i keys.
intkeyCodeQt()
Returns the qt key code of the first key.
static KKeySequencenil()
Returns a null key sequence.
booleanop_equals(KKeySequence seq)
Compares the keys of both sequences.
booleanop_lt(KKeySequence seq)
Compares the keys of both sequences.
booleanop_not_equals(KKeySequence seq)
Compares the keys of both sequences.
QKeySequenceqt()
Converts this key sequence to a QKeySequence.
booleansetKey(int i, KKey key)
Sets the i'th key of the sequence.
booleanstartsWith(KKeySequence keySeq)
Returns true if this key sequence begins with the given sequence.
StringtoString()
Returns the key sequence as a number of key presses as returned by KKey.toString(), separated by commas.
StringtoStringInternal()

Field Detail

MAX_KEYS

public static final int MAX_KEYS

Constructor Detail

KKeySequence

protected KKeySequence(Class dummy)

KKeySequence

public KKeySequence()
Create a new null key sequence.

See Also: KKeySequence KKeySequence KKeySequence

UNKNOWN: Create a new null key sequence.

KKeySequence

public KKeySequence(QKeySequence keySeq)
Copies the given qt key sequence.

Parameters: keySeq the qt key sequence to copy

UNKNOWN: Copies the given qt key sequence.

KKeySequence

public KKeySequence(KKey key)
Create a new key sequence that only contains the given key.

Parameters: key the key to add

UNKNOWN: Create a new key sequence that only contains the given key.

KKeySequence

public KKeySequence(KKeySequence keySeq)
Copies the given key sequence.

Parameters: keySeq the key sequence to copy

UNKNOWN: Copies the given key sequence.

KKeySequence

public KKeySequence(String 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).

Parameters: keySeq the description of the key

See Also: KKeyServer#Sym#init (const

UNKNOWN: Creates a new key sequence that contains the given key sequence.

Method Detail

clear

public void clear()
Clears the key sequence. The key sequence is null after calling this function.

See Also: KKeySequence

UNKNOWN: Clears the key sequence.

compare

public int compare(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.

Parameters: keySeq the key sequence to compare to

Returns: a negative number if the given KKeySequence is larger, 0 if they are equal and a positive number this KKeySequence is larger

See Also: KKey

UNKNOWN: Compares this object with the given key sequence.

count

public int count()
Returns the number of key strokes of this sequence.

Returns: the number of key strokes

See Also: MAX_KEYS

UNKNOWN: Returns the number of key strokes of this sequence.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isNull

public boolean isNull()
Returns true if the key sequence is null (after clear() or empty constructor).

Returns: true if the key sequence is null

See Also: KKeySequence KKeySequence

UNKNOWN: Returns true if the key sequence is null (after clear() or empty constructor).

isTriggerOnRelease

public boolean isTriggerOnRelease()

UNKNOWN:

key

public KKey key(int i)
Return the i'th key of this sequence, or a null key if there are less then i keys.

Parameters: i the key to retrieve

Returns: the i'th key, or KKey.null() if there are less than i keys

See Also: MAX_KEYS

UNKNOWN: Return the i'th key of this sequence, or a null key if there are less then i keys.

keyCodeQt

public int keyCodeQt()
Returns the qt key code of the first key.

Returns: the qt key code of the first key

See Also: org.kde.qt.Qt#Key KKey

UNKNOWN: Returns the qt key code of the first key.

nil

public static KKeySequence nil()
Returns a null key sequence.

Returns: the null key sequence

See Also: KKeySequence KKeySequence

UNKNOWN: Returns a null key sequence.

op_equals

public boolean op_equals(KKeySequence seq)
Compares the keys of both sequences.

See Also: KKeySequence

UNKNOWN: Compares the keys of both sequences.

op_lt

public boolean op_lt(KKeySequence seq)
Compares the keys of both sequences.

See Also: KKeySequence

UNKNOWN: Compares the keys of both sequences.

op_not_equals

public boolean op_not_equals(KKeySequence seq)
Compares the keys of both sequences.

See Also: KKeySequence

UNKNOWN: Compares the keys of both sequences.

qt

public QKeySequence qt()
Converts this key sequence to a QKeySequence.

Returns: the QKeySequence

UNKNOWN: Converts this key sequence to a QKeySequence.

setKey

public boolean setKey(int i, KKey key)
Sets the i'th key of the sequence. You can not introduce gaps in a sequence, so you must use an i <= count(). Also note that the maximum length of a key sequence is MAX_KEYS.

Parameters: i the position of the new key (<= count(), <= MAX_KEYS) key the key to set

Returns: true if successful, false otherwise

UNKNOWN: Sets the i'th key of the sequence.

startsWith

public boolean startsWith(KKeySequence keySeq)
Returns true if this key sequence begins with the given sequence.

Parameters: keySeq the key sequence to search

Returns: true if this key sequence begins with the given sequence

UNKNOWN: Returns true if this key sequence begins with the given sequence.

toString

public String toString()
Returns the key sequence as a number of key presses as returned by KKey.toString(), separated by commas.

Returns: the string represenation of this key sequence

See Also: KKey

UNKNOWN: Returns the key sequence as a number of key presses as returned by KKey.toString(), separated by commas.

toStringInternal

public String toStringInternal()

UNKNOWN: