KDE3Support
#include <k3filetreeview.h>
Public Slots | |
virtual void | setShowFolderOpenPixmap (bool showIt=true) |
Public Slots inherited from K3ListView | |
virtual void | rename (Q3ListViewItem *item, int c) |
virtual void | setAutoOpen (bool b) |
virtual void | setDragEnabled (bool b) |
virtual void | setDropHighlighter (bool b) |
virtual void | setDropVisualizer (bool b) |
void | setDropVisualizerWidth (int w) |
virtual void | setItemsMovable (bool b) |
virtual void | setItemsRenameable (bool b) |
void | setRenameable (int column, bool yesno=true) |
void | setSelectionModeExt (SelectionModeExt mode) |
void | setTabOrderedRenaming (bool b) |
virtual void | setTooltipColumn (int column) |
bool | tabOrderedRenaming () const |
Protected Slots | |
virtual QPixmap | itemIcon (K3FileTreeViewItem *, int gap=0) const |
virtual void | slotNewTreeViewItems (KFileTreeBranch *, const K3FileTreeViewItemList &) |
virtual void | slotSetNextUrlToSelect (const KUrl &url) |
Protected Slots inherited from K3ListView | |
void | cleanDropVisualizer () |
void | cleanItemHighlighter () |
void | doneEditing (Q3ListViewItem *item, int row) |
void | emitContextMenu (Q3ListViewItem *, const QPoint &, int) |
void | emitContextMenu (K3ListView *, Q3ListViewItem *) |
void | slotAutoSelect () |
void | slotDragExpand () |
void | slotHeaderChanged () |
void | slotMouseButtonClicked (int btn, Q3ListViewItem *item, const QPoint &pos, int c) |
void | slotOnItem (Q3ListViewItem *item) |
void | slotOnViewport () |
void | slotSettingsChanged (int) |
Protected Member Functions | |
virtual bool | acceptDrag (QDropEvent *event) const |
virtual void | contentsDragEnterEvent (QDragEnterEvent *e) |
virtual void | contentsDragLeaveEvent (QDragLeaveEvent *e) |
virtual void | contentsDragMoveEvent (QDragMoveEvent *e) |
virtual void | contentsDropEvent (QDropEvent *ev) |
virtual Q3DragObject * | dragObject () |
virtual void | startAnimation (K3FileTreeViewItem *item, const char *iconBaseName="kde", uint iconCount=6) |
virtual void | stopAnimation (K3FileTreeViewItem *item) |
Protected Member Functions inherited from K3ListView | |
void | activateAutomaticSelection () |
bool | automaticSelection () const |
bool | below (const QRect &rect, const QPoint &p) |
bool | below (Q3ListViewItem *i, const QPoint &p) |
virtual void | contentsContextMenuEvent (QContextMenuEvent *) |
virtual void | contentsMouseDoubleClickEvent (QMouseEvent *e) |
virtual void | contentsMouseMoveEvent (QMouseEvent *e) |
virtual void | contentsMousePressEvent (QMouseEvent *e) |
virtual void | contentsMouseReleaseEvent (QMouseEvent *) |
void | deactivateAutomaticSelection () |
int | depthToPixels (int depth) |
void | disableAutoSelection () |
void | doubleClicked (Q3ListViewItem *item, const QPoint &pos, int c) |
virtual QRect | drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after) |
virtual QRect | drawItemHighlighter (QPainter *painter, Q3ListViewItem *item) |
void | emitExecute (Q3ListViewItem *item, const QPoint &pos, int c) |
virtual bool | event (QEvent *) |
void | fileManagerKeyPressEvent (QKeyEvent *) |
virtual void | findDrop (const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after) |
virtual void | focusInEvent (QFocusEvent *fe) |
virtual void | focusOutEvent (QFocusEvent *fe) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | leaveEvent (QEvent *e) |
virtual void | movableDropEvent (Q3ListViewItem *parent, Q3ListViewItem *afterme) |
void | resetAutoSelection () |
virtual bool | showTooltip (Q3ListViewItem *item, const QPoint &pos, int column) const |
virtual void | startDrag () |
virtual QString | tooltip (Q3ListViewItem *item, int column) const |
virtual void | viewportPaintEvent (QPaintEvent *) |
virtual void | viewportResizeEvent (QResizeEvent *e) |
Protected Attributes | |
KUrl | m_nextUrlToSelect |
Additional Inherited Members | |
Public Types inherited from K3ListView | |
enum | SelectionModeExt { Single = Q3ListView::Single, Multi = Q3ListView::Multi, Extended = Q3ListView::Extended, NoSelection = Q3ListView::NoSelection, FileManager } |
Properties inherited from K3ListView | |
QColor | alternateBackground |
bool | autoOpen |
bool | dragEnabled |
bool | dropVisualizer |
int | dropVisualizerWidth |
bool | fullWidth |
bool | itemsMovable |
bool | itemsRenameable |
bool | shadeSortColumn |
int | tooltipColumn |
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.
K3FileTreeView is able to handle more than one URL, represented by KFileTreeBranch.
Typical usage:
- create a K3FileTreeView fitting in your layout and add columns to it
- call addBranch to create one or more branches
- retrieve the root item with KFileTreeBranch::root() and set it open if desired. That starts the listing.
Definition at line 53 of file k3filetreeview.h.
Constructor & Destructor Documentation
K3FileTreeView::K3FileTreeView | ( | QWidget * | parent | ) |
Definition at line 40 of file k3filetreeview.cpp.
|
virtual |
Definition at line 82 of file k3filetreeview.cpp.
Member Function Documentation
|
protectedvirtual |
- Returns
- true if we can decode the drag and support the action
Reimplemented from K3ListView.
Definition at line 226 of file k3filetreeview.cpp.
KFileTreeBranch * K3FileTreeView::addBranch | ( | const KUrl & | path, |
const QString & | name, | ||
bool | showHidden = false |
||
) |
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.
- Returns
- a pointer to the new branch or zero
- 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
Definition at line 357 of file k3filetreeview.cpp.
|
virtual |
same as the function above but with a pixmap to set for the branch.
Definition at line 366 of file k3filetreeview.cpp.
|
virtual |
same as the function above but letting the user create the branch.
Definition at line 377 of file k3filetreeview.cpp.
KFileTreeBranch * K3FileTreeView::branch | ( | const QString & | searchName | ) |
- Returns
- a pointer to the KFileTreeBranch in the K3FileTreeView or zero on failure.
- Parameters
-
searchName is the name of a branch
Definition at line 391 of file k3filetreeview.cpp.
KFileTreeBranchList & K3FileTreeView::branches | ( | ) |
- Returns
- a list of pointers to all existing branches in the treeview.
Definition at line 409 of file k3filetreeview.cpp.
|
protectedvirtual |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from K3ListView.
Definition at line 108 of file k3filetreeview.cpp.
|
protectedvirtual |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from K3ListView.
Definition at line 164 of file k3filetreeview.cpp.
|
protectedvirtual |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from K3ListView.
Definition at line 130 of file k3filetreeview.cpp.
|
protectedvirtual |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from K3ListView.
Definition at line 179 of file k3filetreeview.cpp.
K3FileTreeViewItem * K3FileTreeView::currentKFileTreeViewItem | ( | ) | const |
- Returns
- the current (i.e. selected) item
Definition at line 587 of file k3filetreeview.cpp.
KUrl K3FileTreeView::currentUrl | ( | ) | const |
- Returns
- the URL of the current selected item.
Definition at line 592 of file k3filetreeview.cpp.
|
protectedvirtual |
- Returns
- a dragobject encoding the current selection.
- See also
- setDragEnabled()
Reimplemented from K3ListView.
Definition at line 250 of file k3filetreeview.cpp.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
K3FileTreeViewItem * K3FileTreeView::findItem | ( | KFileTreeBranch * | brnch, |
const QString & | relUrl | ||
) |
searches a branch for a K3FileTreeViewItem identified by the relative url given as second parameter.
The method adds the branches base url to the relative path and finds the item.
- Returns
- a pointer to the item or zero if the item does not exist.
- Parameters
-
brnch is a pointer to the branch to search in relUrl is the branch relativ url
Definition at line 626 of file k3filetreeview.cpp.
K3FileTreeViewItem * K3FileTreeView::findItem | ( | const QString & | branchName, |
const QString & | relUrl | ||
) |
see method above, differs only in the first parameter.
Finds the branch by its name.
Definition at line 620 of file k3filetreeview.cpp.
|
protectedvirtualslot |
Definition at line 475 of file k3filetreeview.cpp.
|
signal |
|
virtual |
removes the branch from the treeview.
- Parameters
-
branch is a pointer to the branch
- Returns
- true on success.
Definition at line 415 of file k3filetreeview.cpp.
|
virtual |
set the directory mode for branches.
If true is passed, only directories will be loaded.
- Parameters
-
branch is a pointer to a KFileTreeBranch
Definition at line 429 of file k3filetreeview.cpp.
|
virtualslot |
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
Definition at line 666 of file k3filetreeview.cpp.
bool K3FileTreeView::showFolderOpenPixmap | ( | ) | const |
- Returns
- a flag indicating if extended folder pixmaps are displayed or not.
Definition at line 661 of file k3filetreeview.cpp.
|
protectedvirtualslot |
Definition at line 444 of file k3filetreeview.cpp.
|
protectedvirtualslot |
Definition at line 671 of file k3filetreeview.cpp.
|
protectedvirtual |
Definition at line 539 of file k3filetreeview.cpp.
|
protectedvirtual |
Definition at line 556 of file k3filetreeview.cpp.
Member Data Documentation
|
protected |
Definition at line 208 of file k3filetreeview.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.