org.kde.koala

Class KFileTreeView

public class KFileTreeView extends KListView

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. See KFileTreeViewSignals for signals emitted by KFileTreeView

UNKNOWN: The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files and/or directories in the file system.

Constructor Summary
protected KFileTreeView(Class dummy)
KFileTreeView(QWidget parent, String name)
KFileTreeView(QWidget parent)
Method Summary
protected booleanacceptDrag(QDropEvent event)
KFileTreeBranchaddBranch(KURL path, String name, boolean showHidden)
Adds a branch to the treeview item.
KFileTreeBranchaddBranch(KURL path, String name)
KFileTreeBranchaddBranch(KURL path, String name, QPixmap pix, boolean showHidden)
same as the function above but with a pixmap to set for the branch.
KFileTreeBranchaddBranch(KURL path, String name, QPixmap pix)
KFileTreeBranchaddBranch(KFileTreeBranch arg1)
same as the function above but letting the user create the branch.
KFileTreeBranchbranch(String searchName)
StringclassName()
protected voidcontentsDragEnterEvent(QDragEnterEvent e)
protected voidcontentsDragLeaveEvent(QDragLeaveEvent e)
protected voidcontentsDragMoveEvent(QDragMoveEvent e)
protected voidcontentsDropEvent(QDropEvent ev)
KFileTreeViewItemcurrentKFileTreeViewItem()
KURLcurrentURL()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected QDragObjectdragObject()
protected voidfinalize()
Deletes the wrapped C++ instance
KFileTreeViewItemfindItem(KFileTreeBranch brnch, String relUrl)
searches a branch for a KFileTreeViewItem identified by the relative url given as second parameter.
KFileTreeViewItemfindItem(String branchName, String relUrl)
see method above, differs only in the first parameter.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected QPixmapitemIcon(KFileTreeViewItem arg1, int gap)
protected QPixmapitemIcon(KFileTreeViewItem arg1)
QMetaObjectmetaObject()
booleanremoveBranch(KFileTreeBranch branch)
removes the branch from the treeview.
voidsetDirOnlyMode(KFileTreeBranch branch, boolean arg2)
set the directory mode for branches.
voidsetShowFolderOpenPixmap(boolean showIt)
set the flag to show 'extended' folder icons on or off.
voidsetShowFolderOpenPixmap()
booleanshowFolderOpenPixmap()
protected voidslotSetNextUrlToSelect(KURL url)
protected voidstartAnimation(KFileTreeViewItem item, String iconBaseName, int iconCount)
protected voidstartAnimation(KFileTreeViewItem item, String iconBaseName)
protected voidstartAnimation(KFileTreeViewItem item)
protected voidstopAnimation(KFileTreeViewItem item)

Constructor Detail

KFileTreeView

protected KFileTreeView(Class dummy)

KFileTreeView

public KFileTreeView(QWidget parent, String name)

KFileTreeView

public KFileTreeView(QWidget parent)

Method Detail

acceptDrag

protected boolean acceptDrag(QDropEvent event)

Returns: true if we can decode the drag and support the action

UNKNOWN:

addBranch

public KFileTreeBranch addBranch(KURL path, String name, boolean showHidden)
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.

Parameters: path is the base url of the branch name is the name of the branch, which will be the text for column 0 showHidden says if hidden files and directories should be visible

Returns: a pointer to the new branch or zero

UNKNOWN: Adds a branch to the treeview item.

addBranch

public KFileTreeBranch addBranch(KURL path, String name)

addBranch

public KFileTreeBranch addBranch(KURL path, String name, QPixmap pix, boolean showHidden)
same as the function above but with a pixmap to set for the branch.

UNKNOWN: same as the function above but with a pixmap to set for the branch.

addBranch

public KFileTreeBranch addBranch(KURL path, String name, QPixmap pix)

addBranch

public KFileTreeBranch addBranch(KFileTreeBranch arg1)
same as the function above but letting the user create the branch.

UNKNOWN: same as the function above but letting the user create the branch.

branch

public KFileTreeBranch branch(String searchName)

Parameters: searchName is the name of a branch

Returns: a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure.

UNKNOWN:

className

public String className()

contentsDragEnterEvent

protected void contentsDragEnterEvent(QDragEnterEvent e)

contentsDragLeaveEvent

protected void contentsDragLeaveEvent(QDragLeaveEvent e)

contentsDragMoveEvent

protected void contentsDragMoveEvent(QDragMoveEvent e)

contentsDropEvent

protected void contentsDropEvent(QDropEvent ev)

currentKFileTreeViewItem

public KFileTreeViewItem currentKFileTreeViewItem()

Returns: the current (i.e. selected) item

UNKNOWN:

currentURL

public KURL currentURL()

Returns: the URL of the current selected item.

UNKNOWN:

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

dragObject

protected QDragObject dragObject()

finalize

protected void finalize()
Deletes the wrapped C++ instance

findItem

public KFileTreeViewItem findItem(KFileTreeBranch brnch, String relUrl)
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.

Parameters: brnch is a pointer to the branch to search in relUrl is the branch relativ url

Returns: a pointer to the item or zero if the item does not exist.

UNKNOWN: searches a branch for a KFileTreeViewItem identified by the relative url given as second parameter.

findItem

public KFileTreeViewItem findItem(String branchName, String relUrl)
see method above, differs only in the first parameter. Finds the branch by its name.

UNKNOWN: see method above, differs only in the first parameter.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

itemIcon

protected QPixmap itemIcon(KFileTreeViewItem arg1, int gap)

itemIcon

protected QPixmap itemIcon(KFileTreeViewItem arg1)

metaObject

public QMetaObject metaObject()

removeBranch

public boolean removeBranch(KFileTreeBranch branch)
removes the branch from the treeview.

Parameters: branch is a pointer to the branch

Returns: true on success.

UNKNOWN: removes the branch from the treeview.

setDirOnlyMode

public void setDirOnlyMode(KFileTreeBranch branch, boolean arg2)
set the directory mode for branches. If true is passed, only directories will be loaded.

Parameters: branch is a pointer to a KFileTreeBranch

UNKNOWN: set the directory mode for branches.

setShowFolderOpenPixmap

public void setShowFolderOpenPixmap(boolean showIt)
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.

Parameters: showIt = false displays mime type pixmap only

UNKNOWN: set the flag to show 'extended' folder icons on or off.

setShowFolderOpenPixmap

public void setShowFolderOpenPixmap()

showFolderOpenPixmap

public boolean showFolderOpenPixmap()

Returns: a flag indicating if extended folder pixmaps are displayed or not.

UNKNOWN:

slotSetNextUrlToSelect

protected void slotSetNextUrlToSelect(KURL url)

startAnimation

protected void startAnimation(KFileTreeViewItem item, String iconBaseName, int iconCount)

startAnimation

protected void startAnimation(KFileTreeViewItem item, String iconBaseName)

startAnimation

protected void startAnimation(KFileTreeViewItem item)

stopAnimation

protected void stopAnimation(KFileTreeViewItem item)