Logo Search packages:      
Sourcecode: kdbg version File versions

void KTreeView::setCurrentItem ( int  row  ) 

Makes the item at specifies row the current item and highlights it. The signal highlighted is emitted if the current item changes.

row specifies the row to make the current item

Definition at line 1071 of file ktreeview.cpp.

References highlighted().

Referenced by clear(), collapseSubTree(), expandSubTree(), keyPressEvent(), and mousePressEvent().

    if (row == current)
    int numVisible = numRows();
    if (row > numVisible)
    int oldCurrent = current;
    current = row;
    if (oldCurrent < numVisible)
      updateCell(oldCurrent, 0);
    if (current > -1) {
      updateCell(current, 0, false);
      emit highlighted(current);

Generated by  Doxygen 1.6.0   Back to index