21 #ifndef TDEFILE_TREE_VIEW_H
22 #define TDEFILE_TREE_VIEW_H
27 #include <tqstrlist.h>
28 #include <tqtooltip.h>
30 #include <tdelistview.h>
31 #include <kdirnotify.h>
32 #include <tdeio/job.h>
33 #include <tdefiletreeviewitem.h>
34 #include <tdefiletreebranch.h>
40 class TDEIO_EXPORT KFileTreeViewToolTip :
public TQToolTip
43 KFileTreeViewToolTip( TQListView *view ) : TQToolTip( view ), m_view( view ) {}
46 virtual void maybeTip(
const TQPoint & );
81 KURL currentURL()
const;
96 KFileTreeBranch* addBranch(
const KURL &path,
const TQString& name,
bool showHidden =
false );
101 virtual KFileTreeBranch* addBranch(
const KURL &path,
const TQString& name ,
102 const TQPixmap& pix,
bool showHidden =
false );
126 KFileTreeBranchList& branches();
147 KFileTreeViewItem *findItem(
const TQString& branchName,
const TQString& relUrl );
164 { m_wantOpenFolderPixmaps = showIt; }
171 virtual bool acceptDrag(TQDropEvent* event)
const;
172 virtual TQDragObject * dragObject();
174 virtual void startAnimation(
KFileTreeViewItem* item,
const char * iconBaseName =
"kde", uint iconCount = 6 );
176 virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
177 virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
178 virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
179 virtual void contentsDropEvent( TQDropEvent *ev );
183 const KFileTreeViewItemList& );
185 virtual void slotSetNextUrlToSelect(
const KURL &url )
186 { m_nextUrlToSelect = url; }
191 void slotExecuted( TQListViewItem * );
192 void slotExpanded( TQListViewItem * );
193 void slotCollapsed( TQListViewItem *item );
195 void slotSelectionChanged();
197 void slotAnimation();
199 void slotAutoOpenFolder();
201 void slotOnItem( TQListViewItem * );
202 void slotItemRenamed(TQListViewItem*,
const TQString &,
int);
209 void onItem(
const TQString& );
211 void dropped( TQWidget*, TQDropEvent* );
212 void dropped( TQWidget*, TQDropEvent*, KURL::List& );
213 void dropped( KURL::List&, KURL& );
215 void dropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& );
217 void dropped( TQDropEvent *e, TQListViewItem * after);
218 void dropped(
KFileTreeView *, TQDropEvent *, TQListViewItem *);
219 void dropped(TQDropEvent *e, TQListViewItem * parent, TQListViewItem * after);
220 void dropped(
KFileTreeView *, TQDropEvent *, TQListViewItem *, TQListViewItem *);
223 KURL m_nextUrlToSelect;
228 bool isValidItem( TQListViewItem *item);
233 KFileTreeBranchList m_branches;
238 AnimationInfo(
const char * _iconBaseName, uint _iconCount,
const TQPixmap & _originalPixmap )
239 : iconBaseName(_iconBaseName), iconCount(_iconCount), iconNumber(1), originalPixmap(_originalPixmap) {}
240 AnimationInfo() : iconCount(0) {}
241 TQCString iconBaseName;
244 TQPixmap originalPixmap;
246 typedef TQMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
247 MapCurrentOpeningFolders m_mapCurrentOpeningFolders;
250 TQTimer *m_animationTimer;
255 bool m_wantOpenFolderPixmaps;
257 TQListViewItem *m_currentBeforeDropItem;
258 TQListViewItem *m_dropItem;
259 TQStrList m_lstDropFormats;
260 TQPixmap m_openFolderPixmap;
261 TQTimer *m_autoOpenTimer;
263 KFileTreeViewToolTip m_toolTip;
267 virtual void virtual_hook(
int id,
void* data );
269 class KFileTreeViewPrivate;
270 KFileTreeViewPrivate *d;
This is the branch class of the KFileTreeView, which represents one branch in the treeview.
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...
bool showFolderOpenPixmap() const
virtual void setShowFolderOpenPixmap(bool showIt=true)
set the flag to show 'extended' folder icons on or off.