24 #include <tqtabwidget.h>
25 #include <tqstringlist.h>
27 #include <tdelibs_export.h>
29 class KTabWidgetPrivate;
39 TQ_PROPERTY(
bool tabReorderingEnabled READ isTabReorderingEnabled WRITE setTabReorderingEnabled )
40 TQ_PROPERTY(
bool hoverCloseButton READ hoverCloseButton WRITE setHoverCloseButton )
41 TQ_PROPERTY(
bool hoverCloseButtonDelayed READ hoverCloseButtonDelayed WRITE setHoverCloseButtonDelayed )
42 TQ_PROPERTY(
bool tabCloseActivatePrevious READ tabCloseActivatePrevious WRITE setTabCloseActivatePrevious )
43 TQ_PROPERTY(
bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs )
46 KTabWidget( TQWidget *parent = 0,
const char *name = 0, WFlags f = 0 );
56 void setTabColor( TQWidget *,
const TQColor& color );
61 void resetTabColor( TQWidget * );
66 TQColor tabColor( TQWidget * )
const;
72 bool isTabReorderingEnabled()
const;
78 bool hoverCloseButton()
const;
84 bool hoverCloseButtonDelayed()
const;
91 bool tabCloseActivatePrevious()
const;
98 bool automaticResizeTabs()
const;
105 void setTabBarHidden(
bool hide );
111 bool isTabBarHidden()
const;
118 void setMouseWheelScroll(
bool mouseWheelScroll);
123 virtual void insertTab( TQWidget *,
const TQString &,
int index = -1 );
128 virtual void insertTab( TQWidget *child,
const TQIconSet& iconset,
129 const TQString &label,
int index = -1 );
133 virtual void insertTab( TQWidget *, TQTab *,
int index = -1 );
138 void changeTab( TQWidget *,
const TQString & );
143 void changeTab( TQWidget *child,
const TQIconSet& iconset,
const TQString &label );
148 TQString label(
int )
const;
153 TQString tabLabel( TQWidget * )
const;
158 void setTabLabel( TQWidget *,
const TQString & );
165 virtual void moveTab(
int,
int );
171 virtual void removePage ( TQWidget * w );
182 void setTabReorderingEnabled(
bool enable );
189 void setHoverCloseButton(
bool enable );
195 void setHoverCloseButtonDelayed(
bool delayed );
202 void setTabCloseActivatePrevious(
bool previous );
211 void setAutomaticResizeTabs(
bool enable );
280 virtual void mouseDoubleClickEvent( TQMouseEvent *e );
281 virtual void mousePressEvent( TQMouseEvent * );
282 virtual void dragMoveEvent( TQDragMoveEvent * );
283 virtual void dropEvent( TQDropEvent * );
284 unsigned int tabBarWidthForMaxChars( uint maxLength );
285 #ifndef TQT_NO_WHEELEVENT
286 virtual void wheelEvent( TQWheelEvent *e );
288 virtual void resizeEvent( TQResizeEvent * );
291 virtual void receivedDropEvent(
int, TQDropEvent * );
292 virtual void initiateDrag(
int );
293 virtual void contextMenu(
int,
const TQPoint & );
294 virtual void mouseDoubleClick(
int );
295 virtual void mouseMiddleClick(
int );
296 virtual void closeRequest(
int );
297 #ifndef TQT_NO_WHEELEVENT
298 virtual void wheelDelta(
int );
302 bool isEmptyTabbarSpace(
const TQPoint & )
const;
303 void resizeTabs(
int changedTabIndex = -1 );
304 void updateTab(
int index );
306 KTabWidgetPrivate *d;