Class QtModelIndex
java.lang.Object
org.qtproject.qt.android.QtModelIndex
Represents an index in a custom item model, similar to
QModelindex
in C++.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
column()
Returns the column of this index.data
(int role) Retrieves data for this index based on the specified role.long
Returns the internal ID associated with this index.boolean
isValid()
Checks if this index is valid.parent()
Returns the parent index of this index.int
row()
Returns the row of this index.
-
Constructor Details
-
QtModelIndex
public QtModelIndex()Constructs a new QtModelIndex.
-
-
Method Details
-
column
public int column()Returns the column of this index.- Returns:
- The column.
-
data
Retrieves data for this index based on the specified role.- Parameters:
role
- The role for which data is requested.- Returns:
- The data object.
-
internalId
public long internalId()Returns the internal ID associated with this index.- Returns:
- The internal ID.
-
isValid
public boolean isValid()Checks if this index is valid.- Returns:
- True if the index is valid, false otherwise.
-
parent
-
row
public int row()Returns the row of this index.- Returns:
- The row.
-