|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KKey
public class KKey
A KKey object represents a single key with possible modifiers (Shift, Ctrl, Alt, Win). It can represent both keys which are understood by Qt as well as those which are additionally supported by the underlying system (e.g. X11).
KKeyNative
,
KKeySequence
,
KShortcut
Field Summary | |
---|---|
static int |
ALT
|
static int |
CTRL
|
static int |
MOD_FLAG_COUNT
The number of flags. |
static int |
QtWIN
|
static int |
SHIFT
Flags to represent the modifiers. |
static int |
WIN
|
Constructor Summary | |
---|---|
|
KKey()
Creates a new null KKey. |
protected |
KKey(java.lang.Class dummy)
|
|
KKey(int keyQt)
Creates a new key for the given Qt key code. |
|
KKey(int key,
int mod)
|
|
KKey(KKey key)
Copy constructor. |
|
KKey(org.kde.qt.QKeyEvent keyEvent)
Extracts the key from the given key event. |
|
KKey(org.kde.qt.QKeySequence keySeq)
Creates a new key from the first key code of the given key sequence. |
|
KKey(java.lang.String key)
Creates a new key from the given description. |
Method Summary | |
---|---|
void |
clear()
Clears the key. |
int |
compare(KKey key)
Compares this key with the given KKey object. |
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
protected void |
finalize()
Deletes the wrapped C++ instance |
boolean |
init(int keyQt)
Initializes the key with the given Qt key code. |
boolean |
init(int key,
int mod)
|
boolean |
init(KKey key)
Copies the given key. |
boolean |
init(org.kde.qt.QKeyEvent keyEvent)
Initializes the key by extracting the code from the given key event. |
boolean |
init(org.kde.qt.QKeySequence keySeq)
Initializes the key with the first key code of the given key sequence. |
boolean |
init(java.lang.String key)
Initializes the key with the given description. |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
boolean |
isNull()
Returns true if the key is null (after clear() or empty constructor). |
int |
keyCodeQt()
Returns the qt key code. |
static java.lang.String |
modFlagLabel(int f)
Returns a user-readable representation of the given modifiers. |
int |
modFlags()
|
static KKey |
nil()
Returns a null key. |
boolean |
op_equals(KKey key)
Compares the symbol and modifiers of both keys. |
boolean |
op_lt(KKey key)
Compares the symbol and modifiers of both keys. |
boolean |
op_not_equals(KKey key)
Compares the symbol and modifiers of both keys. |
void |
simplify()
|
int |
sym()
|
java.lang.String |
toString()
Returns a human-readable representation of the key in the form "modifier+key". |
java.lang.String |
toStringInternal()
Returns an untranslated text representation of the key in the form "modifier+key", suitable e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MOD_FLAG_COUNT
ModFlag
,
Constant Field Valuespublic static final int QtWIN
public static final int SHIFT
public static final int CTRL
public static final int ALT
public static final int WIN
Constructor Detail |
---|
protected KKey(java.lang.Class dummy)
public KKey()
clear()
,
isNull()
,
#null
public KKey(int keyQt)
keyQt
- the qt keycodeorg.kde.qt.Qt#Key
public KKey(org.kde.qt.QKeySequence keySeq)
keySeq
- the key sequence that contains the keypublic KKey(org.kde.qt.QKeyEvent keyEvent)
keyEvent
- the key event to get the key frompublic KKey(KKey key)
public KKey(java.lang.String key)
key
- the description of the keyKKeyServer#Sym#init
public KKey(int key, int mod)
Method Detail |
---|
public void clear()
isNull()
public boolean init(int keyQt)
keyQt
- the qt keycode
org.kde.qt.Qt#Key
public boolean init(org.kde.qt.QKeySequence keySeq)
keySeq
- the key sequence that contains the key
public boolean init(org.kde.qt.QKeyEvent keyEvent)
keyEvent
- the key event to get the key from
public boolean init(KKey key)
key
- the key to copy
public boolean init(java.lang.String key)
key
- the description of the key
KKeyServer#Sym#init
public boolean init(int key, int mod)
public boolean isNull()
clear()
,
#null
public int sym()
public int modFlags()
public int compare(KKey key)
key
- the key to compare with this key
public boolean op_equals(KKey key)
compare(org.kde.koala.KKey)
public boolean op_not_equals(KKey key)
compare(org.kde.koala.KKey)
public boolean op_lt(KKey key)
compare(org.kde.koala.KKey)
public int keyCodeQt()
org.kde.qt.Qt#Key
public java.lang.String toString()
toString
in class java.lang.Object
toStringInternal()
public java.lang.String toStringInternal()
public void simplify()
public static KKey nil()
isNull()
,
clear()
public static java.lang.String modFlagLabel(int f)
f
- the modifiers to convert
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |