java.lang.Object
io.qt.core.QModelIndex
- All Implemented Interfaces:
Cloneable
,Comparable<QModelIndex>
public final class QModelIndex extends Object implements Comparable<QModelIndex>, Cloneable
Java wrapper for Qt class QModelIndex
-
Method Summary
Modifier and Type Method Description QModelIndex
child(int arow, int acolumn)
Queries the model for a child index of this index.QModelIndex
clone()
int
column()
int
compareTo(QModelIndex other)
Object
data()
Queries the model for the default data for this index.Object
data(int role)
Queries the model for data for this index.boolean
equals(Object other)
Compares this model index to anotherQt.ItemFlags
flags()
int
hashCode()
long
internalId()
QAbstractItemModel
model()
QModelIndex
parent()
Queries the model for the parent of this item.int
row()
QModelIndex
sibling(int arow, int acolumn)
Queries the model for a sibling of this model index.QModelIndex
siblingAtColumn(int column)
QModelIndex
siblingAtRow(int row)
String
toString()
-
Method Details
-
row
-
column
-
internalId
-
parent
Queries the model for the parent of this item. This is equivalent to callingitem.model().parent(item);
- Returns:
- The parent index for this model index.
-
sibling
Queries the model for a sibling of this model index.- Parameters:
arow
- The row for the sibling.acolumn
- The column for the sibling.- Returns:
- The sibling of this item at the given position.
-
child
Queries the model for a child index of this index.- Parameters:
arow
- the row of the child.acolumn
- the column of the child.- Returns:
- The child at the given position.
-
data
Queries the model for the default data for this index. The default data is specified inQt.ItemDataRole.DisplayRole
.- Returns:
- The data for this index
-
data
Queries the model for data for this index.- Parameters:
role
- The data role to query for. The different data roles are available inio.qt.core.Qt.ItemDataRole
- Returns:
- The data for this index.
-
flags
-
model
- Returns:
- The model for this index.
-
equals
Compares this model index to another -
hashCode
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<QModelIndex>
-
clone
-
siblingAtColumn
-
siblingAtRow
-