Logo Search packages:      
Sourcecode: kdbg version File versions

int KTreeView::itemRow ( KTreeViewItem item  ) 

Looks up the row index at which the specified item is found in the visible tree or -1 if the item is not visible or not in the tree.

Parameters:
specifies the item to search
Returns:
the row index of the item
See also:
itemAt

itemPath

Definition at line 940 of file ktreeview.cpp.

References KTreeViewItem::owner.

Referenced by changeItem(), collapseSubTree(), expandSubTree(), keyPressEvent(), and scrollVisible().

{
    if (item->owner == this) {
      // search in list of visible items
      for (int i = numRows()-1; i >= 0; i--) {
          if (visibleItems[i] == item) {
            return i;
          }
      }
    }
    // not found
    return -1;
}


Generated by  Doxygen 1.6.0   Back to index