00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef konq_treetoplevelitem_h
00020 #define konq_treetoplevelitem_h
00021
00022 #include "konq_sidebartreeitem.h"
00023
00024 class TQStrList;
00025 class KonqSidebarTreeModule;
00026
00033 class KonqSidebarTreeTopLevelItem : public KonqSidebarTreeItem
00034 {
00035 public:
00041 KonqSidebarTreeTopLevelItem( KonqSidebarTree *parent, KonqSidebarTreeModule * module, const TQString & path )
00042 : KonqSidebarTreeItem(parent, 0L), m_module(module), m_path(path), m_bTopLevelGroup(false) { init(); }
00043
00049 KonqSidebarTreeTopLevelItem( KonqSidebarTreeItem *parentItem, KonqSidebarTreeModule * module, const TQString & path )
00050 : KonqSidebarTreeItem( parentItem, 0L), m_module(module), m_path(path), m_bTopLevelGroup(false) { init(); }
00051
00052 void init();
00053
00054 virtual bool acceptsDrops( const TQStrList & formats );
00055 virtual void drop( TQDropEvent * ev );
00056 virtual TQDragObject * dragObject( TQWidget * parent, bool move = false );
00057 virtual void middleButtonClicked();
00058 virtual void rightButtonPressed();
00059
00060 virtual void paste();
00061 virtual void trash();
00062 virtual void del();
00063 virtual void shred();
00064 virtual void rename();
00065 virtual void rename( const TQString & name );
00066
00067 virtual void setOpen( bool open );
00068
00069
00070 virtual bool isTopLevelItem() const { return true; }
00071
00072 virtual KURL externalURL() const { return m_externalURL; }
00073
00074 virtual TQString toolTipText() const;
00075
00076 virtual void itemSelected();
00077
00078
00079
00080 void setExternalURL( const KURL & url ) { m_externalURL = url; }
00081
00082
00083 void setTopLevelGroup( bool b ) { m_bTopLevelGroup = b; }
00084 bool isTopLevelGroup() const { return m_bTopLevelGroup; }
00085
00086
00087 KonqSidebarTreeModule *module() const { return m_module; }
00088
00089
00090 TQString path() const { return m_path; }
00091
00092 protected:
00093 void delOperation( int method );
00094 KonqSidebarTreeModule *m_module;
00095 TQString m_path;
00096 TQString m_comment;
00097 KURL m_externalURL;
00098 bool m_bTopLevelGroup;
00099 };
00100
00101 #endif