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

KDE3Support

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

#include <kfiletreebranch.h>

Inheritance diagram for KFileTreeBranch:
Inheritance graph
[legend]

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 *)
 
- Signals inherited from KDirLister
void canceled ()
 
void canceled (const KUrl &_url)
 
void clear (const KUrl &_url)
 
void clear ()
 
void completed ()
 
void completed (const KUrl &_url)
 
QT_MOC_COMPAT void deleteItem (const KFileItem &_fileItem)
 
void infoMessage (const QString &msg)
 
void itemsAdded (const KUrl &directoryUrl, const KFileItemList &items)
 
void itemsDeleted (const KFileItemList &items)
 
void itemsFilteredByMime (const KFileItemList &items)
 
void newItems (const KFileItemList &items)
 
void percent (int percent)
 
void processedSize (KIO::filesize_t size)
 
void redirection (const KUrl &oldUrl, const KUrl &newUrl)
 
void redirection (const KUrl &_url)
 
void refreshItems (const QList< QPair< KFileItem, KFileItem > > &items)
 
void speed (int bytes_per_second)
 
void started (const KUrl &_url)
 
void totalSize (KIO::filesize_t size)
 

Public Member Functions

 KFileTreeBranch (K3FileTreeView *, const KUrl &url, const QString &name, const QPixmap &pix, bool showHidden=false, K3FileTreeViewItem *branchRoot=0)
 
bool childRecurse ()
 
virtual K3FileTreeViewItem * findTVIByUrl (const KUrl &)
 
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
 
- Public Member Functions inherited from KDirLister
 KDirLister (QObject *parent=0)
 
virtual ~KDirLister ()
 
bool autoErrorHandlingEnabled () const
 
bool autoUpdate () const
 
virtual void clearMimeFilter ()
 
bool delayedMimeTypes () const
 
KUrl::List directories () const
 
bool dirOnlyMode () const
 
virtual void emitChanges ()
 
virtual KFileItem findByName (const QString &name) const
 
virtual KFileItem findByUrl (const KUrl &_url) const
 
bool isFinished () const
 
KFileItemList items (WhichItems which=FilteredItems) const
 
KFileItemList itemsForDir (const KUrl &dir, WhichItems which=FilteredItems) const
 
QWidget * mainWindow ()
 
bool matchesFilter (const QString &name) const
 
bool matchesMimeFilter (const QString &mime) const
 
QStringList mimeFilters () const
 
QString nameFilter () const
 
virtual bool openUrl (const KUrl &_url, OpenUrlFlags _flags=NoFlags)
 
KFileItem rootItem () const
 
void setAutoErrorHandlingEnabled (bool enable, QWidget *parent)
 
virtual void setAutoUpdate (bool enable)
 
void setDelayedMimeTypes (bool delayedMimeTypes)
 
virtual void setDirOnlyMode (bool dirsOnly)
 
void setMainWindow (QWidget *window)
 
void setMimeExcludeFilter (const QStringList &mimeList)
 
virtual void setMimeFilter (const QStringList &mimeList)
 
virtual void setNameFilter (const QString &filter)
 
virtual void setShowingDotFiles (bool _showDotFiles)
 
bool showingDotFiles () const
 
virtual void stop ()
 
virtual void stop (const KUrl &_url)
 
virtual void updateDirectory (const KUrl &_dir)
 
KUrl url () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Member Functions

virtual K3FileTreeViewItem * createTreeViewItem (K3FileTreeViewItem *parent, const KFileItem &fileItem)
 
- Protected Member Functions inherited from KDirLister
virtual bool doMimeFilter (const QString &mime, const QStringList &filters) const
 
virtual bool doNameFilter (const QString &name, const QList< QRegExp > &filters) const
 
virtual void handleError (KIO::Job *)
 
virtual bool matchesFilter (const KFileItem &) const
 
virtual bool matchesMimeFilter (const KFileItem &) const
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Types inherited from KDirLister
enum  OpenUrlFlag
 
enum  WhichItems
 
- Static Public Member Functions inherited from KDirLister
static KFileItem cachedItemForUrl (const KUrl &url)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Types inherited from KDirLister
enum  Changes
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from KDirLister
bool autoErrorHandlingEnabled
 
bool autoUpdate
 
bool delayedMimeTypes
 
bool dirOnlyMode
 
QStringList mimeFilter
 
QString nameFilter
 
bool showingDotFiles
 
- Properties inherited from QObject
 objectName
 

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.

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
urlstart url of the branch.
namethe name of the branch, which is displayed in the first column of the treeview.
pixis a pixmap to display as an icon of the branch.
showHiddenflag to make hidden files visible or not.
branchRootis 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 
)
protectedvirtual

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 
)
virtualslot

populates a branch.

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

Parameters
urlis the url of the root item where the branch starts.
currItemis 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
tset 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
rthe K3FileTreeViewItem to become the root item.

Definition at line 100 of file kfiletreebranch.cpp.

void KFileTreeBranch::setShowExtensions ( bool  visible = true)
virtualslot

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
visibleflags 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal