
io.qt.gui.QKeyEvent Maven / Gradle / Ivy
package io.qt.gui;
/**
* Describes a key event
* Java wrapper for Qt class QKeyEvent
*/
public class QKeyEvent extends io.qt.gui.QInputEvent
{
/**
* Overloaded constructor for {@link #QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)}
* with count = 1
.
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, java.lang.String text, boolean autorep) {
this(type, key, modifiers, text, autorep, (short)1);
}
/**
* Overloaded constructor for {@link #QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)}
* with:
* autorep = false
* count = 1
*
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, java.lang.String text) {
this(type, key, modifiers, text, (boolean)false, (short)1);
}
/**
* Overloaded constructor for {@link #QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)}
* with:
* text = ""
* autorep = false
* count = 1
*
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers) {
this(type, key, modifiers, "", (boolean)false, (short)1);
}
/**
* See QKeyEvent::QKeyEvent(QEvent::Type,int,Qt::KeyboardModifiers,QString,bool,ushort)
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, java.lang.String text, boolean autorep, short count){
super((QPrivateConstructor)null);
initialize_native(this, type, key, modifiers, text, autorep, count);
}
private native static void initialize_native(QKeyEvent instance, io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, java.lang.String text, boolean autorep, short count);
/**
* Overloaded constructor for {@link #QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short)}
* with count = 1
.
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, java.lang.String text, boolean autorep) {
this(type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, (short)1);
}
/**
* Overloaded constructor for {@link #QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short)}
* with:
* autorep = false
* count = 1
*
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, java.lang.String text) {
this(type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, (boolean)false, (short)1);
}
/**
* Overloaded constructor for {@link #QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short)}
* with:
* text = ""
* autorep = false
* count = 1
*
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers) {
this(type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, "", (boolean)false, (short)1);
}
/**
*
*/
public QKeyEvent(io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, java.lang.String text, boolean autorep, short count){
super((QPrivateConstructor)null);
initialize_native(this, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
}
private native static void initialize_native(QKeyEvent instance, io.qt.core.QEvent.Type type, int key, io.qt.core.Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, java.lang.String text, boolean autorep, short count);
/**
*
*/
@io.qt.QtUninvokable
public final int count(){
return count_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int count_native_constfct(long __this__nativeId);
/**
* See QKeyEvent::isAutoRepeat()const
*/
@io.qt.QtUninvokable
public final boolean isAutoRepeat(){
return isAutoRepeat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isAutoRepeat_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final int key(){
return key_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int key_native_constfct(long __this__nativeId);
/**
* See QKeyEvent::matches(QKeySequence::StandardKey)const
*/
@io.qt.QtUninvokable
public final boolean matches(io.qt.gui.QKeySequence.StandardKey key){
return matches_native_QKeySequence_StandardKey_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), key.value());
}
@io.qt.QtUninvokable
private native boolean matches_native_QKeySequence_StandardKey_constfct(long __this__nativeId, int key);
/**
* See QInputEvent::modifiers()const
*/
@io.qt.QtUninvokable
public final io.qt.core.Qt.KeyboardModifiers modifiers(){
return new io.qt.core.Qt.KeyboardModifiers(modifiers_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int modifiers_native_constfct(long __this__nativeId);
/**
* See QKeyEvent::nativeModifiers()const
*/
@io.qt.QtUninvokable
public final int nativeModifiers(){
return nativeModifiers_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int nativeModifiers_native_constfct(long __this__nativeId);
/**
* See QKeyEvent::nativeScanCode()const
*/
@io.qt.QtUninvokable
public final int nativeScanCode(){
return nativeScanCode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int nativeScanCode_native_constfct(long __this__nativeId);
/**
* See QKeyEvent::nativeVirtualKey()const
*/
@io.qt.QtUninvokable
public final int nativeVirtualKey(){
return nativeVirtualKey_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int nativeVirtualKey_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final java.lang.String text(){
return text_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String text_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
protected final void setAutoRepeat(short autoRepeat){
setAutoRepeat_native_unsigned_short(QtJambi_LibraryUtilities.internal.nativeId(this), autoRepeat);
}
@io.qt.QtUninvokable
private native void setAutoRepeat_native_unsigned_short(long __this__nativeId, short autoRepeat);
@io.qt.QtUninvokable
protected final void setCount(short count){
setCount_native_unsigned_short(QtJambi_LibraryUtilities.internal.nativeId(this), count);
}
@io.qt.QtUninvokable
private native void setCount_native_unsigned_short(long __this__nativeId, short count);
@io.qt.QtUninvokable
protected final void setKey(int key){
setKey_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), key);
}
@io.qt.QtUninvokable
private native void setKey_native_int(long __this__nativeId, int key);
@io.qt.QtUninvokable
protected final void setNativeModifiers(int nativeModifiers){
setNativeModifiers_native_unsigned_int(QtJambi_LibraryUtilities.internal.nativeId(this), nativeModifiers);
}
@io.qt.QtUninvokable
private native void setNativeModifiers_native_unsigned_int(long __this__nativeId, int nativeModifiers);
@io.qt.QtUninvokable
protected final void setNativeScanCode(int nativeScanCode){
setNativeScanCode_native_unsigned_int(QtJambi_LibraryUtilities.internal.nativeId(this), nativeScanCode);
}
@io.qt.QtUninvokable
private native void setNativeScanCode_native_unsigned_int(long __this__nativeId, int nativeScanCode);
@io.qt.QtUninvokable
protected final void setNativeVirtualKey(int nativeVirtualKey){
setNativeVirtualKey_native_unsigned_int(QtJambi_LibraryUtilities.internal.nativeId(this), nativeVirtualKey);
}
@io.qt.QtUninvokable
private native void setNativeVirtualKey_native_unsigned_int(long __this__nativeId, int nativeVirtualKey);
@io.qt.QtUninvokable
protected final void setText(java.lang.String text){
setText_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text);
}
@io.qt.QtUninvokable
private native void setText_native_cref_QString(long __this__nativeId, java.lang.String text);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QKeyEvent(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private static native String toString_native(long __this_nativeId);
}