26 #include <tdelibs_export.h>
35 class TDEUI_EXPORT
KTabBar:
public TQTabBar
40 KTabBar( TQWidget* parent=0,
const char* name=0 );
43 virtual void setTabEnabled(
int,
bool );
45 const TQColor &tabColor(
int )
const;
46 void setTabColor(
int,
const TQColor& );
47 void resetTabColor(
int );
49 virtual int insertTab( TQTab *,
int index = -1 );
50 virtual void removeTab( TQTab * );
52 void setTabReorderingEnabled(
bool enable );
53 bool isTabReorderingEnabled()
const;
55 void setHoverCloseButton(
bool );
56 bool hoverCloseButton()
const;
58 void setHoverCloseButtonDelayed(
bool );
59 bool hoverCloseButtonDelayed()
const;
61 void setTabCloseActivatePrevious(
bool );
62 bool tabCloseActivatePrevious()
const;
65 void contextMenu(
int,
const TQPoint & );
66 void mouseDoubleClick(
int );
67 void mouseMiddleClick(
int );
68 void initiateDrag(
int );
69 void testCanDecode(
const TQDragMoveEvent *e,
bool &accept );
70 void receivedDropEvent(
int, TQDropEvent * );
71 void moveTab(
int,
int );
72 void closeRequest(
int );
73 #ifndef TQT_NO_WHEELEVENT
74 void wheelDelta(
int );
78 virtual void mouseDoubleClickEvent( TQMouseEvent *e );
79 virtual void mousePressEvent( TQMouseEvent *e );
80 virtual void mouseMoveEvent( TQMouseEvent *e );
81 virtual void mouseReleaseEvent( TQMouseEvent *e );
82 #ifndef TQT_NO_WHEELEVENT
83 virtual void wheelEvent( TQWheelEvent *e );
86 virtual void dragMoveEvent( TQDragMoveEvent *e );
87 virtual void dropEvent( TQDropEvent *e );
89 virtual void paintLabel( TQPainter*,
const TQRect&, TQTab*,
bool )
const;
92 virtual void closeButtonClicked();
93 virtual void onLayoutChange();
94 virtual void enableCloseButton();
95 virtual void activateDragSwitchTab();
100 int mReorderPreviousTab;
101 TQMap<int, TQColor> mTabColors;
102 TQTab *mHoverCloseButtonTab, *mDragSwitchTab;
103 TQPushButton *mHoverCloseButton;
104 TQTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
106 bool mHoverCloseButtonEnabled;
107 bool mHoverCloseButtonDelayed;
108 bool mTabReorderingEnabled;
109 bool mTabCloseActivatePrevious;