class KDockTabBar

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

Definition#include <kdocktabctl.h>
InheritsQWidget (kdecore)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Signals

Protected Methods

Protected Slots


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 )

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

KDockTabBar ()

Destructs this.

enum TabPos {TAB_TOP, TAB_RIGHT }

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

void  setTabPos ( TabPos tabpos)

Sets the position to tabpos and repaints this.

Parameters:
tabposeither TAB_TOP or TAB_RIGHT, just where you want it to be

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

Inserts 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:
labelthe title in the tab page header
idan identification number for access operations

Returns: the new allocated id

void  setPixmap ( int id, const QPixmap &pix )

Sets an icon for the tab page with that id.

Parameters:
idthe identification number of that desired page
pixthe new pixmap

void  setToolTip ( int id, const QString &toolTipStr )

Sets a tooltip for the tab page with that id.

Parameters:
idthe identification number of that desired page
toolTipStrthe new tooltip

void  setTextColor ( int id, const QColor &color )

Sets the text colour for the tab page with that id.

Parameters:
idthe identification number of that desired page
colorthe new text colour

const QColor&  textColor ( int id )

Returns the text colour for the tab page with that id.

Parameters:
idthe identification number of that desired tab page

Returns: the current text colour of that tab page

void  removeTab ( int id)

Removes the tab page with that id.

Parameters:
idthe identification number of that desired page

int  currentTab ()

Returns the current tab page.

Returns: the id of the tab page

void  setCurrentTab ( int id, bool allowDisable = false )

Sets the current tab page to the page with that id.

Parameters:
idthe identification number of that desired page
allowDisabledisables the tab page

void  setTabEnabled ( int id, bool e)

Enables or disables the tab page with that id.

bool  isTabEnabled ( int id)

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

void  setTabCaption ( int id, const QString &caption )

Sets the title of the tab page with that id.

Parameters:
idthe identification number of that desired page
captiona string for the title

QString  tabCaption ( int id )

Returns the title of the tab page with that id.

Parameters:
idthe identification number of that desired page

void  show ()

[virtual]

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

void  setFont ( const QFont & )

[virtual]

Sets the font of this.

void  showTabIcon ( bool )

Shows or Hides the icons for the tab pages in the header.

bool  isShowTabIcon ()

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

void  tabSelected ( int id)

[signal]

Signals that a tab page with that id is selected.

Parameters:
idthe identification number of that desired page

void  rightButtonPress ( int id, QPoint )

[signal]

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

Parameters:
idthe identification number of that desired page

void  leftClicked ()

[protected slot]

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

void  rightClicked ()

[protected slot]

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

void  paintEvent ( QPaintEvent* )

[protected virtual]

Handles paint events for this widgets Reimplemented from QWidget

void  resizeEvent ( QResizeEvent* )

[protected virtual]

Handles resize events for this widgets Reimplemented from QWidget