KTabWidget Class Reference
A widget containing multiple tabs. More...
#include <ktabwidget.h>
Inheritance diagram for KTabWidget:

Public Slots | |
virtual void | moveTab (int, int) |
virtual void | removePage (QWidget *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 QDragMoveEvent *e, bool &accept) |
void | receivedDropEvent (QDropEvent *) |
void | receivedDropEvent (QWidget *, QDropEvent *) |
void | initiateDrag (QWidget *) |
void | contextMenu (const QPoint &) |
void | contextMenu (QWidget *, const QPoint &) |
void | movedTab (int, int) |
void | mouseDoubleClick () |
void | mouseDoubleClick (QWidget *) |
void | mouseMiddleClick () |
void | mouseMiddleClick (QWidget *) |
void | closeRequest (QWidget *) |
Public Member Functions | |
KTabWidget (QWidget *parent=0, const char *name=0, WFlags f=0) | |
virtual | ~KTabWidget () |
void | setTabColor (QWidget *, const QColor &color) |
QColor | tabColor (QWidget *) 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 (QWidget *, const QString &, int index=-1) |
virtual void | insertTab (QWidget *child, const QIconSet &iconset, const QString &label, int index=-1) |
virtual void | insertTab (QWidget *, QTab *, int index=-1) |
void | changeTab (QWidget *, const QString &) |
void | changeTab (QWidget *child, const QIconSet &iconset, const QString &label) |
QString | label (int) const |
QString | tabLabel (QWidget *) const |
void | setTabLabel (QWidget *, const QString &) |
Protected Slots | |
virtual void | receivedDropEvent (int, QDropEvent *) |
virtual void | initiateDrag (int) |
virtual void | contextMenu (int, const QPoint &) |
virtual void | mouseDoubleClick (int) |
virtual void | mouseMiddleClick (int) |
virtual void | closeRequest (int) |
virtual void | wheelDelta (int) |
Protected Member Functions | |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | dragMoveEvent (QDragMoveEvent *) |
virtual void | dropEvent (QDropEvent *) |
unsigned int | tabBarWidthForMaxChars (uint maxLength) |
virtual void | wheelEvent (QWheelEvent *e) |
virtual void | resizeEvent (QResizeEvent *) |
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
|
Destructor.
Definition at line 72 of file ktabwidget.cpp. |
Member Function Documentation
|
Set the tab of the given widget to color. Definition at line 123 of file ktabwidget.cpp. References QTab::identifier(), QTabWidget::indexOf(), and QTabWidget::tabBar(). Referenced by moveTab(). |
|
Returns true if tab ordering with the middle mouse button has been enabled. Definition at line 146 of file ktabwidget.cpp. References QTabWidget::tabBar(). |
|
Returns true if the close button is shown on tabs when mouse is hovering over them. |
|
Returns true if the close button is shown on tabs after a delay. |
|
Returns true if closing the current tab activates the previous actice tab instead of the one to the right.
|
|
Returns true if calling setTitle() will resize tabs to the width of the tab bar.
|
|
If hide is true, the tabbar is hidden along with any corner widgets.
Definition at line 102 of file ktabwidget.cpp. References QTabWidget::cornerWidget(), QWidget::hide(), QWidget::show(), and QTabWidget::tabBar(). |
|
Return true if the tabbar is hidden.
Definition at line 118 of file ktabwidget.cpp. References QTabWidget::tabBar(). |
|
Reimplemented for internal reasons. Reimplemented from QTabWidget. Definition at line 77 of file ktabwidget.cpp. References QTabWidget::insertTab(). |
|
Reimplemented for internal reasons. Reimplemented from QTabWidget. Definition at line 82 of file ktabwidget.cpp. References QTabWidget::insertTab(). |
|
Reimplemented for internal reasons. Reimplemented from QTabWidget. Definition at line 87 of file ktabwidget.cpp. References QTabWidget::count(), QTabWidget::insertTab(), and QTab::text(). |
|
Reimplemented for internal reasons. Reimplemented from QTabWidget. Definition at line 185 of file ktabwidget.cpp. References QTabWidget::changeTab(), and QTabWidget::indexOf(). Referenced by moveTab(). |
|
Reimplemented for internal reasons. Reimplemented from QTabWidget. Definition at line 197 of file ktabwidget.cpp. References QTabWidget::changeTab(), and QTabWidget::indexOf(). |
|
Reimplemented for internal reasons. Definition at line 209 of file ktabwidget.cpp. References QTabWidget::count(), and QTabWidget::label(). Referenced by moveTab(). |
|
Reimplemented for internal reasons. Definition at line 221 of file ktabwidget.cpp. References QTabWidget::indexOf(), and QTabWidget::tabLabel(). |
|
Reimplemented for internal reasons. Reimplemented from QTabWidget. Definition at line 234 of file ktabwidget.cpp. References QTabWidget::indexOf(), and QTabWidget::setTabLabel(). |
|
Move a widget's tab from first to second specified index and emit signal movedTab( int, int ) afterwards. Definition at line 399 of file ktabwidget.cpp. References changeTab(), QTabWidget::count(), QTabWidget::currentPage(), QTabWidget::insertTab(), QTabWidget::isTabEnabled(), label(), movedTab(), QTabWidget::page(), removePage(), setTabColor(), QTabWidget::setTabEnabled(), QTabWidget::setTabToolTip(), QTab::setText(), QTabWidget::showPage(), tabColor(), QTabWidget::tabIconSet(), and QTabWidget::tabToolTip(). Referenced by KTabWidget(). |
|
Removes the widget, reimplemented for internal reasons (keeping labels in sync). Reimplemented from QTabWidget. Definition at line 434 of file ktabwidget.cpp. References QTabWidget::indexOf(), and QTabWidget::removePage(). Referenced by moveTab(). |
|
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( QWidget * ) 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 141 of file ktabwidget.cpp. References QTabWidget::tabBar(). |
|
If enable is true, a close button will be shown on mouse hover over tab icons which will emit signal closeRequest( QWidget * ) when pressed. Definition at line 471 of file ktabwidget.cpp. References QTabWidget::tabBar(). |
|
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 481 of file ktabwidget.cpp. References QTabWidget::tabBar(). |
|
If delayed is true, closing the current tab activates the previous active tab instead of the one to the right.
Definition at line 151 of file ktabwidget.cpp. References QTabWidget::tabBar(). |
|
If enable is true, tabs will be resized to the width of the tab bar. Does not work reliable with "QTabWidget* foo=new KTabWidget()" and if you change tabs via the tabbar or by accessing tabs directly.
Definition at line 491 of file ktabwidget.cpp. References QTabWidget::count(), and QTabWidget::tabBar(). |
|
Connect to this and set accept to true if you can and want to decode the event. Referenced by dragMoveEvent(), and KTabWidget(). |
|
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. Referenced by dropEvent(), KTabWidget(), and receivedDropEvent(). |
|
Received an drop event on given widget's tab. This signal is only possible after testCanDecode and positive accept result. |
|
Request to start a drag operation on the given tab. Referenced by initiateDrag(), and KTabWidget(). |
|
The right mouse button was pressed over empty space besides tabbar. Referenced by contextMenu(), KTabWidget(), and mousePressEvent(). |
|
The right mouse button was pressed over a widget. |
|
A tab was moved from first to second index. This signal is only possible after you have called setTabReorderingEnabled( true ). Referenced by moveTab(). |
|
A double left mouse button click was performed over empty space besides tabbar.
Referenced by KTabWidget(), mouseDoubleClick(), and mouseDoubleClickEvent(). |
|
A double left mouse button click was performed over the widget. |
|
A middle mouse button click was performed over empty space besides tabbar. Referenced by KTabWidget(), mouseMiddleClick(), and mousePressEvent(). |
|
A middle mouse button click was performed over the widget. |
|
The close button of a widget's tab was clicked. This signal is only possible after you have called setHoverCloseButton( true ). Referenced by closeRequest(), and KTabWidget(). |
The documentation for this class was generated from the following files: