.TH "KFileTreeView" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.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 (\fBQWidget\fP *, \fBQDropEvent\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
.ti -1c
.RI "virtual \fBKFileTreeBranch\fP * \fBaddBranch\fP (const \fBKURL\fP &path, const \fBQString\fP &name, const \fBQPixmap\fP &pix, bool showHidden=false)"
.br
.ti -1c
.RI "virtual \fBKFileTreeBranch\fP * \fBaddBranch\fP (\fBKFileTreeBranch\fP *)"
.br
.ti -1c
.RI "virtual bool \fBremoveBranch\fP (\fBKFileTreeBranch\fP *branch)"
.br
.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 *branch, bool)"
.br
.ti -1c
.RI "\fBKFileTreeViewItem\fP * \fBfindItem\fP (\fBKFileTreeBranch\fP *brnch, const \fBQString\fP &relUrl)"
.br
.ti -1c
.RI "\fBKFileTreeViewItem\fP * \fBfindItem\fP (const \fBQString\fP &branchName, const \fBQString\fP &relUrl)"
.br
.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

.PP
Definition at line 586 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

.PP
Definition at line 591 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 = \fCfalse\fP)"
.PP
Adds a branch to the treeview item. 
.PP
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

.PP
Definition at line 357 of file kfiletreeview.cpp.
.PP
References KMimeType::mimeType(), and KFileTreeBranch::pixmap().
.PP
Referenced by addBranch().
.SS "\fBKFileTreeBranch\fP * KFileTreeView::addBranch (const \fBKURL\fP & path, const \fBQString\fP & name, const \fBQPixmap\fP & pix, bool showHidden = \fCfalse\fP)\fC [virtual]\fP"
.PP
same as the function above but with a pixmap to set for the branch. 
.PP
Definition at line 365 of file kfiletreeview.cpp.
.PP
References addBranch(), endl(), and kdDebug().
.SS "\fBKFileTreeBranch\fP * KFileTreeView::addBranch (\fBKFileTreeBranch\fP *)\fC [virtual]\fP"
.PP
same as the function above but letting the user create the branch. 
.PP
Definition at line 376 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. 
.PP
\fBParameters:\fP
.RS 4
\fIbranch\fP is a pointer to the branch 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success. 
.RE
.PP

.PP
Definition at line 414 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 failure. 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIsearchName\fP is the name of a branch 
.RE
.PP

.PP
Definition at line 390 of file kfiletreeview.cpp.
.PP
References QPtrListIterator::current(), endl(), kdDebug(), 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

.PP
Definition at line 408 of file kfiletreeview.cpp.
.SS "void KFileTreeView::setDirOnlyMode (\fBKFileTreeBranch\fP * branch, bool)\fC [virtual]\fP"
.PP
set the directory mode for branches. 
.PP
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

.PP
Definition at line 428 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. 
.PP
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

.PP
Definition at line 625 of file kfiletreeview.cpp.
.PP
References KURL::addPath(), endl(), QString::endsWith(), KFileItem::extraData(), QDir::isRelativePath(), kdDebug(), KURL::prettyURL(), 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. 
.PP
Finds the branch by its name. 
.PP
Definition at line 619 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

.PP
Definition at line 152 of file kfiletreeview.h.
.SS "virtual void KFileTreeView::setShowFolderOpenPixmap (bool showIt = \fCtrue\fP)\fC [inline, virtual, slot]\fP"
.PP
set the flag to show 'extended' folder icons on or off. 
.PP
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

.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

.PP
Reimplemented from \fBKListView\fP.
.PP
Definition at line 228 of file kfiletreeview.cpp.
.PP
References QUriDrag::canDecode(), and KListView::itemsMovable().

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