.TH "KFileTreeBranch" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFileTreeBranch \- This is the branch class of the \fBKFileTreeView\fP, which represents one branch in the treeview. Branch object for \fBKFileTreeView\fP object.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kfiletreebranch.h>\fP
.PP
Inherits \fBKDirLister\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "virtual bool \fBpopulate\fP (const  \fBKURL\fP &url, \fBKFileTreeViewItem\fP *currItem)"
.br
.RI "\fIpopulates a branch. \fP"
.ti -1c
.RI "virtual void \fBsetShowExtensions\fP (bool visible=true)"
.br
.RI "\fIsets printing of the file extensions on or off. \fP"
.ti -1c
.RI "void \fBsetOpenPixmap\fP (const  \fBQPixmap\fP &pix)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBpopulateFinished\fP (\fBKFileTreeViewItem\fP *)"
.br
.RI "\fIemitted with the item of a directory which was finished to populate \fP"
.ti -1c
.RI "void \fBnewTreeViewItems\fP (\fBKFileTreeBranch\fP *, const  \fBKFileTreeViewItemList\fP &)"
.br
.RI "\fIemitted with a list of new or updated \fBKFileTreeViewItem\fP which were found in a branch. \fP"
.ti -1c
.RI "void \fBdirectoryChildCount\fP (\fBKFileTreeViewItem\fP *item, int count)"
.br
.RI "\fIemitted with the exact count of children for a directory. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKFileTreeBranch\fP (\fBKFileTreeView\fP *, const  \fBKURL\fP &url, const  \fBQString\fP &name, const  \fBQPixmap\fP &pix, bool showHidden=false, \fBKFileTreeViewItem\fP *branchRoot=0)"
.br
.RI "\fIconstructs a branch for \fBKFileTreeView\fP. \fP"
.ti -1c
.RI "\fBKURL\fP \fBrootUrl\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetRoot\fP (\fBKFileTreeViewItem\fP *r)"
.br
.RI "\fIsets a \fBKFileTreeViewItem\fP as root widget for the branch. \fP"
.ti -1c
.RI "\fBKFileTreeViewItem\fP * \fBroot\fP ()"
.br
.ti -1c
.RI "\fBQString\fP \fBname\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetName\fP (const  \fBQString\fP n)"
.br
.RI "\fIsets the name of the branch. \fP"
.ti -1c
.RI "const  \fBQPixmap\fP & \fBpixmap\fP ()"
.br
.ti -1c
.RI "const  \fBQPixmap\fP & \fBopenPixmap\fP ()"
.br
.ti -1c
.RI "bool \fBshowExtensions\fP () const "
.br
.ti -1c
.RI "void \fBsetOpen\fP (bool setopen=true)"
.br
.RI "\fIsets the root of the branch open or closed. \fP"
.ti -1c
.RI "void \fBsetChildRecurse\fP (bool t=true)"
.br
.RI "\fIsets if children recursion is wanted or not. \fP"
.ti -1c
.RI "bool \fBchildRecurse\fP ()"
.br
.ti -1c
.RI "virtual \fBKFileTreeViewItem\fP * \fBfindTVIByURL\fP (const  \fBKURL\fP &)"
.br
.RI "\fIfind the according \fBKFileTreeViewItem\fP by an url \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual \fBKFileTreeViewItem\fP * \fBcreateTreeViewItem\fP (\fBKFileTreeViewItem\fP *\fBparent\fP, \fBKFileItem\fP *fileItem)"
.br
.RI "\fIallocates a \fBKFileTreeViewItem\fP for the branch for new items. \fP"
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is the branch class of the \fBKFileTreeView\fP, which represents one branch in the treeview. Branch object for \fBKFileTreeView\fP object. 

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.
.PP
Definition at line 49 of file kfiletreebranch.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KFileTreeBranch::KFileTreeBranch (\fBKFileTreeView\fP *, const \fBKURL\fP & url, const \fBQString\fP & name, const \fBQPixmap\fP & pix, bool showHidden = false, \fBKFileTreeViewItem\fP * branchRoot = 0)"
.PP
constructs a branch for \fBKFileTreeView\fP. Does not yet start to list it. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP start url of the branch. 
.br
\fIname\fP the name of the branch, which is displayed in the first column of the treeview. 
.br
\fIpix\fP is a pixmap to display as an icon of the branch. 
.br
\fIshowHidden\fP flag to make hidden files visible or not. 
.br
\fIbranchRoot\fP is the \fBKFileTreeViewItem\fP to use as the root of the branch, with the default 0 meaning to let KFileTreeBranch create it for you. 
.RE
.PP
Definition at line 35 of file kfiletreebranch.cpp.
.PP
References QValueList< KURL >::append(), KDirLister::canceled(), KDirLister::clear(), KDirLister::completed(), QObject::connect(), KDirLister::deleteItem(), KStdAccel::name(), KDirLister::newItems(), KURL::prettyURL(), KDirLister::redirection(), QListViewItem::setExpandable(), QListViewItem::setPixmap(), KDirLister::setShowingDotFiles(), QListViewItem::setText(), and KDirLister::started().
.SH "Member Function Documentation"
.PP 
.SS "\fBKURL\fP KFileTreeBranch::rootUrl () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the root url of the branch. 
.RE
.PP
Definition at line 70 of file kfiletreebranch.h.
.PP
Referenced by KFileTreeView::findItem().
.SS "virtual void KFileTreeBranch::setRoot (\fBKFileTreeViewItem\fP * r)\fC [inline, virtual]\fP"
.PP
sets a \fBKFileTreeViewItem\fP 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. 
.PP
\fBParameters:\fP
.RS 4
\fIthe\fP \fBKFileTreeViewItem\fP to become the root item. 
.RE
.PP
Definition at line 78 of file kfiletreebranch.h.
.SS "\fBKFileTreeViewItem\fP* KFileTreeBranch::root ()\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the root item. 
.RE
.PP
Definition at line 83 of file kfiletreebranch.h.
.PP
Referenced by KFileTreeView::findItem(), KFileTreeView::removeBranch(), and setOpen().
.SS "\fBQString\fP KFileTreeBranch::name () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the name of the branch. 
.RE
.PP
Reimplemented from \fBQObject\fP.
.PP
Definition at line 88 of file kfiletreebranch.h.
.PP
Referenced by KFileTreeView::branch().
.SS "virtual void KFileTreeBranch::setName (const \fBQString\fP n)\fC [inline, virtual]\fP"
.PP
sets the name of the branch. Definition at line 93 of file kfiletreebranch.h.
.SS "bool KFileTreeBranch::showExtensions () const"
.PP
\fBReturns:\fP
.RS 4
whether the items in the branch show their file extensions in the tree or not. See \fBsetShowExtensions\fP for more information. 
.RE
.PP
Definition at line 241 of file kfiletreebranch.cpp.
.SS "void KFileTreeBranch::setOpen (bool setopen = true)\fC [inline]\fP"
.PP
sets the root of the branch open or closed. Definition at line 121 of file kfiletreebranch.h.
.PP
References root(), and QListViewItem::setOpen().
.SS "void KFileTreeBranch::setChildRecurse (bool t = true)"
.PP
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 \fBsetExpandable\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIt\fP set to true to switch on child recursion 
.RE
.PP
Definition at line 228 of file kfiletreebranch.cpp.
.PP
References QValueList< KURL >::clear().
.SS "bool KFileTreeBranch::childRecurse ()\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
if child recursion is on or off. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetChildRecurse\fP 
.RE
.PP
Definition at line 138 of file kfiletreebranch.h.
.SS "bool KFileTreeBranch::populate (const \fBKURL\fP & url, \fBKFileTreeViewItem\fP * currItem)\fC [virtual, slot]\fP"
.PP
populates a branch. This method must be called after a branch was added to a \fBKFileTreeView\fP using method \fBaddBranch\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP is the url of the root item where the branch starts. 
.br
\fIcurrItem\fP is the current parent. 
.RE
.PP
Definition at line 466 of file kfiletreebranch.cpp.
.PP
References KFileTreeViewItem::alreadyListed(), QValueList< KURL >::append(), KDirLister::openURL(), and KURL::prettyURL().
.SS "void KFileTreeBranch::setShowExtensions (bool visible = true)\fC [virtual, slot]\fP"
.PP
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. 
.PP
\fBParameters:\fP
.RS 4
\fIvisible\fP flags if the extensions should be visible or not. 
.RE
.PP
Definition at line 236 of file kfiletreebranch.cpp.
.SS "\fBKFileTreeViewItem\fP * KFileTreeBranch::createTreeViewItem (\fBKFileTreeViewItem\fP * parent, \fBKFileItem\fP * fileItem)\fC [protected, virtual]\fP"
.PP
allocates a \fBKFileTreeViewItem\fP for the branch for new items. Definition at line 211 of file kfiletreebranch.cpp.
.SS "\fBKFileTreeViewItem\fP * KFileTreeBranch::findTVIByURL (const \fBKURL\fP &)\fC [virtual]\fP"
.PP
find the according \fBKFileTreeViewItem\fP by an url Definition at line 339 of file kfiletreebranch.cpp.
.PP
References KURL::equals(), KFileItem::extraData(), KDirLister::findByURL(), and KURL::url().
.SS "void KFileTreeBranch::populateFinished (\fBKFileTreeViewItem\fP *)\fC [signal]\fP"
.PP
emitted with the item of a directory which was finished to populate 
.SS "void KFileTreeBranch::newTreeViewItems (\fBKFileTreeBranch\fP *, const \fBKFileTreeViewItemList\fP &)\fC [signal]\fP"
.PP
emitted with a list of new or updated \fBKFileTreeViewItem\fP which were found in a branch. Note that this signal is emitted very often and may slow down the performance of the treeview ! 
.SS "void KFileTreeBranch::directoryChildCount (\fBKFileTreeViewItem\fP * item, int count)\fC [signal]\fP"
.PP
emitted with the exact count of children for a directory. 

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
