Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.core
Class QModelIndex

    java.lang.Object
      com.trolltech.qt.core.QModelIndex

    public class QModelIndex

extends java.lang.Object

Method Summary
`QModelIndex` | `child(int arow, int acolumn)` Queries the model for a child index of this index.
`int` | `column()` Returns the column this model index refers to.
`java.lang.Object` | `data()` Queries the model for the default data for this index.
`java.lang.Object` | `data(int role)` Queries the model for data for this index.
`boolean` | `equals(java.lang.Object other)` Compares this model index to another
`int` | `hashCode()`
`long` | `internalId()` Returns an int used by the model to associate the index with the internal data structure.
`QAbstractItemModel` | `model()`
`QModelIndex` | `parent()` Queries the model for the parent of this item.
`int` | `row()` Returns the row this model index refers to.
`QModelIndex` | `sibling(int arow, int acolumn)` Queries the model for a sibling of this model index.
`java.lang.String` | `toString()` Returns a string representation of this QModelIndex.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### row

    public int row()

  Returns the row this model index refers to.

### column

    public int column()

  Returns the column this model index refers to.

### internalId

    public long internalId()

  Returns an int used by the model to associate the index with the internal data structure.

### parent

    public QModelIndex parent()

  Queries the model for the parent of this item. This is equivalent to calling

       item.model().parent(item);

  Returns:
    The parent index for this model index.

### sibling

    public QModelIndex sibling(int arow,
                               int acolumn)

  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

    public QModelIndex child(int arow,
                             int acolumn)

  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

    public java.lang.Object data()

  Queries the model for the default data for this index. The default data is specified in `Qt.ItemDataRole.DisplayRole`.

  Returns:
    The data for this index

### data

    public java.lang.Object data(int role)

  Queries the model for data for this index.

  Parameters:
    `role` - The data role to query for. The different data roles are available in `com.trolltech.qt.core.Qt.ItemDataRole`
  Returns:
    The data for this index.

### model

    public QAbstractItemModel model()

  Returns:
    The model for this index.

### equals

    public boolean equals(java.lang.Object other)

  Compares this model index to another

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `other` - The object to compare to
  Returns:
    True if the objects are equal; otherwise returns false.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Returns a string representation of this QModelIndex.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD