#include <ktabwidget.h>

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) |
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
Constructor & Destructor Documentation
KTabWidget::~KTabWidget | ( | ) | [virtual] |
Destructor.
Definition at line 74 of file ktabwidget.cpp.
Member Function Documentation
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 516 of file ktabwidget.cpp.
void KTabWidget::changeTab | ( | TQWidget * | w, |
const TQString & | label | ||
) |
Reimplemented for internal reasons.
Reimplemented from TQTabWidget.
Definition at line 192 of file ktabwidget.cpp.
void KTabWidget::changeTab | ( | TQWidget * | child, |
const TQIconSet & | iconset, | ||
const TQString & | label | ||
) |
Reimplemented for internal reasons.
Reimplemented from TQTabWidget.
Definition at line 204 of file ktabwidget.cpp.
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 ).
void KTabWidget::contextMenu | ( | const TQPoint & | ) | [signal] |
The right mouse button was pressed over empty space besides tabbar.
void KTabWidget::contextMenu | ( | TQWidget * | , |
const TQPoint & | |||
) | [signal] |
The right mouse button was pressed over a widget.
bool KTabWidget::hoverCloseButton | ( | ) | const |
Returns true if the close button is shown on tabs when mouse is hovering over them.
Definition at line 484 of file ktabwidget.cpp.
bool KTabWidget::hoverCloseButtonDelayed | ( | ) | const |
Returns true if the close button is shown on tabs after a delay.
Definition at line 494 of file ktabwidget.cpp.
void KTabWidget::initiateDrag | ( | TQWidget * | ) | [signal] |
Request to start a drag operation on the given tab.
void KTabWidget::insertTab | ( | TQWidget * | child, |
const TQString & | label, | ||
int | index = -1 |
||
) | [virtual] |
Reimplemented for internal reasons.
Reimplemented from TQTabWidget.
Definition at line 79 of file ktabwidget.cpp.
void KTabWidget::insertTab | ( | TQWidget * | child, |
const TQIconSet & | iconset, | ||
const TQString & | label, | ||
int | index = -1 |
||
) | [virtual] |
Reimplemented for internal reasons.
Reimplemented from TQTabWidget.
Definition at line 84 of file ktabwidget.cpp.
void KTabWidget::insertTab | ( | TQWidget * | child, |
TQTab * | tab, | ||
int | index = -1 |
||
) | [virtual] |
Reimplemented for internal reasons.
Reimplemented from TQTabWidget.
Definition at line 89 of file ktabwidget.cpp.
bool KTabWidget::isTabBarHidden | ( | ) | const |
bool KTabWidget::isTabReorderingEnabled | ( | ) | const |
Returns true if tab ordering with the middle mouse button has been enabled.
Definition at line 153 of file ktabwidget.cpp.
TQString KTabWidget::label | ( | int | index | ) | const |
Reimplemented for internal reasons.
Definition at line 216 of file ktabwidget.cpp.
void KTabWidget::mouseDoubleClick | ( | ) | [signal] |
A double left mouse button click was performed over empty space besides tabbar.
- Since:
- 3.3
void KTabWidget::mouseDoubleClick | ( | TQWidget * | ) | [signal] |
A double left mouse button click was performed over the widget.
void KTabWidget::mouseMiddleClick | ( | ) | [signal] |
A middle mouse button click was performed over empty space besides tabbar.
void KTabWidget::mouseMiddleClick | ( | TQWidget * | ) | [signal] |
A middle mouse button click was performed over the widget.
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 ).
void KTabWidget::moveTab | ( | int | from, |
int | to | ||
) | [virtual, slot] |
Move a widget's tab from first to second specified index and emit signal movedTab( int, int ) afterwards.
Definition at line 411 of file ktabwidget.cpp.
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.
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.
void KTabWidget::removePage | ( | TQWidget * | w | ) | [virtual, slot] |
Removes the widget, reimplemented for internal reasons (keeping labels in sync).
Reimplemented from TQTabWidget.
Definition at line 446 of file ktabwidget.cpp.
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 499 of file ktabwidget.cpp.
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 479 of file ktabwidget.cpp.
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 489 of file ktabwidget.cpp.
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.
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.
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 158 of file ktabwidget.cpp.
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.
void KTabWidget::setTabLabel | ( | TQWidget * | w, |
const TQString & | l | ||
) |
Reimplemented for internal reasons.
Reimplemented from TQTabWidget.
Definition at line 241 of file ktabwidget.cpp.
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 148 of file ktabwidget.cpp.
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 163 of file ktabwidget.cpp.
TQColor KTabWidget::tabColor | ( | TQWidget * | w | ) | const |
Returns the tab color for the given widget.
Definition at line 138 of file ktabwidget.cpp.
TQString KTabWidget::tabLabel | ( | TQWidget * | w | ) | const |
Reimplemented for internal reasons.
Definition at line 228 of file ktabwidget.cpp.
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.
The documentation for this class was generated from the following files: