00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __konq_tabs_h__
00023 #define __konq_tabs_h__
00024
00025 #include "konq_frame.h"
00026
00027 #include <ktabwidget.h>
00028
00029 class TQPixmap;
00030 class TQPopupMenu;
00031 class TQToolButton;
00032
00033 class KonqView;
00034 class KonqViewManager;
00035 class KonqFrameBase;
00036 class KonqFrame;
00037 class KonqFrameContainerBase;
00038 class KonqFrameContainer;
00039 class KConfig;
00040 class KSeparator;
00041 class KProgress;
00042 class KAction;
00043
00044 class KonqFrameTabs : public KTabWidget, public KonqFrameContainerBase
00045 {
00046 Q_OBJECT
00047 friend class KonqFrame;
00048
00049 public:
00050 KonqFrameTabs(TQWidget* parent, KonqFrameContainerBase* parentContainer,
00051 KonqViewManager* viewManager, const char * name = 0);
00052 virtual ~KonqFrameTabs();
00053
00054 virtual void listViews( ChildViewList *viewList );
00055
00056 virtual void saveConfig( KConfig* config, const TQString &prefix, bool saveURLs,
00057 KonqFrameBase* docContainer, int id = 0, int depth = 0 );
00058 virtual void copyHistory( KonqFrameBase *other );
00059
00060 virtual void printFrameInfo( const TQString& spaces );
00061
00062 TQPtrList<KonqFrameBase>* childFrameList() { return m_pChildFrameList; }
00063
00064 virtual void setTitle( const TQString &title, TQWidget* sender );
00065 virtual void setTabIcon( const KURL &url, TQWidget* sender );
00066
00067 virtual TQWidget* widget() { return this; }
00068 virtual TQCString frameType() { return TQCString("Tabs"); }
00069
00070 void activateChild();
00071
00075 void insertChildFrame( KonqFrameBase * frame, int index = -1);
00076
00080 void removeChildFrame( KonqFrameBase * frame );
00081
00082
00083 virtual void reparentFrame(TQWidget * parent,
00084 const TQPoint & p, bool showIt=FALSE );
00085
00086 void moveTabBackward(int index);
00087 void moveTabForward(int index);
00088
00089
00090 public slots:
00091 void slotCurrentChanged( TQWidget* newPage );
00092 void setAlwaysTabbedMode( bool );
00093
00094 signals:
00095 void ctrlTabPressed();
00096 void removeTabPopup();
00097
00098 protected:
00099 void refreshSubPopupMenuTab();
00100 void hideTabBar();
00101
00102 TQPtrList<KonqFrameBase>* m_pChildFrameList;
00103
00104 private slots:
00105 void slotContextMenu( const TQPoint& );
00106 void slotContextMenu( TQWidget*, const TQPoint& );
00107 void slotCloseRequest( TQWidget* );
00108 void slotMovedTab( int, int );
00109 void slotMouseMiddleClick();
00110 void slotMouseMiddleClick( TQWidget* );
00111
00112 void slotTestCanDecode(const TQDragMoveEvent *e, bool &accept );
00113 void slotReceivedDropEvent( TQDropEvent* );
00114 void slotInitiateDrag( TQWidget * );
00115 void slotReceivedDropEvent( TQWidget *, TQDropEvent * );
00116 void slotSubPopupMenuTabActivated( int );
00117
00118 private:
00119 KonqViewManager* m_pViewManager;
00120 TQPopupMenu* m_pPopupMenu;
00121 TQPopupMenu* m_pSubPopupMenuTab;
00122 TQToolButton* m_rightWidget;
00123 TQToolButton* m_leftWidget;
00124 bool m_permanentCloseButtons;
00125 bool m_alwaysTabBar;
00126 bool m_MouseMiddleClickClosesTab;
00127 int m_closeOtherTabsId;
00128 };
00129
00130 #endif