io.qt.core.QPersistentModelIndex 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 QPersistentModelIndex
*/
public class QPersistentModelIndex extends QtObject
implements java.lang.Comparable,
java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QPersistentModelIndex:: QPersistentModelIndex()
*/
public QPersistentModelIndex(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QPersistentModelIndex instance);
/**
* See QPersistentModelIndex:: QPersistentModelIndex(QModelIndex)
*/
public QPersistentModelIndex(io.qt.core.@NonNull QModelIndex index){
super((QPrivateConstructor)null);
initialize_native(this, index);
}
private native static void initialize_native(QPersistentModelIndex instance, io.qt.core.QModelIndex index);
/**
* See QPersistentModelIndex:: QPersistentModelIndex(QPersistentModelIndex)
*/
public QPersistentModelIndex(io.qt.core.@NonNull QPersistentModelIndex other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QPersistentModelIndex instance, io.qt.core.QPersistentModelIndex other);
/**
* See QPersistentModelIndex:: 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 QPersistentModelIndex:: 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);
/**
* See QPersistentModelIndex:: flags()const
*/
@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 QPersistentModelIndex:: 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 QPersistentModelIndex:: 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);
/**
* See QPersistentModelIndex:: model()const
*/
@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 QPersistentModelIndex:: 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 QPersistentModelIndex:: operator QModelIndex()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QModelIndex toIndex(){
return toIndex_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QModelIndex toIndex_native_constfct(long __this__nativeId);
/**
* See QPersistentModelIndex:: operator<(QPersistentModelIndex)const
*/
@QtUninvokable
private final boolean operator_less(io.qt.core.@NonNull QPersistentModelIndex other){
return operator_less_native_cref_QPersistentModelIndex_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native boolean operator_less_native_cref_QPersistentModelIndex_constfct(long __this__nativeId, long other);
/**
* See QPersistentModelIndex:: operator=(QModelIndex)
*/
@QtUninvokable
public final void assign(io.qt.core.@NonNull QModelIndex other){
assign_native_cref_QModelIndex(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QModelIndex(long __this__nativeId, long other);
/**
* See QPersistentModelIndex:: operator=(QPersistentModelIndex)
*/
@QtUninvokable
public final void assign(io.qt.core.@NonNull QPersistentModelIndex other){
assign_native_cref_QPersistentModelIndex(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QPersistentModelIndex(long __this__nativeId, long other);
/**
* See QPersistentModelIndex:: 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 QPersistentModelIndex:: operator==(QPersistentModelIndex)const
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QPersistentModelIndex other){
return equals_native_cref_QPersistentModelIndex_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native boolean equals_native_cref_QPersistentModelIndex_constfct(long __this__nativeId, long other);
/**
* See QPersistentModelIndex:: 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);
/**
* See QPersistentModelIndex:: row()const
*/
@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 QPersistentModelIndex:: 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 QPersistentModelIndex:: swap(QPersistentModelIndex&)
*/
@QtUninvokable
public final void swap(io.qt.core.@StrictNonNull QPersistentModelIndex other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QPersistentModelIndex(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QPersistentModelIndex(long __this__nativeId, long other);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QPersistentModelIndex(QPrivateConstructor p) { super(p); }
/**
* Checks for equality depending on the type of given object.
* {@link io.qt.core.QPersistentModelIndex}
ckecked by to QPersistentModelIndex:: operator==(QPersistentModelIndex)const
* {@link io.qt.core.QModelIndex}
ckecked by to QPersistentModelIndex:: operator==(QModelIndex)const
*
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.core.QPersistentModelIndex) {
return equals((io.qt.core.QPersistentModelIndex) other);
}
else if (other instanceof io.qt.core.QModelIndex) {
return equals((io.qt.core.QModelIndex) other);
}
return false;
}
/**
* See QPersistentModelIndex:: operator<(QPersistentModelIndex)const
*/
/**
* {@inheritDoc}
*/
@QtUninvokable
public int compareTo(io.qt.core.@StrictNonNull QPersistentModelIndex 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(QPersistentModelIndex)
.
*/
@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, QPersistentModelIndex)
*/
@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 QPersistentModelIndex:: QPersistentModelIndex(QPersistentModelIndex)
*/
@QtUninvokable
@Override
public QPersistentModelIndex clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QPersistentModelIndex 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);
}
/**
* Overloaded function for {@link #operator_less(io.qt.core.QPersistentModelIndex)}.
*/
@QtUninvokable
private final boolean operator_less(io.qt.core.@NonNull QModelIndex other) {
return operator_less(new io.qt.core.QPersistentModelIndex(other));
}
}