Logo Search packages:      
Sourcecode: kdbg version File versions

bool KTreeView::insertItem ( KTreeViewItem newItem,
const KPath &  thePath,
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 by a path.

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 885 of file ktreeview.cpp.

References insertItem(), and itemAt().

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

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


Generated by  Doxygen 1.6.0   Back to index