.TH "KFileTreeView" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFileTreeView \- The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files and/or directories in the file system.  

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

.in +1c
.ti -1c
.RI "virtual void \fBsetShowFolderOpenPixmap\fP (bool showIt=true)"
.br
.RI "\fIset the flag to show 'extended' folder icons on or off. \fP"
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBonItem\fP (const  \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBQWidget\fP *, \fBQDropEvent\fP *)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBQWidget\fP *, \fBQDropEvent\fP *, \fBKURL::List\fP &)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBKURL::List\fP &, \fBKURL\fP &)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBQDropEvent\fP *, \fBQListViewItem\fP *)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBKFileTreeView\fP *, \fBQDropEvent\fP *, \fBQListViewItem\fP *)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBQDropEvent\fP *, \fBQListViewItem\fP *, \fBQListViewItem\fP *)"
.br
.ti -1c
.RI "void \fBdropped\fP (\fBKFileTreeView\fP *, \fBQDropEvent\fP *, \fBQListViewItem\fP *, \fBQListViewItem\fP *)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKFileTreeView\fP (\fBQWidget\fP *parent, const  char *name=0)"
.br
.ti -1c
.RI "\fBKFileTreeViewItem\fP * \fBcurrentKFileTreeViewItem\fP () const "
.br
.ti -1c
.RI "\fBKURL\fP \fBcurrentURL\fP () const "
.br
.ti -1c
.RI "\fBKFileTreeBranch\fP * \fBaddBranch\fP (const  \fBKURL\fP &path, const  \fBQString\fP &name, bool showHidden=false)"
.br
.RI "\fIAdds a branch to the treeview item. \fP"
.ti -1c
.RI "virtual \fBKFileTreeBranch\fP * \fBaddBranch\fP (const  \fBKURL\fP &path, const  \fBQString\fP &name, const  \fBQPixmap\fP &pix, bool showHidden=false)"
.br
.RI "\fIsame as the function above but with a pixmap to set for the branch. \fP"
.ti -1c
.RI "virtual \fBKFileTreeBranch\fP * \fBaddBranch\fP (\fBKFileTreeBranch\fP *)"
.br
.RI "\fIsame as the function above but letting the user create the branch. \fP"
.ti -1c
.RI "virtual bool \fBremoveBranch\fP (\fBKFileTreeBranch\fP *branch)"
.br
.RI "\fIremoves the branch from the treeview. \fP"
.ti -1c
.RI "\fBKFileTreeBranch\fP * \fBbranch\fP (const  \fBQString\fP &searchName)"
.br
.ti -1c
.RI "\fBKFileTreeBranchList\fP & \fBbranches\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetDirOnlyMode\fP (\fBKFileTreeBranch\fP *brnch, bool)"
.br
.RI "\fIset the directory mode for branches. \fP"
.ti -1c
.RI "\fBKFileTreeViewItem\fP * \fBfindItem\fP (\fBKFileTreeBranch\fP *brnch, const  \fBQString\fP &relUrl)"
.br
.RI "\fIsearches a branch for a \fBKFileTreeViewItem\fP identified by the relative url given as second parameter. \fP"
.ti -1c
.RI "\fBKFileTreeViewItem\fP * \fBfindItem\fP (const  \fBQString\fP &branchName, const  \fBQString\fP &relUrl)"
.br
.RI "\fIsee method above, differs only in the first parameter. \fP"
.ti -1c
.RI "bool \fBshowFolderOpenPixmap\fP () const "
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBslotNewTreeViewItems\fP (\fBKFileTreeBranch\fP *, const  \fBKFileTreeViewItemList\fP &)"
.br
.ti -1c
.RI "virtual void \fBslotSetNextUrlToSelect\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "virtual \fBQPixmap\fP \fBitemIcon\fP (\fBKFileTreeViewItem\fP *, int gap=0) const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBacceptDrag\fP (\fBQDropEvent\fP *\fBevent\fP) const "
.br
.ti -1c
.RI "virtual \fBQDragObject\fP * \fBdragObject\fP ()"
.br
.ti -1c
.RI "virtual void \fBstartAnimation\fP (\fBKFileTreeViewItem\fP *item, const  char *iconBaseName='kde', uint iconCount=6)"
.br
.ti -1c
.RI "virtual void \fBstopAnimation\fP (\fBKFileTreeViewItem\fP *item)"
.br
.ti -1c
.RI "virtual void \fBcontentsDragEnterEvent\fP (\fBQDragEnterEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBcontentsDragMoveEvent\fP (\fBQDragMoveEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBcontentsDragLeaveEvent\fP (\fBQDragLeaveEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBcontentsDropEvent\fP (\fBQDropEvent\fP *ev)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKURL\fP \fBm_nextUrlToSelect\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files and/or directories in the file system. 

KFileTreeView is able to handle more than one URL, represented by \fBKFileTreeBranch\fP.
.PP
Typical usage: 1. create a KFileTreeView fitting in your layout and add columns to it 2. call addBranch to create one or more branches 3. retrieve the root item with \fBKFileTreeBranch::root\fP() and set it open if desired. That starts the listing. 
.PP
Definition at line 66 of file kfiletreeview.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKFileTreeViewItem\fP * KFileTreeView::currentKFileTreeViewItem () const"
.PP
\fBReturns:\fP
.RS 4
the current (i.e. selected) item 
.RE
.PP
Definition at line 557 of file kfiletreeview.cpp.
.PP
References QListView::selectedItem().
.PP
Referenced by currentURL().
.SS "\fBKURL\fP KFileTreeView::currentURL () const"
.PP
\fBReturns:\fP
.RS 4
the URL of the current selected item. 
.RE
.PP
Definition at line 562 of file kfiletreeview.cpp.
.PP
References currentKFileTreeViewItem(), and KFileTreeViewItem::url().
.PP
Referenced by KDirSelectDialog::url().
.SS "\fBKFileTreeBranch\fP * KFileTreeView::addBranch (const \fBKURL\fP & path, const \fBQString\fP & name, bool showHidden = false)"
.PP
Adds a branch to the treeview item. This high-level function creates the branch, adds it to the treeview and connects some signals. Note that directory listing does not start until a branch is expanded either by opening the root item by user or by setOpen on the root item.
.PP
\fBReturns:\fP
.RS 4
a pointer to the new branch or zero 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIpath\fP is the base url of the branch 
.br
\fIname\fP is the name of the branch, which will be the text for column 0 
.br
\fIshowHidden\fP says if hidden files and directories should be visible 
.RE
.PP
Definition at line 338 of file kfiletreeview.cpp.
.PP
References KMimeType::mimeType(), and KStdAccel::name().
.PP
Referenced by addBranch().
.SS "\fBKFileTreeBranch\fP * KFileTreeView::addBranch (const \fBKURL\fP & path, const \fBQString\fP & name, const \fBQPixmap\fP & pix, bool showHidden = false)\fC [virtual]\fP"
.PP
same as the function above but with a pixmap to set for the branch. Definition at line 346 of file kfiletreeview.cpp.
.PP
References addBranch(), KStdAccel::name(), and KURL::prettyURL().
.SS "\fBKFileTreeBranch\fP * KFileTreeView::addBranch (\fBKFileTreeBranch\fP *)\fC [virtual]\fP"
.PP
same as the function above but letting the user create the branch. Definition at line 357 of file kfiletreeview.cpp.
.PP
References QPtrList::append().
.SS "bool KFileTreeView::removeBranch (\fBKFileTreeBranch\fP * branch)\fC [virtual]\fP"
.PP
removes the branch from the treeview. \fBParameters:\fP
.RS 4
\fIbranch\fP is a pointer to the branch 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success. 
.RE
.PP
Definition at line 395 of file kfiletreeview.cpp.
.PP
References QPtrList::contains(), QPtrList::remove(), and KFileTreeBranch::root().
.SS "\fBKFileTreeBranch\fP * KFileTreeView::branch (const \fBQString\fP & searchName)"
.PP
\fBReturns:\fP
.RS 4
a pointer to the \fBKFileTreeBranch\fP in the KFileTreeView or zero on failiure. 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIbranchno\fP is the name of a branch 
.RE
.PP
Definition at line 371 of file kfiletreeview.cpp.
.PP
References QPtrListIterator::current(), and KFileTreeBranch::name().
.PP
Referenced by findItem().
.SS "\fBKFileTreeBranchList\fP & KFileTreeView::branches ()"
.PP
\fBReturns:\fP
.RS 4
a list of pointers to all existing branches in the treeview. 
.RE
.PP
Definition at line 389 of file kfiletreeview.cpp.
.SS "void KFileTreeView::setDirOnlyMode (\fBKFileTreeBranch\fP * brnch, bool)\fC [virtual]\fP"
.PP
set the directory mode for branches. If true is passed, only directories will be loaded. 
.PP
\fBParameters:\fP
.RS 4
\fIbranch\fP is a pointer to a \fBKFileTreeBranch\fP 
.RE
.PP
Definition at line 409 of file kfiletreeview.cpp.
.PP
References KDirLister::setDirOnlyMode().
.SS "\fBKFileTreeViewItem\fP * KFileTreeView::findItem (\fBKFileTreeBranch\fP * brnch, const \fBQString\fP & relUrl)"
.PP
searches a branch for a \fBKFileTreeViewItem\fP identified by the relative url given as second parameter. The method adds the branches base url to the relative path and finds the item. 
.PP
\fBReturns:\fP
.RS 4
a pointer to the item or zero if the item does not exist. 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIbrnch\fP is a pointer to the branch to search in 
.br
\fIrelUrl\fP is the branch relativ url 
.RE
.PP
Definition at line 596 of file kfiletreeview.cpp.
.PP
References KURL::addPath(), QString::endsWith(), KFileItem::extraData(), KDirLister::find(), QString::fromLatin1(), QString::isEmpty(), QString::length(), KURL::prettyURL(), KFileTreeBranch::root(), KFileTreeBranch::rootUrl(), and QString::truncate().
.PP
Referenced by findItem().
.SS "\fBKFileTreeViewItem\fP * KFileTreeView::findItem (const \fBQString\fP & branchName, const \fBQString\fP & relUrl)"
.PP
see method above, differs only in the first parameter. Finds the branch by its name. Definition at line 590 of file kfiletreeview.cpp.
.PP
References branch(), and findItem().
.SS "bool KFileTreeView::showFolderOpenPixmap () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
a flag indicating if extended folder pixmaps are displayed or not. 
.RE
.PP
Definition at line 152 of file kfiletreeview.h.
.SS "virtual void KFileTreeView::setShowFolderOpenPixmap (bool showIt = true)\fC [inline, virtual, slot]\fP"
.PP
set the flag to show 'extended' folder icons on or off. If switched on, folders will have an open folder pixmap displayed if their children are visible, and the standard closed folder pixmap (from mimetype folder) if they are closed. If switched off, the plain mime pixmap is displayed. 
.PP
\fBParameters:\fP
.RS 4
\fIshowIt\fP = false displays mime type pixmap only 
.RE
.PP
Definition at line 163 of file kfiletreeview.h.
.SS "bool KFileTreeView::acceptDrag (\fBQDropEvent\fP * event) const\fC [protected, virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
true if we can decode the drag and support the action 
.RE
.PP
Reimplemented from \fBKListView\fP.
.PP
Definition at line 211 of file kfiletreeview.cpp.
.PP
References QDropEvent::action(), QUriDrag::canDecode(), and KListView::itemsMovable().

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