class KFileTreeBranch

Branch object for KFileTreeView object. More...

Definition#include <kfiletreebranch.h>
InheritsKDirLister (kio) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Protected Methods


Detailed Description

This is the branch class of the KFileTreeView, which represents one branch in the treeview. Every branch has a root which is an url. The branch lists the files unter the root. Every branch uses its own dirlister and can have its own filter etc.

 KFileTreeBranch ( KFileTreeView*, const KURL& url, const QString& name, const QPixmap& pix, bool showHidden = false, KFileTreeViewItem *branchRoot = 0 )

KFileTreeBranch

constructs a branch for KFileTreeView. Does not yet start to list it.

Parameters:
urlstart url of the branch.
namethe name of the branch, which is displayed in the first column of the treeview.
pixis a pixmap to display as an icon of the branch.
showHiddenflag to make hidden files visible or not.
branchRootis the KFileTreeViewItem to use as the root of the branch, with the default 0 meaning to let KFileTreeBranch create it for you.

KURL  rootUrl ()

rootUrl

[const]

Returns: the root url of the branch.

void  setRoot ( KFileTreeViewItem *r )

setRoot

[virtual]

sets a KFileTreeViewItem as root widget for the branch. That must be created outside of the branch. All KFileTreeViewItems the branch is allocating will become children of that object.

Parameters:
theKFileTreeViewItem to become the root item.

KFileTreeViewItemroot ( )

root

Returns: the root item.

QString  name ()

name

[const]

Returns: the name of the branch.

void  setName ( const QString n )

setName

[virtual]

sets the name of the branch.

const QPixmap&  pixmap ()

pixmap

const QPixmap&  openPixmap ()

openPixmap

bool  showExtensions ( )

showExtensions

[const]

Returns: whether the items in the branch show their file extensions in the tree or not. See setShowExtensions for more information.

void  setOpen ( bool setopen = true )

setOpen

sets the root of the branch open or closed.

void  setChildRecurse ( bool t=true )

setChildRecurse

sets if children recursion is wanted or not. If this is switched off, the child directories of a just opened directory are not listed internally. That means that it can not be determined if the sub directories are expandable or not. If this is switched off there will be no call to setExpandable.

Parameters:
t: set to true to switch on child recursion

bool  childRecurse ()

childRecurse

Returns: if child recursion is on or off.

See also: setChildRecurse

bool  populate ( const KURL &url, KFileTreeViewItem* currItem )

populate

[virtual slot]

populates a branch. This method must be called after a branch was added to a KFileTreeView using method addBranch.

Parameters:
urlis the url of the root item where the branch starts.
currItemis the current parent.

void  setShowExtensions ( bool visible = true )

setShowExtensions

[virtual slot]

sets printing of the file extensions on or off. If you pass false to this slot, all items of this branch will not show their file extensions in the tree.

Parameters:
visibleflags if the extensions should be visible or not.

void  setOpenPixmap ( const QPixmap& pix )

setOpenPixmap

[slot]

KFileTreeViewItemcreateTreeViewItem ( KFileTreeViewItem *parent, KFileItem *fileItem )

createTreeViewItem

[protected virtual]

allocates a KFileTreeViewItem for the branch for new items.

KFileTreeViewItemfindTVIByURL ( const KURL& )

findTVIByURL

[protected virtual]

find the according KFileTreeViewItem by an url

void  populateFinished ( KFileTreeViewItem * )

populateFinished

[signal]

emitted with the item of a directory which was finished to populate

void  newTreeViewItems ( KFileTreeBranch*, const KFileTreeViewItemList& )

newTreeViewItems

[signal]

emitted with a list of new or updated KFileTreeViewItem which were found in a branch. Note that this signal is emitted very often and may slow down the performance of the treeview !

void  directoryChildCount ( KFileTreeViewItem* item, int count )

directoryChildCount

[signal]

emitted with the exact count of children for a directory.

void  virtual_hook ( int id, void* data )

virtual_hook

[protected virtual]

Reimplemented from KDirLister.


Generated by: dfaure on faure on Tue Apr 16 08:50:13 2002, using kdoc 2.0a53.