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

KDE3Support

KFileTreeBranch Class Reference

#include <kfiletreebranch.h>

Inheritance diagram for KFileTreeBranch:

Inheritance graph
[legend]

List of all members.


Detailed Description

This is the branch class of the K3FileTreeView, 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 K3FileTreeView object.

Definition at line 49 of file kfiletreebranch.h.


Public Slots

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

Signals

void directoryChildCount (K3FileTreeViewItem *item, int count)
void newTreeViewItems (KFileTreeBranch *, const K3FileTreeViewItemList &)
void populateFinished (K3FileTreeViewItem *)

Public Member Functions

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

Protected Member Functions

virtual K3FileTreeViewItem * createTreeViewItem (K3FileTreeViewItem *parent, const KFileItem &fileItem)

Constructor & Destructor Documentation

KFileTreeBranch::KFileTreeBranch ( K3FileTreeView *  parent,
const KUrl &  url,
const QString &  name,
const QPixmap &  pix,
bool  showHidden = false,
K3FileTreeViewItem *  branchRoot = 0 
)

constructs a branch for K3FileTreeView.

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 K3FileTreeViewItem to use as the root of the branch, with the default 0 meaning to let KFileTreeBranch create it for you.

Definition at line 34 of file kfiletreebranch.cpp.


Member Function Documentation

bool KFileTreeBranch::childRecurse (  ) 

Returns:
if child recursion is on or off.

See also:
setChildRecurse

Definition at line 304 of file kfiletreebranch.cpp.

K3FileTreeViewItem * KFileTreeBranch::createTreeViewItem ( K3FileTreeViewItem *  parent,
const KFileItem &  fileItem 
) [protected, virtual]

allocates a K3FileTreeViewItem for the branch for new items.

Definition at line 280 of file kfiletreebranch.cpp.

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

emitted with the exact count of children for a directory.

K3FileTreeViewItem * KFileTreeBranch::findTVIByUrl ( const KUrl &  url  )  [virtual]

find the according K3FileTreeViewItem by an url

Definition at line 413 of file kfiletreebranch.cpp.

QString KFileTreeBranch::name (  )  const

Returns:
the name of the branch.

Definition at line 110 of file kfiletreebranch.cpp.

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

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

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

QPixmap KFileTreeBranch::openPixmap (  )  const

Definition at line 125 of file kfiletreebranch.cpp.

QPixmap KFileTreeBranch::pixmap (  )  const

Definition at line 120 of file kfiletreebranch.cpp.

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

populates a branch.

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

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

Definition at line 540 of file kfiletreebranch.cpp.

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

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

K3FileTreeViewItem * KFileTreeBranch::root (  ) 

Returns:
the root item.

Definition at line 105 of file kfiletreebranch.cpp.

KUrl KFileTreeBranch::rootUrl (  )  const

Returns:
the root url of the branch.

Definition at line 95 of file kfiletreebranch.cpp.

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 297 of file kfiletreebranch.cpp.

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

sets the name of the branch.

Definition at line 115 of file kfiletreebranch.cpp.

void KFileTreeBranch::setOpen ( bool  setopen = true  ) 

sets the root of the branch open or closed.

Definition at line 130 of file kfiletreebranch.cpp.

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

Definition at line 137 of file kfiletreebranch.cpp.

void KFileTreeBranch::setRoot ( K3FileTreeViewItem *  r  )  [virtual]

sets a K3FileTreeViewItem 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 K3FileTreeViewItem to become the root item.

Definition at line 100 of file kfiletreebranch.cpp.

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 310 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 315 of file kfiletreebranch.cpp.


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

KDE3Support

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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