• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KFileTreeBranch Class Reference

This is the branch class of the KFileTreeView, which represents one branch in the treeview. More...

#include <kfiletreebranch.h>

Inheritance diagram for KFileTreeBranch:

Inheritance graph
[legend]

List of all members.


Public Slots

virtual bool populate (const KURL &url, KFileTreeViewItem *currItem)
void setOpenPixmap (const QPixmap &pix)
virtual void setShowExtensions (bool visible=true)

Signals

void directoryChildCount (KFileTreeViewItem *item, int count)
void newTreeViewItems (KFileTreeBranch *, const KFileTreeViewItemList &)
void populateFinished (KFileTreeViewItem *)

Public Member Functions

bool childRecurse ()
virtual KFileTreeViewItem * findTVIByURL (const KURL &)
 KFileTreeBranch (KFileTreeView *, const KURL &url, const QString &name, const QPixmap &pix, bool showHidden=false, KFileTreeViewItem *branchRoot=0)
QString name () const
const QPixmap & openPixmap ()
const QPixmap & pixmap ()
KFileTreeViewItem * root ()
KURL rootUrl () const
void setChildRecurse (bool t=true)
virtual void setName (const QString n)
void setOpen (bool setopen=true)
virtual void setRoot (KFileTreeViewItem *r)
bool showExtensions () const

Protected Member Functions

virtual KFileTreeViewItem * createTreeViewItem (KFileTreeViewItem *parent, KFileItem *fileItem)
virtual void virtual_hook (int id, void *data)

Detailed Description

This is the branch class of the KFileTreeView, which represents one branch in the treeview.

Every branch has a root which is an url. The branch lists the files under the root. Every branch uses its own dirlister and can have its own filter etc.

Branch object for KFileTreeView object.

Definition at line 48 of file kfiletreebranch.h.


Constructor & Destructor Documentation

KFileTreeBranch::KFileTreeBranch ( KFileTreeView *  parent,
const KURL &  url,
const QString &  name,
const QPixmap &  pix,
bool  showHidden = false,
KFileTreeViewItem *  branchRoot = 0 
)

constructs a branch for KFileTreeView.

Does not yet start to list it.

Parameters:
url start url of the branch.
name the name of the branch, which is displayed in the first column of the treeview.
pix is a pixmap to display as an icon of the branch.
showHidden flag to make hidden files visible or not.
branchRoot is the KFileTreeViewItem to use as the root of the branch, with the default 0 meaning to let KFileTreeBranch create it for you.

Definition at line 36 of file kfiletreebranch.cpp.


Member Function Documentation

bool KFileTreeBranch::childRecurse (  )  [inline]

Returns:
if child recursion is on or off.
See also:
setChildRecurse

Definition at line 137 of file kfiletreebranch.h.

KFileTreeViewItem * KFileTreeBranch::createTreeViewItem ( KFileTreeViewItem *  parent,
KFileItem *  fileItem 
) [protected, virtual]

allocates a KFileTreeViewItem for the branch for new items.

Definition at line 239 of file kfiletreebranch.cpp.

void KFileTreeBranch::directoryChildCount ( KFileTreeViewItem *  item,
int  count 
) [signal]

emitted with the exact count of children for a directory.

KFileTreeViewItem * KFileTreeBranch::findTVIByURL ( const KURL &  url  )  [virtual]

find the according KFileTreeViewItem by an url

Definition at line 368 of file kfiletreebranch.cpp.

QString KFileTreeBranch::name (  )  const [inline]

Returns:
the name of the branch.

Reimplemented from QObject.

Definition at line 87 of file kfiletreebranch.h.

void KFileTreeBranch::newTreeViewItems ( KFileTreeBranch *  ,
const KFileTreeViewItemList &   
) [signal]

emitted with a list of new or updated KFileTreeViewItem which were found in a branch.

Note that this signal is emitted very often and may slow down the performance of the treeview !

const QPixmap& KFileTreeBranch::openPixmap (  )  [inline]

Definition at line 109 of file kfiletreebranch.h.

const QPixmap& KFileTreeBranch::pixmap (  )  [inline]

Definition at line 99 of file kfiletreebranch.h.

bool KFileTreeBranch::populate ( const KURL &  url,
KFileTreeViewItem *  currItem 
) [virtual, slot]

populates a branch.

This method must be called after a branch was added to a KFileTreeView using method addBranch.

Parameters:
url is the url of the root item where the branch starts.
currItem is the current parent.

Definition at line 495 of file kfiletreebranch.cpp.

void KFileTreeBranch::populateFinished ( KFileTreeViewItem *   )  [signal]

emitted with the item of a directory which was finished to populate

KFileTreeViewItem* KFileTreeBranch::root (  )  [inline]

Returns:
the root item.

Definition at line 82 of file kfiletreebranch.h.

KURL KFileTreeBranch::rootUrl (  )  const [inline]

Returns:
the root url of the branch.

Definition at line 69 of file kfiletreebranch.h.

void KFileTreeBranch::setChildRecurse ( bool  t = true  ) 

sets if children recursion is wanted or not.

If this is switched off, the child directories of a just opened directory are not listed internally. That means that it can not be determined if the sub directories are expandable or not. If this is switched off there will be no call to setExpandable.

Parameters:
t set to true to switch on child recursion

Definition at line 256 of file kfiletreebranch.cpp.

virtual void KFileTreeBranch::setName ( const QString  n  )  [inline, virtual]

sets the name of the branch.

Definition at line 92 of file kfiletreebranch.h.

void KFileTreeBranch::setOpen ( bool  setopen = true  )  [inline]

sets the root of the branch open or closed.

Definition at line 120 of file kfiletreebranch.h.

void KFileTreeBranch::setOpenPixmap ( const QPixmap &  pix  )  [slot]

Definition at line 97 of file kfiletreebranch.cpp.

virtual void KFileTreeBranch::setRoot ( KFileTreeViewItem *  r  )  [inline, virtual]

sets a KFileTreeViewItem as root widget for the branch.

That must be created outside of the branch. All KFileTreeViewItems the branch is allocating will become children of that object.

Parameters:
r the KFileTreeViewItem to become the root item.

Definition at line 77 of file kfiletreebranch.h.

void KFileTreeBranch::setShowExtensions ( bool  visible = true  )  [virtual, slot]

sets printing of the file extensions on or off.

If you pass false to this slot, all items of this branch will not show their file extensions in the tree.

Parameters:
visible flags if the extensions should be visible or not.

Definition at line 264 of file kfiletreebranch.cpp.

bool KFileTreeBranch::showExtensions (  )  const

Returns:
whether the items in the branch show their file extensions in the tree or not. See setShowExtensions for more information.

Definition at line 269 of file kfiletreebranch.cpp.

void KFileTreeBranch::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KDirLister.

Definition at line 524 of file kfiletreebranch.cpp.


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

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal