class KFileTreeBranch

# class KFileTreeBranch | Branch object for KFileTreeView object. More...
Definition | `#include <kfiletreebranch.h>`
Inherits | KDirLister (kio) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KFileTreeBranch ( KFileTreeView*, const KURL& url, const QString& name, const QPixmap& pix, bool showHidden = false, KFileTreeViewItem *branchRoot = 0 )
- KURL rootUrl () const
- virtual void setRoot ( KFileTreeViewItem *r )
- KFileTreeViewItem * root ( )
- QString name () const
- virtual void setName ( const QString n )
- const QPixmap& pixmap ()
- const QPixmap& openPixmap ()
- bool showExtensions ( ) const
- void setOpen ( bool setopen = true )
- void setChildRecurse ( bool t=true )
- bool childRecurse ()
- virtual KFileTreeViewItem * findTVIByURL ( const KURL& )

#### Public Slots

- virtual bool populate ( const KURL &url, KFileTreeViewItem* currItem )
- virtual void setShowExtensions ( bool visible = true )
- void setOpenPixmap ( const QPixmap& pix )

#### Signals

- void populateFinished ( KFileTreeViewItem * )
- void newTreeViewItems ( KFileTreeBranch*, const KFileTreeViewItemList& )
- void directoryChildCount ( KFileTreeViewItem* item, int count )

#### Protected Methods

- virtual KFileTreeViewItem * createTreeViewItem ( KFileTreeViewItem *parent, KFileItem *fileItem )
- virtual void virtual_hook ( int id, void* data )

## 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:

url | start url of the branch.
name | the name of the branch, which is displayed in the first column of the treeview.
pix | is a pixmap to display as an icon of the branch.
showHidden | flag to make hidden files visible or not.
branchRoot | is 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:

the | KFileTreeViewItem to become the root item.

KFileTreeViewItem * root ( ) | ### 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:

url | is the url of the root item where the branch starts.
currItem | is 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:

visible | flags if the extensions should be visible or not.

void setOpenPixmap ( const QPixmap& pix ) | ### setOpenPixmap

[slot]

KFileTreeViewItem * createTreeViewItem ( KFileTreeViewItem *parent, KFileItem *fileItem ) | ### createTreeViewItem

[protected virtual]

allocates a KFileTreeViewItem for the branch for new items.

KFileTreeViewItem * findTVIByURL ( const KURL& ) | ### findTVIByURL

[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: root on macppc.ports.openbsd.org on Sat Sep 6 10:37:17 2003, using kdoc 2.0a54.