22 #ifndef TDEFILE_TREE_BRANCH_H
23 #define TDEFILE_TREE_BRANCH_H
26 #include <tqlistview.h>
28 #include <tdefileitem.h>
29 #include <tdeio/global.h>
30 #include <kdirlister.h>
31 #include <tdeio/job.h>
32 #include <tdefiletreeviewitem.h>
63 const TQPixmap& pix,
bool showHidden =
false,
69 KURL
rootUrl()
const {
return( m_startURL ); }
87 TQString
name()
const {
return( m_name ); }
92 virtual void setName(
const TQString n ) { m_name = n; };
99 const TQPixmap& pixmap(){
return(m_rootIcon); }
109 const TQPixmap& openPixmap() {
return(m_openRootIcon); }
115 bool showExtensions( )
const;
121 {
if( root() ) root()->setOpen( setopen ); }
131 void setChildRecurse(
bool t=
true );
138 {
return m_recurseChildren; }
155 virtual void setShowExtensions(
bool visible =
true );
157 void setOpenPixmap(
const TQPixmap& pix );
165 KFileItem *fileItem );
192 void slotRefreshItems(
const KFileItemList& );
193 void addItems(
const KFileItemList& );
194 void slCompleted(
const KURL& );
195 void slotCanceled(
const KURL& );
196 void slotListerStarted(
const KURL& );
197 void slotDeleteItem( KFileItem* );
198 void slotDirlisterClear();
199 void slotDirlisterClearURL(
const KURL& url );
200 void slotRedirect(
const KURL& oldUrl,
const KURL&newUrl );
204 static void deleteChildrenOf( TQListViewItem *parent );
210 TQPixmap m_openRootIcon;
213 KURL::List m_openChildrenURLs;
220 bool m_recurseChildren :1;
221 bool m_showExtensions :1;
224 virtual void virtual_hook(
int id,
void* data );
226 class KFileTreeBranchPrivate;
227 KFileTreeBranchPrivate *d;
234 typedef TQPtrList<KFileTreeBranch> KFileTreeBranchList;
239 typedef TQPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
This is the branch class of the KFileTreeView, which represents one branch in the treeview.
void newTreeViewItems(KFileTreeBranch *, const KFileTreeViewItemList &)
emitted with a list of new or updated KFileTreeViewItem which were found in a branch.
virtual void setName(const TQString n)
sets the name of the branch.
virtual void setRoot(KFileTreeViewItem *r)
sets a KFileTreeViewItem as root widget for the branch.
void setOpen(bool setopen=true)
sets the root of the branch open or closed.
KFileTreeViewItem * root()
void populateFinished(KFileTreeViewItem *)
emitted with the item of a directory which was finished to populate
void directoryChildCount(KFileTreeViewItem *item, int count)
emitted with the exact count of children for a directory.
An item for a KFileTreeView that knows about its own KFileItem.
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files an...