# class KDockTabBar | The actual tab bar for dockwidgets (and member of the dockwidget class set). More...
Definition | `#include <kdocktabctl.h>`
Inherits | QWidget (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum TabPos { TAB_TOP, TAB_RIGHT }

#### Public Methods

- KDockTabBar ( QWidget * parent = 0, const char * name = 0 )
- ~KDockTabBar ()
- void setTabPos ( TabPos tabpos)
- int insertTab ( const QString &label, int id = -1, int index = -1 )
- void setPixmap ( int id, const QPixmap &pix )
- void setToolTip ( int id, const QString &toolTipStr )
- void setTextColor ( int id, const QColor &color )
- const QColor& textColor ( int id )
- void removeTab ( int id)
- int currentTab ()
- void setCurrentTab ( int id, bool allowDisable = false )
- void setTabEnabled ( int id, bool e)
- bool isTabEnabled ( int id)
- void setTabCaption ( int id, const QString &caption )
- QString tabCaption ( int id )
- virtual void show ()
- virtual void setFont ( const QFont & )
- void showTabIcon ( bool )
- bool isShowTabIcon ()

#### Signals

- void tabSelected ( int id)
- void rightButtonPress ( int id, QPoint )

#### Protected Methods

- virtual void paintEvent ( QPaintEvent* )
- virtual void resizeEvent ( QResizeEvent* )
- virtual void keyPressEvent ( QKeyEvent* )

#### Protected Slots

- void leftClicked ()
- void rightClicked ()

## Detailed Description

The actual tab bar for dockwidgets (and member of the dockwidget class set).

This class is covered by its manager, KDockTabCtl. It provides some set/get methods and managment methods like insert, remove, activate for tab widgets.

KDockTabBar ( QWidget * parent = 0, const char * name = 0 ) | ### KDockTabBar

Constructs a tab bar widget. The parent and name argument are sent to the QWidget constructor.

~KDockTabBar () | ### ~KDockTabBar

Destructs this.

enum TabPos { TAB_TOP, TAB_RIGHT } | ### TabPos

For clearer setting (or asking for) the current tab page position.

void setTabPos ( TabPos tabpos) | ### setTabPos

Set the position to tabpos and repaints this.

Parameters:

tabpos | Either `TAB_TOP` or `TAB_RIGHT`, just where you want it to be

int insertTab ( const QString &label, int id = -1, int index = -1 ) | ### insertTab

Insert a new empty tab page to the tab bar.

If `id` is not specified, the tab is simply added. Otherwise it's inserted at the specified position.

Parameters:

label | The title in the tab page header.
id | Suggest an identification number for access operations but it will be shifted to the next free value.
index | The tab page position (default=-1 means append)

Returns: The new allocated id.

void setPixmap ( int id, const QPixmap &pix ) | ### setPixmap

Set an icon for the tab page with that `id`.

Parameters:

id | The identification number of that desired page.
pix | The new pixmap.

void setToolTip ( int id, const QString &toolTipStr ) | ### setToolTip

Set a tooltip for the tab page with that `id`.

Parameters:

id | The identification number of that desired page.
toolTipStr | The new tooltip.

void setTextColor ( int id, const QColor &color ) | ### setTextColor

Set the text colour for the tab page with that `id`.

Parameters:

id | The identification number of that desired page.
color | The new text colour.

const QColor& textColor ( int id ) | ### textColor

Retrieve the text colour for the tab page with that `id`.

Parameters:

id | the identification number of that desired tab page

Returns: the current text colour of that tab page

void removeTab ( int id) | ### removeTab

Removes the tab page with that `id`.

Parameters:

id | The identification number of that desired page.

int currentTab () | ### currentTab

Retrieve the current tab page.

Returns: The `id` of the tab page.

void setCurrentTab ( int id, bool allowDisable = false ) | ### setCurrentTab

Set the current tab page to the page with that `id`.

Parameters:

id | The identification number of that desired page.
allowDisable | Disables the tab page.

void setTabEnabled ( int id, bool e) | ### setTabEnabled

Enable or disable the tab page with that `id`.

bool isTabEnabled ( int id) | ### isTabEnabled

Returns if the tab page with that `id` is enabled or disabled.

void setTabCaption ( int id, const QString &caption ) | ### setTabCaption

Set the title of the tab page with that `id`.

Parameters:

id | The identification number of that desired page.
caption | A string for the title.

QString tabCaption ( int id ) | ### tabCaption

Retrieve the title of the tab page with that `id`.

Parameters:

id | the identification number of that desired page

void show () | ### show

[virtual]

Calls QWidget::show() and showPage() for the current tab page, additionally.

Reimplemented from QWidget.

void setFont ( const QFont & ) | ### setFont

[virtual]

Set the font of `this`.

Reimplemented from QWidget.

void showTabIcon ( bool ) | ### showTabIcon

Show or hide the icons for the tab pages in the header.

bool isShowTabIcon () | ### isShowTabIcon

Returns if the icons for the tab pages are shown in the header.

void tabSelected ( int id) | ### tabSelected

[signal]

Signals that a tab page with that id is selected.

Parameters:

id | the identification number of that desired page

void rightButtonPress ( int id, QPoint ) | ### rightButtonPress

[signal]

Signals that the right mouse buttons is pressed on the tab page with that @pid.

Parameters:

id | The identification number of that desired page.

void leftClicked () | ### leftClicked

[protected slots slot]

Does things that should be done if someone has clicked the left mouse button.

void rightClicked () | ### rightClicked

[protected slots slot]

Does things that should be done if someone has clicked the right mouse button.

void paintEvent ( QPaintEvent* ) | ### paintEvent

[protected virtual]

Handles paint events for this widgets Reimplemented from QWidget

Reimplemented from QWidget.

void resizeEvent ( QResizeEvent* ) | ### resizeEvent

[protected virtual]

Handles resize events for this widgets Reimplemented from QWidget

Reimplemented from QWidget.

void keyPressEvent ( QKeyEvent* ) | ### keyPressEvent

[protected virtual]

Handles key press events for this widgets Reimplemented from QWidget

Reimplemented from QWidget.

- Version: $Id: kdocktabctl.h,v 1.16 2001/02/13 16:24:17 falkbr Exp $
- Author: Max Judin (documentation: Falk Brettschneider).
- Generated: root@sparc.ports.openbsd.org on Wed May 2 09:37:45 2001, using kdoc 2.0a53.