io.qt.core.QModelIndex Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Used to locate data in a data model
* Java wrapper for Qt class QModelIndex
*/
public class QModelIndex extends QtObject
implements java.lang.Comparable,
java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QModelIndex:: QModelIndex()
*/
public QModelIndex(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QModelIndex instance);
/**
* See QModelIndex:: QModelIndex(QModelIndex)
*/
public QModelIndex(io.qt.core.@NonNull QModelIndex other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QModelIndex instance, io.qt.core.QModelIndex other);
/**
* See QModelIndex:: column()const
*/
@QtUninvokable
public final int column(){
return column_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int column_native_constfct(long __this__nativeId);
/**
* See QModelIndex:: data(int)const
*/
@QtUninvokable
public final java.lang.Object data(int role){
return data_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), role);
}
@QtUninvokable
private native java.lang.Object data_native_int_constfct(long __this__nativeId, int role);
/**
*
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull ItemFlags flags(){
return new io.qt.core.Qt.ItemFlags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int flags_native_constfct(long __this__nativeId);
/**
* See QModelIndex:: internalId()const
*/
@QtUninvokable
public final long internalId(){
return internalId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long internalId_native_constfct(long __this__nativeId);
/**
* See QModelIndex:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@Nullable QAbstractItemModel model(){
return model_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QAbstractItemModel model_native_constfct(long __this__nativeId);
/**
* See QModelIndex:: multiData(QModelRoleDataSpan)const
*/
@QtUninvokable
public final void multiData(java.util.@NonNull Map roleDataSpan){
multiData_native_QModelRoleDataSpan_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), roleDataSpan);
}
@QtUninvokable
private native void multiData_native_QModelRoleDataSpan_constfct(long __this__nativeId, java.util.Map roleDataSpan);
/**
* See QModelIndex:: operator<(QModelIndex)const
*/
@QtUninvokable
private final boolean operator_less(io.qt.core.@NonNull QModelIndex other){
return operator_less_native_cref_QModelIndex_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native boolean operator_less_native_cref_QModelIndex_constfct(long __this__nativeId, long other);
/**
* See QModelIndex:: operator==(QModelIndex)const
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QModelIndex other){
return equals_native_cref_QModelIndex_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native boolean equals_native_cref_QModelIndex_constfct(long __this__nativeId, long other);
/**
* See QModelIndex:: parent()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QModelIndex parent(){
return parent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QModelIndex parent_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int row(){
return row_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int row_native_constfct(long __this__nativeId);
/**
* See QModelIndex:: sibling(int, int)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QModelIndex sibling(int row, int column){
return sibling_native_int_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), row, column);
}
@QtUninvokable
private native io.qt.core.QModelIndex sibling_native_int_int_constfct(long __this__nativeId, int row, int column);
/**
* See QModelIndex:: siblingAtColumn(int)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QModelIndex siblingAtColumn(int column){
return siblingAtColumn_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), column);
}
@QtUninvokable
private native io.qt.core.QModelIndex siblingAtColumn_native_int_constfct(long __this__nativeId, int column);
/**
* See QModelIndex:: siblingAtRow(int)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QModelIndex siblingAtRow(int row){
return siblingAtRow_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), row);
}
@QtUninvokable
private native io.qt.core.QModelIndex siblingAtRow_native_int_constfct(long __this__nativeId, int row);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QModelIndex(QPrivateConstructor p) { super(p); }
/**
* See QModelIndex:: operator==(QModelIndex)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.core.QModelIndex) {
return equals((io.qt.core.QModelIndex) other);
}
return false;
}
/**
* See QModelIndex:: operator<(QModelIndex)const
*/
/**
* {@inheritDoc}
*/
@QtUninvokable
public int compareTo(io.qt.core.@StrictNonNull QModelIndex other) {
if (equals(other)) return 0;
else if (operator_less(other)) return -1;
else return 1;
}
/**
* Returns the objects's hash code computed by qHash(QModelIndex)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* See operator<<(QDebug, QModelIndex)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QModelIndex:: QModelIndex(QModelIndex)
*/
@QtUninvokable
@Override
public QModelIndex clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QModelIndex clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #data(int)}
* with role = 0
.
*/
@QtUninvokable
public final java.lang.Object data() {
return data((int)0);
}
}