KFileTreeView Class Reference
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files and/or directories in the file system. More...
#include <kfiletreeview.h>
Inheritance diagram for KFileTreeView:

Public Slots | |
virtual void | setShowFolderOpenPixmap (bool showIt=true) |
set the flag to show 'extended' folder icons on or off. | |
Signals | |
void | onItem (const QString &) |
void | dropped (QWidget *, QDropEvent *) |
void | dropped (QWidget *, QDropEvent *, KURL::List &) |
void | dropped (KURL::List &, KURL &) |
void | dropped (QDropEvent *, QListViewItem *) |
void | dropped (KFileTreeView *, QDropEvent *, QListViewItem *) |
void | dropped (QDropEvent *, QListViewItem *, QListViewItem *) |
void | dropped (KFileTreeView *, QDropEvent *, QListViewItem *, QListViewItem *) |
Public Member Functions | |
KFileTreeView (QWidget *parent, const char *name=0) | |
KFileTreeViewItem * | currentKFileTreeViewItem () const |
KURL | currentURL () const |
KFileTreeBranch * | addBranch (const KURL &path, const QString &name, bool showHidden=false) |
Adds a branch to the treeview item. | |
virtual KFileTreeBranch * | addBranch (const KURL &path, const QString &name, const QPixmap &pix, bool showHidden=false) |
same as the function above but with a pixmap to set for the branch. | |
virtual KFileTreeBranch * | addBranch (KFileTreeBranch *) |
same as the function above but letting the user create the branch. | |
virtual bool | removeBranch (KFileTreeBranch *branch) |
removes the branch from the treeview. | |
KFileTreeBranch * | branch (const QString &searchName) |
KFileTreeBranchList & | branches () |
virtual void | setDirOnlyMode (KFileTreeBranch *brnch, bool) |
set the directory mode for branches. | |
KFileTreeViewItem * | findItem (KFileTreeBranch *brnch, const QString &relUrl) |
searches a branch for a KFileTreeViewItem identified by the relative url given as second parameter. | |
KFileTreeViewItem * | findItem (const QString &branchName, const QString &relUrl) |
see method above, differs only in the first parameter. | |
bool | showFolderOpenPixmap () const |
Protected Slots | |
virtual void | slotNewTreeViewItems (KFileTreeBranch *, const KFileTreeViewItemList &) |
virtual void | slotSetNextUrlToSelect (const KURL &url) |
virtual QPixmap | itemIcon (KFileTreeViewItem *, int gap=0) const |
Protected Member Functions | |
virtual bool | acceptDrag (QDropEvent *event) const |
virtual QDragObject * | dragObject () |
virtual void | startAnimation (KFileTreeViewItem *item, const char *iconBaseName="kde", uint iconCount=6) |
virtual void | stopAnimation (KFileTreeViewItem *item) |
virtual void | contentsDragEnterEvent (QDragEnterEvent *e) |
virtual void | contentsDragMoveEvent (QDragMoveEvent *e) |
virtual void | contentsDragLeaveEvent (QDragLeaveEvent *e) |
virtual void | contentsDropEvent (QDropEvent *ev) |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KURL | m_nextUrlToSelect |
Detailed Description
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 KFileTreeBranch.
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 KFileTreeBranch::root() and set it open if desired. That starts the listing.
Definition at line 66 of file kfiletreeview.h.
Member Function Documentation
|
Definition at line 557 of file kfiletreeview.cpp. References QListView::selectedItem(). Referenced by currentURL(). |
|
Definition at line 562 of file kfiletreeview.cpp. References currentKFileTreeViewItem(), and KFileTreeViewItem::url(). Referenced by KDirSelectDialog::url(). |
|
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.
Definition at line 338 of file kfiletreeview.cpp. References KMimeType::mimeType(), and KStdAccel::name(). Referenced by addBranch(). |
|
same as the function above but with a pixmap to set for the branch.
Definition at line 346 of file kfiletreeview.cpp. References addBranch(), KStdAccel::name(), and KURL::prettyURL(). |
|
same as the function above but letting the user create the branch.
Definition at line 357 of file kfiletreeview.cpp. References QPtrList::append(). |
|
removes the branch from the treeview.
Definition at line 395 of file kfiletreeview.cpp. References QPtrList::contains(), QPtrList::remove(), and KFileTreeBranch::root(). |
|
Definition at line 371 of file kfiletreeview.cpp. References QPtrListIterator::current(), and KFileTreeBranch::name(). Referenced by findItem(). |
|
Definition at line 389 of file kfiletreeview.cpp. |
|
set the directory mode for branches. If true is passed, only directories will be loaded.
Definition at line 409 of file kfiletreeview.cpp. References KDirLister::setDirOnlyMode(). |
|
searches a branch for a KFileTreeViewItem identified by the relative url given as second parameter. The method adds the branches base url to the relative path and finds the item.
Definition at line 596 of file kfiletreeview.cpp. References KURL::addPath(), QString::endsWith(), KFileItem::extraData(), KDirLister::find(), QString::fromLatin1(), QString::isEmpty(), QString::length(), KURL::prettyURL(), KFileTreeBranch::root(), KFileTreeBranch::rootUrl(), and QString::truncate(). Referenced by findItem(). |
|
see method above, differs only in the first parameter. Finds the branch by its name. Definition at line 590 of file kfiletreeview.cpp. References branch(), and findItem(). |
|
Definition at line 152 of file kfiletreeview.h. |
|
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.
Definition at line 163 of file kfiletreeview.h. |
|
Reimplemented from KListView. Definition at line 211 of file kfiletreeview.cpp. References QDropEvent::action(), QUriDrag::canDecode(), and KListView::itemsMovable(). |
The documentation for this class was generated from the following files: