• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KTabWidget Class Reference

#include <ktabwidget.h>

Inherits TQTabWidget.

Public Slots

virtual void moveTab (int, int)
 
virtual void removePage (TQWidget *w)
 
void setTabReorderingEnabled (bool enable)
 
void setHoverCloseButton (bool enable)
 
void setHoverCloseButtonDelayed (bool delayed)
 
void setTabCloseActivatePrevious (bool previous)
 
void setAutomaticResizeTabs (bool enable)
 

Signals

void testCanDecode (const TQDragMoveEvent *e, bool &accept)
 
void receivedDropEvent (TQDropEvent *)
 
void receivedDropEvent (TQWidget *, TQDropEvent *)
 
void initiateDrag (TQWidget *)
 
void contextMenu (const TQPoint &)
 
void contextMenu (TQWidget *, const TQPoint &)
 
void movedTab (int, int)
 
void mouseDoubleClick ()
 
void mouseDoubleClick (TQWidget *)
 
void mouseMiddleClick ()
 
void mouseMiddleClick (TQWidget *)
 
void closeRequest (TQWidget *)
 

Public Member Functions

 KTabWidget (TQWidget *parent=0, const char *name=0, WFlags f=0)
 
virtual ~KTabWidget ()
 
void setTabColor (TQWidget *, const TQColor &color)
 
void resetTabColor (TQWidget *)
 
TQColor tabColor (TQWidget *) const
 
bool isTabReorderingEnabled () const
 
bool hoverCloseButton () const
 
bool hoverCloseButtonDelayed () const
 
bool tabCloseActivatePrevious () const
 
bool automaticResizeTabs () const
 
void setTabBarHidden (bool hide)
 
bool isTabBarHidden () const
 
void setMouseWheelScroll (bool mouseWheelScroll)
 
virtual void insertTab (TQWidget *, const TQString &, int index=-1)
 
virtual void insertTab (TQWidget *child, const TQIconSet &iconset, const TQString &label, int index=-1)
 
virtual void insertTab (TQWidget *, TQTab *, int index=-1)
 
void changeTab (TQWidget *, const TQString &)
 
void changeTab (TQWidget *child, const TQIconSet &iconset, const TQString &label)
 
TQString label (int) const
 
TQString tabLabel (TQWidget *) const
 
void setTabLabel (TQWidget *, const TQString &)
 

Protected Slots

virtual void receivedDropEvent (int, TQDropEvent *)
 
virtual void initiateDrag (int)
 
virtual void contextMenu (int, const TQPoint &)
 
virtual void mouseDoubleClick (int)
 
virtual void mouseMiddleClick (int)
 
virtual void closeRequest (int)
 
virtual void wheelDelta (int)
 

Protected Member Functions

virtual void mouseDoubleClickEvent (TQMouseEvent *e)
 
virtual void mousePressEvent (TQMouseEvent *)
 
virtual void dragMoveEvent (TQDragMoveEvent *)
 
virtual void dropEvent (TQDropEvent *)
 
unsigned int tabBarWidthForMaxChars (uint maxLength)
 
virtual void wheelEvent (TQWheelEvent *e)
 
virtual void resizeEvent (TQResizeEvent *)
 

Detailed Description

A widget containing multiple tabs.

Since
3.2

Definition at line 36 of file ktabwidget.h.

Constructor & Destructor Documentation

◆ KTabWidget()

KTabWidget::KTabWidget ( TQWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

Definition at line 52 of file ktabwidget.cpp.

◆ ~KTabWidget()

KTabWidget::~KTabWidget ( )
virtual

Destructor.

Definition at line 74 of file ktabwidget.cpp.

Member Function Documentation

◆ automaticResizeTabs()

bool KTabWidget::automaticResizeTabs ( ) const

Returns true if calling setTitle() will resize tabs to the width of the tab bar.

Since
3.4

Definition at line 524 of file ktabwidget.cpp.

◆ changeTab() [1/2]

void KTabWidget::changeTab ( TQWidget *  w,
const TQString &  label 
)

Reimplemented for internal reasons.

Definition at line 200 of file ktabwidget.cpp.

◆ changeTab() [2/2]

void KTabWidget::changeTab ( TQWidget *  child,
const TQIconSet &  iconset,
const TQString &  label 
)

Reimplemented for internal reasons.

Definition at line 212 of file ktabwidget.cpp.

◆ closeRequest [1/2]

void KTabWidget::closeRequest ( int  index)
protectedvirtualslot

Definition at line 529 of file ktabwidget.cpp.

◆ closeRequest [2/2]

void KTabWidget::closeRequest ( TQWidget *  )
signal

The close button of a widget's tab was clicked. This signal is only possible after you have called setHoverCloseButton( true ).

◆ contextMenu [1/3]

void KTabWidget::contextMenu ( const TQPoint &  )
signal

The right mouse button was pressed over empty space besides tabbar.

◆ contextMenu [2/3]

void KTabWidget::contextMenu ( int  index,
const TQPoint &  p 
)
protectedvirtualslot

Definition at line 404 of file ktabwidget.cpp.

◆ contextMenu [3/3]

void KTabWidget::contextMenu ( TQWidget *  ,
const TQPoint &   
)
signal

The right mouse button was pressed over a widget.

◆ dragMoveEvent()

void KTabWidget::dragMoveEvent ( TQDragMoveEvent *  e)
protectedvirtual

Definition at line 313 of file ktabwidget.cpp.

◆ dropEvent()

void KTabWidget::dropEvent ( TQDropEvent *  e)
protectedvirtual

Definition at line 327 of file ktabwidget.cpp.

◆ hoverCloseButton()

bool KTabWidget::hoverCloseButton ( ) const

Returns true if the close button is shown on tabs when mouse is hovering over them.

Definition at line 492 of file ktabwidget.cpp.

◆ hoverCloseButtonDelayed()

bool KTabWidget::hoverCloseButtonDelayed ( ) const

Returns true if the close button is shown on tabs after a delay.

Definition at line 502 of file ktabwidget.cpp.

◆ initiateDrag [1/2]

void KTabWidget::initiateDrag ( int  index)
protectedvirtualslot

Definition at line 399 of file ktabwidget.cpp.

◆ initiateDrag [2/2]

void KTabWidget::initiateDrag ( TQWidget *  )
signal

Request to start a drag operation on the given tab.

◆ insertTab() [1/3]

void KTabWidget::insertTab ( TQWidget *  child,
const TQString &  label,
int  index = -1 
)
virtual

Reimplemented for internal reasons.

Definition at line 79 of file ktabwidget.cpp.

◆ insertTab() [2/3]

void KTabWidget::insertTab ( TQWidget *  child,
TQTab *  tab,
int  index = -1 
)
virtual

Reimplemented for internal reasons.

Definition at line 89 of file ktabwidget.cpp.

◆ insertTab() [3/3]

void KTabWidget::insertTab ( TQWidget *  child,
const TQIconSet &  iconset,
const TQString &  label,
int  index = -1 
)
virtual

Reimplemented for internal reasons.

Definition at line 84 of file ktabwidget.cpp.

◆ isTabBarHidden()

bool KTabWidget::isTabBarHidden ( ) const

Returns true if the tabbar is hidden.

Since
3.4

Definition at line 120 of file ktabwidget.cpp.

◆ isTabReorderingEnabled()

bool KTabWidget::isTabReorderingEnabled ( ) const

Returns true if tab ordering with the middle mouse button has been enabled.

Definition at line 161 of file ktabwidget.cpp.

◆ label()

TQString KTabWidget::label ( int  index) const

Reimplemented for internal reasons.

Definition at line 224 of file ktabwidget.cpp.

◆ mouseDoubleClick [1/3]

void KTabWidget::mouseDoubleClick ( )
signal

A double left mouse button click was performed over empty space besides tabbar.

Since
3.3

◆ mouseDoubleClick [2/3]

void KTabWidget::mouseDoubleClick ( int  index)
protectedvirtualslot

Definition at line 409 of file ktabwidget.cpp.

◆ mouseDoubleClick [3/3]

void KTabWidget::mouseDoubleClick ( TQWidget *  )
signal

A double left mouse button click was performed over the widget.

◆ mouseDoubleClickEvent()

void KTabWidget::mouseDoubleClickEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 366 of file ktabwidget.cpp.

◆ mouseMiddleClick [1/3]

void KTabWidget::mouseMiddleClick ( )
signal

A middle mouse button click was performed over empty space besides tabbar.

◆ mouseMiddleClick [2/3]

void KTabWidget::mouseMiddleClick ( int  index)
protectedvirtualslot

Definition at line 414 of file ktabwidget.cpp.

◆ mouseMiddleClick [3/3]

void KTabWidget::mouseMiddleClick ( TQWidget *  )
signal

A middle mouse button click was performed over the widget.

◆ mousePressEvent()

void KTabWidget::mousePressEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 378 of file ktabwidget.cpp.

◆ movedTab

void KTabWidget::movedTab ( int  ,
int   
)
signal

A tab was moved from first to second index. This signal is only possible after you have called setTabReorderingEnabled( true ).

◆ moveTab

void KTabWidget::moveTab ( int  from,
int  to 
)
virtualslot

Move a widget's tab from first to second specified index and emit signal movedTab( int, int ) afterwards.

Definition at line 419 of file ktabwidget.cpp.

◆ receivedDropEvent [1/3]

void KTabWidget::receivedDropEvent ( int  index,
TQDropEvent *  e 
)
protectedvirtualslot

Definition at line 394 of file ktabwidget.cpp.

◆ receivedDropEvent [2/3]

void KTabWidget::receivedDropEvent ( TQDropEvent *  )
signal

Received an event in the empty space beside tabbar. Usually creates a new tab. This signal is only possible after testCanDecode and positive accept result.

◆ receivedDropEvent [3/3]

void KTabWidget::receivedDropEvent ( TQWidget *  ,
TQDropEvent *   
)
signal

Received an drop event on given widget's tab. This signal is only possible after testCanDecode and positive accept result.

◆ removePage

void KTabWidget::removePage ( TQWidget *  w)
virtualslot

Removes the widget, reimplemented for internal reasons (keeping labels in sync).

Definition at line 454 of file ktabwidget.cpp.

◆ resetTabColor()

void KTabWidget::resetTabColor ( TQWidget *  w)

Reset the color of the tab of the given widget.

Definition at line 138 of file ktabwidget.cpp.

◆ resizeEvent()

void KTabWidget::resizeEvent ( TQResizeEvent *  e)
protectedvirtual

Definition at line 534 of file ktabwidget.cpp.

◆ setAutomaticResizeTabs

void KTabWidget::setAutomaticResizeTabs ( bool  enable)
slot

If enable is true, tabs will be resized to the width of the tab bar.

Does not work reliable with "TQTabWidget* foo=new KTabWidget()" and if you change tabs via the tabbar or by accessing tabs directly.

Since
3.4

Definition at line 507 of file ktabwidget.cpp.

◆ setHoverCloseButton

void KTabWidget::setHoverCloseButton ( bool  enable)
slot

If enable is true, a close button will be shown on mouse hover over tab icons which will emit signal closeRequest( TQWidget * ) when pressed.

Definition at line 487 of file ktabwidget.cpp.

◆ setHoverCloseButtonDelayed

void KTabWidget::setHoverCloseButtonDelayed ( bool  delayed)
slot

If delayed is true, a close button will be shown on mouse hover over tab icons after mouse double click delay else immediately.

Definition at line 497 of file ktabwidget.cpp.

◆ setMouseWheelScroll()

void KTabWidget::setMouseWheelScroll ( bool  mouseWheelScroll)

Enable/disable "scroll tabs on mouse wheel event" functionality mouseWheelScroll true -> scroll enabled, false -> scroll disabled

Since
14.0

Definition at line 125 of file ktabwidget.cpp.

◆ setTabBarHidden()

void KTabWidget::setTabBarHidden ( bool  hide)

If hide is true, the tabbar is hidden along with any corner widgets.

Since
3.4

Definition at line 104 of file ktabwidget.cpp.

◆ setTabCloseActivatePrevious

void KTabWidget::setTabCloseActivatePrevious ( bool  previous)
slot

If previous is true, closing the current tab activates the previous active tab instead of the one to the right.

Since
3.3

Definition at line 166 of file ktabwidget.cpp.

◆ setTabColor()

void KTabWidget::setTabColor ( TQWidget *  w,
const TQColor &  color 
)

Set the tab of the given widget to color.

Definition at line 130 of file ktabwidget.cpp.

◆ setTabLabel()

void KTabWidget::setTabLabel ( TQWidget *  w,
const TQString &  l 
)

Reimplemented for internal reasons.

Definition at line 249 of file ktabwidget.cpp.

◆ setTabReorderingEnabled

void KTabWidget::setTabReorderingEnabled ( bool  enable)
slot

If enable is true, tab reordering with middle button will be enabled.

Note that once enabled you shouldn't rely on previously queried currentPageIndex() or indexOf( TQWidget * ) values anymore.

You can connect to signal movedTab(int, int) which will notify you from which index to which index a tab has been moved.

Definition at line 156 of file ktabwidget.cpp.

◆ tabBarWidthForMaxChars()

unsigned int KTabWidget::tabBarWidthForMaxChars ( uint  maxLength)
protected

Definition at line 176 of file ktabwidget.cpp.

◆ tabCloseActivatePrevious()

bool KTabWidget::tabCloseActivatePrevious ( ) const

Returns true if closing the current tab activates the previous actice tab instead of the one to the right.

Since
3.3

Definition at line 171 of file ktabwidget.cpp.

◆ tabColor()

TQColor KTabWidget::tabColor ( TQWidget *  w) const

Returns the tab color for the given widget.

Definition at line 146 of file ktabwidget.cpp.

◆ tabLabel()

TQString KTabWidget::tabLabel ( TQWidget *  w) const

Reimplemented for internal reasons.

Definition at line 236 of file ktabwidget.cpp.

◆ testCanDecode

void KTabWidget::testCanDecode ( const TQDragMoveEvent *  e,
bool &  accept 
)
signal

Connect to this and set accept to true if you can and want to decode the event.

◆ wheelDelta

void KTabWidget::wheelDelta ( int  delta)
protectedvirtualslot

Definition at line 348 of file ktabwidget.cpp.

◆ wheelEvent()

void KTabWidget::wheelEvent ( TQWheelEvent *  e)
protectedvirtual

Definition at line 337 of file ktabwidget.cpp.


The documentation for this class was generated from the following files:
  • ktabwidget.h
  • ktabwidget.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.