io.qt.gui.QInputMethodEvent Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Parameters for input method events
* Java wrapper for Qt class QInputMethodEvent
*/
public class QInputMethodEvent extends io.qt.core.QEvent
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QInputMethodEvent::AttributeType
*/
public enum AttributeType implements QtEnumerator {
/**
* Representing QInputMethodEvent:: TextFormat
*/
TextFormat(0),
/**
* Representing QInputMethodEvent:: Cursor
*/
Cursor(1),
/**
* Representing QInputMethodEvent:: Language
*/
Language(2),
/**
* Representing QInputMethodEvent:: Ruby
*/
Ruby(3),
/**
* Representing QInputMethodEvent:: Selection
*/
Selection(4);
static {
QtJambi_LibraryUtilities.initialize();
}
private AttributeType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull AttributeType resolve(int value) {
switch (value) {
case 0: return TextFormat;
case 1: return Cursor;
case 2: return Language;
case 3: return Ruby;
case 4: return Selection;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QInputMethodEvent::Attribute class stores an input method attribute
* Java wrapper for Qt class QInputMethodEvent::Attribute
*/
public static class Attribute extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QInputMethodEvent::Attribute:: Attribute(QInputMethodEvent::Attribute)
*/
public Attribute(io.qt.gui.QInputMethodEvent.@NonNull Attribute other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(Attribute instance, io.qt.gui.QInputMethodEvent.Attribute other);
/**
* See QInputMethodEvent::Attribute:: Attribute(QInputMethodEvent::AttributeType, int, int)
*/
public Attribute(io.qt.gui.QInputMethodEvent.@NonNull AttributeType typ, int s, int l){
super((QPrivateConstructor)null);
initialize_native(this, typ, s, l);
}
private native static void initialize_native(Attribute instance, io.qt.gui.QInputMethodEvent.AttributeType typ, int s, int l);
/**
* See QInputMethodEvent::Attribute:: Attribute(QInputMethodEvent::AttributeType, int, int, QVariant)
*/
public Attribute(io.qt.gui.QInputMethodEvent.@NonNull AttributeType typ, int s, int l, java.lang.Object val){
super((QPrivateConstructor)null);
initialize_native(this, typ, s, l, val);
}
private native static void initialize_native(Attribute instance, io.qt.gui.QInputMethodEvent.AttributeType typ, int s, int l, java.lang.Object val);
/**
* See QInputMethodEvent::Attribute:: length
*/
@QtUninvokable
public final void setLength(int length){
setLength_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), length);
}
@QtUninvokable
private native void setLength_native_int(long __this__nativeId, int length);
/**
* See QInputMethodEvent::Attribute:: length
*/
@QtUninvokable
public final int length(){
return length_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int length_native(long __this__nativeId);
/**
* See QInputMethodEvent::Attribute:: start
*/
@QtUninvokable
public final void setStart(int start){
setStart_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), start);
}
@QtUninvokable
private native void setStart_native_int(long __this__nativeId, int start);
/**
* See QInputMethodEvent::Attribute:: start
*/
@QtUninvokable
public final int start(){
return start_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int start_native(long __this__nativeId);
/**
* See QInputMethodEvent::Attribute:: type
*/
@QtUninvokable
public final void setType(io.qt.gui.QInputMethodEvent.@NonNull AttributeType type){
setType_native_cref_QInputMethodEvent_AttributeType(QtJambi_LibraryUtilities.internal.nativeId(this), type.value());
}
@QtUninvokable
private native void setType_native_cref_QInputMethodEvent_AttributeType(long __this__nativeId, int type);
/**
* See QInputMethodEvent::Attribute:: type
*/
@QtUninvokable
public final io.qt.gui.QInputMethodEvent.@NonNull AttributeType type(){
return io.qt.gui.QInputMethodEvent.AttributeType.resolve(type_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int type_native(long __this__nativeId);
/**
* See QInputMethodEvent::Attribute:: value
*/
@QtUninvokable
public final void setValue(java.lang.Object value){
setValue_native_cref_QVariant(QtJambi_LibraryUtilities.internal.nativeId(this), value);
}
@QtUninvokable
private native void setValue_native_cref_QVariant(long __this__nativeId, java.lang.Object value);
/**
* See QInputMethodEvent::Attribute:: value
*/
@QtUninvokable
public final java.lang.Object value(){
return value_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.Object value_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected Attribute(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QInputMethodEvent::Attribute:: Attribute(QInputMethodEvent::Attribute)
*/
@QtUninvokable
@Override
public Attribute clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native Attribute clone_native(long __this_nativeId);
/**
* @hidden
* Kotlin property getter. In Java use {@link #length()} instead.
*/
@QtUninvokable
public final int getLength() {
return length();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #start()} instead.
*/
@QtUninvokable
public final int getStart() {
return start();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #type()} instead.
*/
@QtUninvokable
public final io.qt.gui.QInputMethodEvent.@NonNull AttributeType getType() {
return type();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #value()} instead.
*/
@QtUninvokable
public final java.lang.Object getValue() {
return value();
}
}
/**
* See QInputMethodEvent:: QInputMethodEvent()
*/
public QInputMethodEvent(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QInputMethodEvent instance);
/**
* See QInputMethodEvent:: QInputMethodEvent(QInputMethodEvent)
*/
protected QInputMethodEvent(io.qt.gui.@StrictNonNull QInputMethodEvent arg__1){
super((QPrivateConstructor)null);
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
initialize_native(this, arg__1);
}
private native static void initialize_native(QInputMethodEvent instance, io.qt.gui.QInputMethodEvent arg__1);
/**
* See QInputMethodEvent:: QInputMethodEvent(QString, QList<QInputMethodEvent::Attribute>)
*/
public QInputMethodEvent(java.lang.@NonNull String preeditText, java.util.@NonNull Collection extends io.qt.gui.QInputMethodEvent.@NonNull Attribute> attributes){
super((QPrivateConstructor)null);
initialize_native(this, preeditText, attributes);
}
private native static void initialize_native(QInputMethodEvent instance, java.lang.String preeditText, java.util.Collection extends io.qt.gui.QInputMethodEvent.Attribute> attributes);
/**
* See QInputMethodEvent:: attributes()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList attributes(){
return attributes_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList attributes_native_constfct(long __this__nativeId);
/**
* See QInputMethodEvent:: commitString()const
*/
@QtUninvokable
public final java.lang.@NonNull String commitString(){
return commitString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String commitString_native_constfct(long __this__nativeId);
/**
* See QInputMethodEvent:: operator=(QInputMethodEvent)
*/
@QtUninvokable
protected final void assign(io.qt.gui.@StrictNonNull QInputMethodEvent other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
assign_native_cref_QInputMethodEvent(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QInputMethodEvent(long __this__nativeId, long other);
/**
* See QInputMethodEvent:: preeditString()const
*/
@QtUninvokable
public final java.lang.@NonNull String preeditString(){
return preeditString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String preeditString_native_constfct(long __this__nativeId);
/**
* See QInputMethodEvent:: replacementLength()const
*/
@QtUninvokable
public final int replacementLength(){
return replacementLength_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int replacementLength_native_constfct(long __this__nativeId);
/**
* See QInputMethodEvent:: replacementStart()const
*/
@QtUninvokable
public final int replacementStart(){
return replacementStart_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int replacementStart_native_constfct(long __this__nativeId);
/**
* See QInputMethodEvent:: setCommitString(QString, int, int)
*/
@QtUninvokable
public final void setCommitString(java.lang.@NonNull String commitString, int replaceFrom, int replaceLength){
setCommitString_native_cref_QString_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), commitString, replaceFrom, replaceLength);
}
@QtUninvokable
private native void setCommitString_native_cref_QString_int_int(long __this__nativeId, java.lang.String commitString, int replaceFrom, int replaceLength);
/**
*
*/
@QtUninvokable
@Override
public io.qt.gui.@Nullable QInputMethodEvent clone(){
return clone_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QInputMethodEvent clone_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QInputMethodEvent(QPrivateConstructor p) { super(p); }
/**
* @deprecated Use {@link #assign(io.qt.gui.QInputMethodEvent)} instead.
*/
@Deprecated
@QtUninvokable
protected final void set(io.qt.gui.@StrictNonNull QInputMethodEvent other) {
assign(other);
}
/**
* Overloaded function for {@link #setCommitString(java.lang.String, int, int)}
* with replaceLength = 0
.
*/
@QtUninvokable
public final void setCommitString(java.lang.@NonNull String commitString, int replaceFrom) {
setCommitString(commitString, replaceFrom, (int)0);
}
/**
* Overloaded function for {@link #setCommitString(java.lang.String, int, int)}
* with:
* replaceFrom = 0
* replaceLength = 0
*
*/
@QtUninvokable
public final void setCommitString(java.lang.@NonNull String commitString) {
setCommitString(commitString, (int)0, (int)0);
}
}