|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QPersistentModelIndex
public class QPersistentModelIndex
The QPersistentModelIndex class is used to locate data in a data model. A QPersistentModelIndex is a model index that can be stored by an application, and later used to access information in a model. Unlike the QModelIndex class, it is safe to store a QPersistentModelIndex since the model will ensure that references to items will continue to be valid as long as they can be accessed by the model.
It is good practice to check that persistent model indexes are valid before using them.
QAbstractItemModel
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QPersistentModelIndex(com.trolltech.qt.core.QModelIndex index)
Creates a new QPersistentModelIndex that is a copy of the model index. |
|
QPersistentModelIndex(QPersistentModelIndex other)
Creates a new QPersistentModelIndex that is a copy of the other persistent model index. |
Method Summary | |
---|---|
com.trolltech.qt.core.QModelIndex |
child(int row,
int column)
Returns the child of the model index that is stored in the given row and column. |
QPersistentModelIndex |
clone()
This method is reimplemented for internal reasons |
int |
column()
Returns the column this persistent model index refers to. |
int |
compareTo(java.lang.Object other)
Compares this object with the specified object for order. |
java.lang.Object |
data()
Returns the data for the given role for the item referred to by the index. |
java.lang.Object |
data(int role)
Returns the data for the given role for the item referred to by the index. |
Qt.ItemFlags |
flags()
Returns the flags for the item referred to by the index. |
boolean |
isValid()
Returns true if this persistent model index is valid; otherwise returns false. |
QAbstractItemModel |
model()
Returns the model that the index belongs to. |
com.trolltech.qt.core.QModelIndex |
parent()
Returns the parent QModelIndex for this persistent index, or QModelIndex() if it has no parent. |
int |
row()
Returns the row this persistent model index refers to. |
com.trolltech.qt.core.QModelIndex |
sibling(int row,
int column)
Returns the sibling at row and column or an invalid QModelIndex if there is no sibling at this position. |
java.lang.String |
toString()
|
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QPersistentModelIndex(com.trolltech.qt.core.QModelIndex index)
public QPersistentModelIndex(QPersistentModelIndex other)
Method Detail |
---|
public final com.trolltech.qt.core.QModelIndex child(int row, int column)
parent()
, and sibling()
.
public final int column()
public final java.lang.Object data()
Qt::ItemDataRole
, and QAbstractItemModel::setData()
.
public final java.lang.Object data(int role)
Qt::ItemDataRole
, and QAbstractItemModel::setData()
.
public final Qt.ItemFlags flags()
public final boolean isValid()
model()
, row()
, and column()
.
public final QAbstractItemModel model()
public final com.trolltech.qt.core.QModelIndex parent()
child()
, sibling()
, and model()
.
public final int row()
public final com.trolltech.qt.core.QModelIndex sibling(int row, int column)
parent()
, and child()
.
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
public QPersistentModelIndex clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |