#include <ktabwidget.h>
Inherits TQTabWidget.
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 |
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 *) |
Properties |
bool | tabReorderingEnabled |
bool | hoverCloseButton |
bool | hoverCloseButtonDelayed |
bool | tabCloseActivatePrevious |
bool | automaticResizeTabs |
Detailed Description
A widget containing multiple tabs.
- Since
- 3.2
Definition at line 36 of file ktabwidget.h.
Constructor & Destructor Documentation
KTabWidget::~KTabWidget |
( |
| ) |
|
|
virtual |
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
void KTabWidget::changeTab |
( |
TQWidget * |
w, |
|
|
const TQString & |
label |
|
) |
| |
void KTabWidget::changeTab |
( |
TQWidget * |
child, |
|
|
const TQIconSet & |
iconset, |
|
|
const TQString & |
label |
|
) |
| |
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.
bool KTabWidget::hoverCloseButtonDelayed |
( |
| ) |
const |
Returns true if the close button is shown on tabs after a delay.
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.
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.
Definition at line 84 of file ktabwidget.cpp.
void KTabWidget::insertTab |
( |
TQWidget * |
child, |
|
|
TQTab * |
tab, |
|
|
int |
index = -1 |
|
) |
| |
|
virtual |
Reimplemented for internal reasons.
Definition at line 89 of file ktabwidget.cpp.
bool KTabWidget::isTabBarHidden |
( |
| ) |
const |
Returns true if the tabbar is hidden.
- Since
- 3.4
Definition at line 120 of file ktabwidget.cpp.
bool KTabWidget::isTabReorderingEnabled |
( |
| ) |
const |
Returns true if tab ordering with the middle mouse button has been enabled.
Definition at line 148 of file ktabwidget.cpp.
TQString KTabWidget::label |
( |
int |
index | ) |
const |
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 |
|
) |
| |
|
virtualslot |
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 | ) |
|
|
virtualslot |
Removes the widget, reimplemented for internal reasons (keeping labels in sync).
Definition at line 440 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 493 of file ktabwidget.cpp.
void KTabWidget::setHoverCloseButton |
( |
bool |
enable | ) |
|
|
slot |
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 483 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 153 of file ktabwidget.cpp.
void KTabWidget::setTabColor |
( |
TQWidget * |
w, |
|
|
const TQColor & |
color |
|
) |
| |
Set the tab of the given widget to color.
Definition at line 125 of file ktabwidget.cpp.
void KTabWidget::setTabLabel |
( |
TQWidget * |
w, |
|
|
const TQString & |
l |
|
) |
| |
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 143 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
TQColor KTabWidget::tabColor |
( |
TQWidget * |
w | ) |
const |
Returns the tab color for the given widget.
Definition at line 133 of file ktabwidget.cpp.
TQString KTabWidget::tabLabel |
( |
TQWidget * |
w | ) |
const |
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: