#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 &) |
Detailed Description
Constructor & Destructor Documentation
◆ ~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
|
signal |
The close button of a widget's tab was clicked. This signal is only possible after you have called setHoverCloseButton( true ).
◆ contextMenu [1/2]
|
signal |
The right mouse button was pressed over empty space besides tabbar.
◆ contextMenu [2/2]
|
signal |
The right mouse button was pressed over a widget.
◆ 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
|
signal |
Request to start a drag operation on the given tab.
◆ insertTab() [1/3]
|
virtual |
Reimplemented for internal reasons.
Definition at line 79 of file ktabwidget.cpp.
◆ insertTab() [2/3]
|
virtual |
Reimplemented for internal reasons.
Definition at line 89 of file ktabwidget.cpp.
◆ insertTab() [3/3]
|
virtual |
Reimplemented for internal reasons.
Definition at line 84 of file ktabwidget.cpp.
◆ isTabBarHidden()
bool KTabWidget::isTabBarHidden | ( | ) | const |
◆ 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/2]
|
signal |
A double left mouse button click was performed over empty space besides tabbar.
- Since
- 3.3
◆ mouseDoubleClick [2/2]
|
signal |
A double left mouse button click was performed over the widget.
◆ mouseMiddleClick [1/2]
|
signal |
A middle mouse button click was performed over empty space besides tabbar.
◆ mouseMiddleClick [2/2]
|
signal |
A middle mouse button click was performed over the widget.
◆ movedTab
|
signal |
A tab was moved from first to second index. This signal is only possible after you have called setTabReorderingEnabled( true ).
◆ moveTab
|
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/2]
|
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 [2/2]
|
signal |
Received an drop event on given widget's tab. This signal is only possible after testCanDecode and positive accept result.
◆ removePage
|
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.
◆ setAutomaticResizeTabs
|
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
|
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
|
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
|
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
|
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.
◆ 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
|
signal |
Connect to this and set accept to true if you can and want to decode the event.
The documentation for this class was generated from the following files: