Logo Search packages:      
Sourcecode: kdbg version File versions

bool KTreeView::insertItem ( KTreeViewItem newItem,
int  row = -1,
bool  prefix = true 
)

This overloaded function inserts a new item into the tree, but the new item is specified directly. The reference item is specified as a row index.

Parameters:
newItem specifies the item to insert
path specifies the insert position
prefix if true, the new item is inserted before the reference item, otherwise after it
Returns:
true if the item has been successfully inserted in the tree, otherwise false.
See also:
insertItem

Definition at line 872 of file ktreeview.cpp.

References insertItem(), and itemAt().

{
    // find the item currently at the index, if there is one
    KTreeViewItem* refItem = itemAt(index);

    // insert new item at the appropriate place
    return insertItem(refItem, newItem, prefix);
}


Generated by  Doxygen 1.6.0   Back to index