• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
KFileTreeView Class Reference

#include <tdefiletreeview.h>

Inherits TDEListView.

Public Slots

virtual void setShowFolderOpenPixmap (bool showIt=true)
 

Signals

void onItem (const TQString &)
 
void dropped (TQWidget *, TQDropEvent *)
 
void dropped (TQWidget *, TQDropEvent *, KURL::List &)
 
void dropped (KURL::List &, KURL &)
 
void dropped (TQWidget *, TQDropEvent *, KURL::List &, KURL &)
 
void dropped (TQDropEvent *e, TQListViewItem *after)
 
void dropped (KFileTreeView *, TQDropEvent *, TQListViewItem *)
 
void dropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after)
 
void dropped (KFileTreeView *, TQDropEvent *, TQListViewItem *, TQListViewItem *)
 

Public Member Functions

 KFileTreeView (TQWidget *parent, const char *name=0)
 
KFileTreeViewItem * currentKFileTreeViewItem () const
 
KURL currentURL () const
 
KFileTreeBranch * addBranch (const KURL &path, const TQString &name, bool showHidden=false)
 
virtual KFileTreeBranch * addBranch (const KURL &path, const TQString &name, const TQPixmap &pix, bool showHidden=false)
 
virtual KFileTreeBranch * addBranch (KFileTreeBranch *)
 
virtual bool removeBranch (KFileTreeBranch *branch)
 
KFileTreeBranch * branch (const TQString &searchName)
 
KFileTreeBranchList & branches ()
 
virtual void setDirOnlyMode (KFileTreeBranch *branch, bool)
 
KFileTreeViewItem * findItem (KFileTreeBranch *brnch, const TQString &relUrl)
 
KFileTreeViewItem * findItem (const TQString &branchName, const TQString &relUrl)
 
bool showFolderOpenPixmap () const
 

Protected Slots

virtual void slotNewTreeViewItems (KFileTreeBranch *, const KFileTreeViewItemList &)
 
virtual void slotSetNextUrlToSelect (const KURL &url)
 
virtual TQPixmap itemIcon (KFileTreeViewItem *, int gap=0) const
 

Protected Member Functions

virtual bool acceptDrag (TQDropEvent *event) const
 
virtual TQDragObject * dragObject ()
 
virtual void startAnimation (KFileTreeViewItem *item, const char *iconBaseName="kde", uint iconCount=6)
 
virtual void stopAnimation (KFileTreeViewItem *item)
 
virtual void contentsDragEnterEvent (TQDragEnterEvent *e)
 
virtual void contentsDragMoveEvent (TQDragMoveEvent *e)
 
virtual void contentsDragLeaveEvent (TQDragLeaveEvent *e)
 
virtual void contentsDropEvent (TQDropEvent *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 tdefiletreeview.h.

Constructor & Destructor Documentation

◆ KFileTreeView()

KFileTreeView::KFileTreeView ( TQWidget *  parent,
const char *  name = 0 
)

Definition at line 42 of file tdefiletreeview.cpp.

◆ ~KFileTreeView()

KFileTreeView::~KFileTreeView ( )
virtual

Definition at line 85 of file tdefiletreeview.cpp.

Member Function Documentation

◆ acceptDrag()

bool KFileTreeView::acceptDrag ( TQDropEvent *  event) const
protectedvirtual
Returns
true if we can decode the drag and support the action

Definition at line 228 of file tdefiletreeview.cpp.

◆ addBranch() [1/3]

KFileTreeBranch * KFileTreeView::addBranch ( const KURL &  path,
const TQString &  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
pathis the base url of the branch
nameis the name of the branch, which will be the text for column 0
showHiddensays if hidden files and directories should be visible

Definition at line 357 of file tdefiletreeview.cpp.

◆ addBranch() [2/3]

KFileTreeBranch * KFileTreeView::addBranch ( const KURL &  path,
const TQString &  name,
const TQPixmap &  pix,
bool  showHidden = false 
)
virtual

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

Definition at line 365 of file tdefiletreeview.cpp.

◆ addBranch() [3/3]

KFileTreeBranch * KFileTreeView::addBranch ( KFileTreeBranch *  newBranch)
virtual

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

Definition at line 376 of file tdefiletreeview.cpp.

◆ branch()

KFileTreeBranch * KFileTreeView::branch ( const TQString &  searchName)
Returns
a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure.
Parameters
searchNameis the name of a branch

Definition at line 390 of file tdefiletreeview.cpp.

◆ branches()

KFileTreeBranchList & KFileTreeView::branches ( )
Returns
a list of pointers to all existing branches in the treeview.

Definition at line 408 of file tdefiletreeview.cpp.

◆ contentsDragEnterEvent()

void KFileTreeView::contentsDragEnterEvent ( TQDragEnterEvent *  e)
protectedvirtual

Definition at line 111 of file tdefiletreeview.cpp.

◆ contentsDragLeaveEvent()

void KFileTreeView::contentsDragLeaveEvent ( TQDragLeaveEvent *  e)
protectedvirtual

Definition at line 167 of file tdefiletreeview.cpp.

◆ contentsDragMoveEvent()

void KFileTreeView::contentsDragMoveEvent ( TQDragMoveEvent *  e)
protectedvirtual

Definition at line 133 of file tdefiletreeview.cpp.

◆ contentsDropEvent()

void KFileTreeView::contentsDropEvent ( TQDropEvent *  ev)
protectedvirtual

Definition at line 182 of file tdefiletreeview.cpp.

◆ currentKFileTreeViewItem()

KFileTreeViewItem * KFileTreeView::currentKFileTreeViewItem ( ) const
Returns
the current (i.e. selected) item

Definition at line 586 of file tdefiletreeview.cpp.

◆ currentURL()

KURL KFileTreeView::currentURL ( ) const
Returns
the URL of the current selected item.

Definition at line 591 of file tdefiletreeview.cpp.

◆ dragObject()

TQDragObject * KFileTreeView::dragObject ( )
protectedvirtual

Definition at line 252 of file tdefiletreeview.cpp.

◆ findItem() [1/2]

KFileTreeViewItem * KFileTreeView::findItem ( const TQString &  branchName,
const TQString &  relUrl 
)

see method above, differs only in the first parameter.

Finds the branch by its name.

Definition at line 619 of file tdefiletreeview.cpp.

◆ findItem() [2/2]

KFileTreeViewItem * KFileTreeView::findItem ( KFileTreeBranch *  brnch,
const TQString &  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.

Returns
a pointer to the item or zero if the item does not exist.
Parameters
brnchis a pointer to the branch to search in
relUrlis the branch relativ url

Definition at line 625 of file tdefiletreeview.cpp.

◆ itemIcon

TQPixmap KFileTreeView::itemIcon ( KFileTreeViewItem *  item,
int  gap = 0 
) const
protectedvirtualslot

Definition at line 474 of file tdefiletreeview.cpp.

◆ removeBranch()

bool KFileTreeView::removeBranch ( KFileTreeBranch *  branch)
virtual

removes the branch from the treeview.

Parameters
branchis a pointer to the branch
Returns
true on success.

Definition at line 414 of file tdefiletreeview.cpp.

◆ setDirOnlyMode()

void KFileTreeView::setDirOnlyMode ( KFileTreeBranch *  branch,
bool  bom 
)
virtual

set the directory mode for branches.

If true is passed, only directories will be loaded.

Parameters
branchis a pointer to a KFileTreeBranch

Definition at line 428 of file tdefiletreeview.cpp.

◆ setShowFolderOpenPixmap

virtual void KFileTreeView::setShowFolderOpenPixmap ( bool  showIt = true)
inlinevirtualslot

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 163 of file tdefiletreeview.h.

◆ showFolderOpenPixmap()

bool KFileTreeView::showFolderOpenPixmap ( ) const
inline
Returns
a flag indicating if extended folder pixmaps are displayed or not.

Definition at line 152 of file tdefiletreeview.h.

◆ slotNewTreeViewItems

void KFileTreeView::slotNewTreeViewItems ( KFileTreeBranch *  branch,
const KFileTreeViewItemList &  itemList 
)
protectedvirtualslot

Definition at line 443 of file tdefiletreeview.cpp.

◆ slotSetNextUrlToSelect

virtual void KFileTreeView::slotSetNextUrlToSelect ( const KURL &  url)
inlineprotectedvirtualslot

Definition at line 185 of file tdefiletreeview.h.

◆ startAnimation()

void KFileTreeView::startAnimation ( KFileTreeViewItem *  item,
const char *  iconBaseName = "kde",
uint  iconCount = 6 
)
protectedvirtual

Definition at line 538 of file tdefiletreeview.cpp.

◆ stopAnimation()

void KFileTreeView::stopAnimation ( KFileTreeViewItem *  item)
protectedvirtual

Definition at line 555 of file tdefiletreeview.cpp.

◆ virtual_hook()

void KFileTreeView::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 674 of file tdefiletreeview.cpp.

Member Data Documentation

◆ m_nextUrlToSelect

KURL KFileTreeView::m_nextUrlToSelect
protected

Definition at line 223 of file tdefiletreeview.h.


The documentation for this class was generated from the following files:
  • tdefiletreeview.h
  • tdefiletreeview.cpp

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.