\section{KFile\-Tree\-Branch Class Reference}
\label{classKFileTreeBranch}\index{KFileTreeBranch@{KFileTreeBranch}}
This is the branch class of the {\bf KFile\-Tree\-View}{\rm (p.\,\pageref{classKFileTreeView})}, which represents one branch in the treeview. Branch object for {\bf KFile\-Tree\-View}{\rm (p.\,\pageref{classKFileTreeView})} object.  


{\tt \#include $<$kfiletreebranch.h$>$}

Inheritance diagram for KFile\-Tree\-Branch:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=63pt]{classKFileTreeBranch__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KFile\-Tree\-Branch:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=268pt]{classKFileTreeBranch__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual bool {\bf populate} (const {\bf KURL} \&url, {\bf KFile\-Tree\-View\-Item} $\ast$curr\-Item)
\item 
virtual void {\bf set\-Show\-Extensions} (bool visible=true)
\item 
void {\bf set\-Open\-Pixmap} (const {\bf QPixmap} \&pix)\label{classKFileTreeBranch_i2}

\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf populate\-Finished} ({\bf KFile\-Tree\-View\-Item} $\ast$)
\item 
void {\bf new\-Tree\-View\-Items} ({\bf KFile\-Tree\-Branch} $\ast$, const {\bf KFile\-Tree\-View\-Item\-List} \&)
\item 
void {\bf directory\-Child\-Count} ({\bf KFile\-Tree\-View\-Item} $\ast$item, int count)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KFile\-Tree\-Branch} ({\bf KFile\-Tree\-View} $\ast$, const {\bf KURL} \&url, const {\bf QString} \&name, const {\bf QPixmap} \&pix, bool show\-Hidden=false, {\bf KFile\-Tree\-View\-Item} $\ast$branch\-Root=0)
\item 
{\bf KURL} {\bf root\-Url} () const 
\item 
virtual void {\bf set\-Root} ({\bf KFile\-Tree\-View\-Item} $\ast$r)
\item 
{\bf KFile\-Tree\-View\-Item} $\ast$ {\bf root} ()
\item 
{\bf QString} {\bf name} () const 
\item 
virtual void {\bf set\-Name} (const {\bf QString} n)
\item 
const {\bf QPixmap} \& {\bf pixmap} ()\label{classKFileTreeBranch_a6}

\item 
const {\bf QPixmap} \& {\bf open\-Pixmap} ()\label{classKFileTreeBranch_a7}

\item 
bool {\bf show\-Extensions} () const 
\item 
void {\bf set\-Open} (bool setopen=true)
\item 
void {\bf set\-Child\-Recurse} (bool t=true)
\item 
bool {\bf child\-Recurse} ()
\item 
virtual {\bf KFile\-Tree\-View\-Item} $\ast$ {\bf find\-TVIBy\-URL} (const {\bf KURL} \&)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf KFile\-Tree\-View\-Item} $\ast$ {\bf create\-Tree\-View\-Item} ({\bf KFile\-Tree\-View\-Item} $\ast${\bf parent}, {\bf KFile\-Item} $\ast$file\-Item)
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKFileTreeBranch_b1}

\end{CompactItemize}


\subsection{Detailed Description}
This is the branch class of the {\bf KFile\-Tree\-View}{\rm (p.\,\pageref{classKFileTreeView})}, which represents one branch in the treeview. Branch object for {\bf KFile\-Tree\-View}{\rm (p.\,\pageref{classKFileTreeView})} object. 

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.



Definition at line 48 of file kfiletreebranch.h.

\subsection{Constructor \& Destructor Documentation}
\index{KFileTreeBranch@{KFile\-Tree\-Branch}!KFileTreeBranch@{KFileTreeBranch}}
\index{KFileTreeBranch@{KFileTreeBranch}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Tree\-Branch::KFile\-Tree\-Branch ({\bf KFile\-Tree\-View} $\ast$, const {\bf KURL} \& {\em url}, const {\bf QString} \& {\em name}, const {\bf QPixmap} \& {\em pix}, bool {\em show\-Hidden} = {\tt false}, {\bf KFile\-Tree\-View\-Item} $\ast$ {\em branch\-Root} = {\tt 0})}\label{classKFileTreeBranch_a0}


constructs a branch for {\bf KFile\-Tree\-View}{\rm (p.\,\pageref{classKFileTreeView})}. 

Does not yet start to list it. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]start url of the branch. \item[{\em name}]the name of the branch, which is displayed in the first column of the treeview. \item[{\em pix}]is a pixmap to display as an icon of the branch. \item[{\em show\-Hidden}]flag to make hidden files visible or not. \item[{\em branch\-Root}]is the {\bf KFile\-Tree\-View\-Item}{\rm (p.\,\pageref{classKFileTreeViewItem})} to use as the root of the branch, with the default 0 meaning to let KFile\-Tree\-Branch create it for you. \end{description}
\end{Desc}


Definition at line 36 of file kfiletreebranch.cpp.

References QValue\-List::append(), KDir\-Lister::canceled(), KDir\-Lister::clear(), KDir\-Lister::completed(), QObject::connect(), KDir\-Lister::delete\-Item(), endl(), kd\-Debug(), name(), KDir\-Lister::new\-Items(), KURL::pretty\-URL(), KDir\-Lister::redirection(), KDir\-Lister::refresh\-Items(), QList\-View\-Item::set\-Expandable(), QList\-View\-Item::set\-Pixmap(), KDir\-Lister::set\-Showing\-Dot\-Files(), QList\-View\-Item::set\-Text(), and KDir\-Lister::started().

\subsection{Member Function Documentation}
\index{KFileTreeBranch@{KFile\-Tree\-Branch}!rootUrl@{rootUrl}}
\index{rootUrl@{rootUrl}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KURL} KFile\-Tree\-Branch::root\-Url () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileTreeBranch_a1}


\begin{Desc}
\item[Returns:]the root url of the branch. \end{Desc}


Definition at line 69 of file kfiletreebranch.h.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!setRoot@{setRoot}}
\index{setRoot@{setRoot}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KFile\-Tree\-Branch::set\-Root ({\bf KFile\-Tree\-View\-Item} $\ast$ {\em r})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKFileTreeBranch_a2}


sets a {\bf KFile\-Tree\-View\-Item}{\rm (p.\,\pageref{classKFileTreeViewItem})} as root widget for the branch. 

That must be created outside of the branch. All KFile\-Tree\-View\-Items the branch is allocating will become children of that object. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r}]the {\bf KFile\-Tree\-View\-Item}{\rm (p.\,\pageref{classKFileTreeViewItem})} to become the root item. \end{description}
\end{Desc}


Definition at line 77 of file kfiletreebranch.h.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!root@{root}}
\index{root@{root}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFile\-Tree\-View\-Item}$\ast$ KFile\-Tree\-Branch::root ()\hspace{0.3cm}{\tt  [inline]}}\label{classKFileTreeBranch_a3}


\begin{Desc}
\item[Returns:]the root item. \end{Desc}


Definition at line 82 of file kfiletreebranch.h.

Referenced by KFile\-Tree\-View::remove\-Branch().\index{KFileTreeBranch@{KFile\-Tree\-Branch}!name@{name}}
\index{name@{name}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Tree\-Branch::name () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileTreeBranch_a4}


\begin{Desc}
\item[Returns:]the name of the branch. \end{Desc}


Reimplemented from {\bf QObject}.

Definition at line 87 of file kfiletreebranch.h.

Referenced by KFile\-Tree\-View::branch(), and KFile\-Tree\-Branch().\index{KFileTreeBranch@{KFile\-Tree\-Branch}!setName@{setName}}
\index{setName@{setName}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KFile\-Tree\-Branch::set\-Name (const {\bf QString} {\em n})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKFileTreeBranch_a5}


sets the name of the branch. 



Definition at line 92 of file kfiletreebranch.h.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!showExtensions@{showExtensions}}
\index{showExtensions@{showExtensions}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Tree\-Branch::show\-Extensions () const}\label{classKFileTreeBranch_a8}


\begin{Desc}
\item[Returns:]whether the items in the branch show their file extensions in the tree or not. See set\-Show\-Extensions for more information. \end{Desc}


Definition at line 269 of file kfiletreebranch.cpp.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!setOpen@{setOpen}}
\index{setOpen@{setOpen}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Tree\-Branch::set\-Open (bool {\em setopen} = {\tt true})\hspace{0.3cm}{\tt  [inline]}}\label{classKFileTreeBranch_a9}


sets the root of the branch open or closed. 



Definition at line 120 of file kfiletreebranch.h.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!setChildRecurse@{setChildRecurse}}
\index{setChildRecurse@{setChildRecurse}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Tree\-Branch::set\-Child\-Recurse (bool {\em t} = {\tt true})}\label{classKFileTreeBranch_a10}


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 set\-Expandable. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]set to true to switch on child recursion \end{description}
\end{Desc}


Definition at line 256 of file kfiletreebranch.cpp.

References QValue\-List::clear().\index{KFileTreeBranch@{KFile\-Tree\-Branch}!childRecurse@{childRecurse}}
\index{childRecurse@{childRecurse}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Tree\-Branch::child\-Recurse ()\hspace{0.3cm}{\tt  [inline]}}\label{classKFileTreeBranch_a11}


\begin{Desc}
\item[Returns:]if child recursion is on or off. \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Child\-Recurse}{\rm (p.\,\pageref{classKFileTreeBranch_a10})} \end{Desc}


Definition at line 137 of file kfiletreebranch.h.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!populate@{populate}}
\index{populate@{populate}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Tree\-Branch::populate (const {\bf KURL} \& {\em url}, {\bf KFile\-Tree\-View\-Item} $\ast$ {\em curr\-Item})\hspace{0.3cm}{\tt  [virtual, slot]}}\label{classKFileTreeBranch_i0}


populates a branch. 

This method must be called after a branch was added to a {\bf KFile\-Tree\-View}{\rm (p.\,\pageref{classKFileTreeView})} using method add\-Branch. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]is the url of the root item where the branch starts. \item[{\em curr\-Item}]is the current parent. \end{description}
\end{Desc}


Definition at line 495 of file kfiletreebranch.cpp.

References QValue\-List::append(), endl(), kd\-Debug(), KDir\-Lister::open\-URL(), and KURL::pretty\-URL().\index{KFileTreeBranch@{KFile\-Tree\-Branch}!setShowExtensions@{setShowExtensions}}
\index{setShowExtensions@{setShowExtensions}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Tree\-Branch::set\-Show\-Extensions (bool {\em visible} = {\tt true})\hspace{0.3cm}{\tt  [virtual, slot]}}\label{classKFileTreeBranch_i1}


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. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em visible}]flags if the extensions should be visible or not. \end{description}
\end{Desc}


Definition at line 264 of file kfiletreebranch.cpp.\index{KFileTreeBranch@{KFile\-Tree\-Branch}!createTreeViewItem@{createTreeViewItem}}
\index{createTreeViewItem@{createTreeViewItem}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFile\-Tree\-View\-Item} $\ast$ KFile\-Tree\-Branch::create\-Tree\-View\-Item ({\bf KFile\-Tree\-View\-Item} $\ast$ {\em parent}, {\bf KFile\-Item} $\ast$ {\em file\-Item})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKFileTreeBranch_b0}


allocates a {\bf KFile\-Tree\-View\-Item}{\rm (p.\,\pageref{classKFileTreeViewItem})} for the branch for new items. 



Definition at line 239 of file kfiletreebranch.cpp.

References endl(), and kd\-Debug().\index{KFileTreeBranch@{KFile\-Tree\-Branch}!findTVIByURL@{findTVIByURL}}
\index{findTVIByURL@{findTVIByURL}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFile\-Tree\-View\-Item} $\ast$ KFile\-Tree\-Branch::find\-TVIBy\-URL (const {\bf KURL} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileTreeBranch_a12}


find the according {\bf KFile\-Tree\-View\-Item}{\rm (p.\,\pageref{classKFileTreeViewItem})} by an url 



Definition at line 368 of file kfiletreebranch.cpp.

References endl(), KURL::equals(), KFile\-Item::extra\-Data(), KDir\-Lister::find\-By\-URL(), kd\-Debug(), and KURL::url().\index{KFileTreeBranch@{KFile\-Tree\-Branch}!populateFinished@{populateFinished}}
\index{populateFinished@{populateFinished}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Tree\-Branch::populate\-Finished ({\bf KFile\-Tree\-View\-Item} $\ast$)\hspace{0.3cm}{\tt  [signal]}}\label{classKFileTreeBranch_l0}


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

\index{KFileTreeBranch@{KFile\-Tree\-Branch}!newTreeViewItems@{newTreeViewItems}}
\index{newTreeViewItems@{newTreeViewItems}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Tree\-Branch::new\-Tree\-View\-Items ({\bf KFile\-Tree\-Branch} $\ast$, const {\bf KFile\-Tree\-View\-Item\-List} \&)\hspace{0.3cm}{\tt  [signal]}}\label{classKFileTreeBranch_l1}


emitted with a list of new or updated {\bf KFile\-Tree\-View\-Item}{\rm (p.\,\pageref{classKFileTreeViewItem})} which were found in a branch. 

Note that this signal is emitted very often and may slow down the performance of the treeview ! \index{KFileTreeBranch@{KFile\-Tree\-Branch}!directoryChildCount@{directoryChildCount}}
\index{directoryChildCount@{directoryChildCount}!KFileTreeBranch@{KFile\-Tree\-Branch}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Tree\-Branch::directory\-Child\-Count ({\bf KFile\-Tree\-View\-Item} $\ast$ {\em item}, int {\em count})\hspace{0.3cm}{\tt  [signal]}}\label{classKFileTreeBranch_l2}


emitted with the exact count of children for a directory. 



The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kfiletreebranch.h\item 
kfiletreebranch.cpp\end{CompactItemize}
