# class KDockTabCtl | A manager for a single KDockTabBar (and member of the dockwidget class set). More...
Definition | `#include <kdocktabctl.h>`
Inherits | QWidget (qt) [public ]
Inherited by | KDockTabGroup
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KDockTabCtl ( QWidget *parent = 0, const char *name = 0 )
- ~KDockTabCtl ()
- virtual void setTabPos ( KDockTabBar::TabPos )
- KDockTabBar::TabPos getTabPos ()
- int insertPage ( QWidget * w, const QString &label, int id = -1, int index = -1 )
- void setPageCaption ( QWidget* w, const QString &s )
- void setPageCaption ( int id, const QString &caption )
- QString pageCaption ( QWidget* w)
- QString pageCaption ( int id )
- void captionAutoSet ( bool autoSet )
- bool isCaptionAutoSet ()
- void setPixmap ( QWidget* w, const QPixmap &pix )
- void setPixmap ( int id, const QPixmap &pix )
- void setToolTip ( QWidget* w, const QString &toolTipStr )
- void setTabTextColor ( QWidget*, const QColor &color )
- void setTabTextColor ( int id, const QColor &color )
- const QColor& tabTextColor ( QWidget* w)
- const QColor& tabTextColor ( int id )
- bool isPageEnabled ( QWidget* w)
- bool isPageEnabled ( int id )
- void setPageEnabled ( QWidget* w, bool e)
- void setPageEnabled ( int id, bool enabled )
- QWidget* page ( int id)
- int id ( QWidget* w)
- int index ( QWidget* w)
- void removePage ( QWidget* w)
- void removePage ( int id )
- QWidget* visiblePage ()
- int visiblePageId ()
- void setVisiblePage ( QWidget*, bool allowDisable = false )
- void setTabFont ( const QFont &font )
- QFont tabFont ()
- void showTabIcon ( bool )
- bool isShowTabIcon ()
- int pageCount ()
- QWidget* getFirstPage ()
- QWidget* getLastPage ()
- QWidget* getNextPage ( QWidget* )
- QWidget* getPrevPage ( QWidget* )
- virtual void show ()
- virtual bool eventFilter ( QObject*, QEvent* )

#### Public Slots

- virtual void setEnabled ( bool )
- void setVisiblePage (int id)

#### Signals

- void aboutToShow ( QWidget* )
- void pageSelected ( QWidget* )
- void tabShowPopup ( int, QPoint )

#### Protected Methods

- void paintEvent (QPaintEvent *)
- KDockTabCtl_PrivateStruct* findData ( QWidget* )
- KDockTabCtl_PrivateStruct* findData ( int id )
- void showPage ( QWidget*, bool allowDisable = false )

#### Protected Slots

- void rightButtonPress ( int, QPoint )

#### Protected Members

- QWidgetStack* stack
- QBoxLayout* layout
- QBoxLayout* stack_layout
- QList<KDockTabCtl_PrivateStruct> *mainData
- QWidget* currentPage
- KDockTabBar* tabs
- KDockTabBar::TabPos tabPos
- bool m_autoSetCaption

## Detailed Description

A manager for a single KDockTabBar (and member of the dockwidget class set). The KDockWidget class ever use this class instead of accessing the KDockTabBar directly.

For some reasons it's more practical for the Dockwidget class set than QTabBar or KTabBar .

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

Constructs a dock-tab control object.

~KDockTabCtl () | ### ~KDockTabCtl

Destructs this.

void setTabPos ( KDockTabBar::TabPos ) | ### setTabPos

[virtual]

Calls KDockTabBar::setTabPos of its embedded tab bar but does layout actions, additionally.

KDockTabBar::TabPos getTabPos () | ### getTabPos

Returns the current tab position of its docktabbar.

int insertPage ( QWidget * w, const QString &label, int id = -1, int index = -1 ) | ### insertPage

Inserts a new tab page in the encapsulated docktabbar. Mainly it calls KDockTabBar::insertTab and does additional management operations.

Parameters:

w | the widget that is inserted
label | the title for the caption bar of the tab page
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 id of the new inserted page

void setPageCaption ( QWidget* w, const QString &s ) | ### setPageCaption

Sets the title of the tab page. Mainly it calls KDockTabBar::setPageCaption but calls it internally by the page id.

Parameters:

w | the widget we want to give a new caption
s | well, what the heck could that be? ;-)

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

QString pageCaption ( QWidget* w) | ### pageCaption

Returns the title of the tab page. Mainly it calls KDockTabBar::setPageCaption but calls it internally by the page id.

Parameters:

w | the widget for that we want to know its caption

Returns: a string containing the title of the page

QString pageCaption ( int id ) | ### pageCaption

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void captionAutoSet ( bool autoSet ) | ### captionAutoSet

bool isCaptionAutoSet () | ### isCaptionAutoSet

void setPixmap ( QWidget* w, const QPixmap &pix ) | ### setPixmap

Sets an icon for the tab page (shown in the tab header).

Parameters:

w | the widget we want to give a new icon
pix | the new icon

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void setToolTip ( QWidget* w, const QString &toolTipStr ) | ### setToolTip

Sets a toolTip for the tab page (shown in the tab header).

Parameters:

w | the widget we want to give the tooltip
toolTipStr | the new tooltip string

void setTabTextColor ( QWidget*, const QColor &color ) | ### setTabTextColor

Sets the text colour of the tab page. Mainly it calls KDockTabBar::setTextColor but calls it internally by the page id.

Parameters:

w | the widget we want to give a new text colour
color | the colour of the tab header

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const QColor& tabTextColor ( QWidget* w) | ### tabTextColor

Returns the text colour of the tab page. Mainly it calls KDockTabBar::textColor but calls it internally by the page id.

Parameters:

w | the widget we want to ask for its text colour

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool isPageEnabled ( QWidget* w) | ### isPageEnabled

Returns if the tab page is enabled (if it can get the focus).

Parameters:

w | the widget we want to ask if its page is enabled

bool isPageEnabled ( int id ) | ### isPageEnabled

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void setPageEnabled ( QWidget* w, bool e) | ### setPageEnabled

Enable or disable the tab page (whether it can get the focus or not). Mainly it calls KDockTabBar::setPageEnabled but calls it internally by the page id.

Parameters:

w | the widget that should be enabled
e | boolean value whether enabled or disabled

void setPageEnabled ( int id, bool enabled ) | ### setPageEnabled

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

QWidget* page ( int id) | ### page

Returns the widget that embedded in a page.

Parameters:

id | the identification number of the page

int id ( QWidget* w) | ### id

Returns the widget's Id.

Parameters:

w | the widget that should return its id

int index ( QWidget* w) | ### index

Returns the widget's index. (tab page position)

Parameters:

w | the widget that should return its index

void removePage ( QWidget* w) | ### removePage

Removes the tab page from the covered tab bar. Mainly it calls KDockTabBar::removeTab but calls it internally by the page id.

Parameters:

w | the tab page that should be removed

void removePage ( int id ) | ### removePage

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

QWidget* visiblePage () | ### visiblePage

Returns the current (visible) tab page.

int visiblePageId () | ### visiblePageId

Returns the id of the current (visible) tab page.

void setVisiblePage ( QWidget*, bool allowDisable = false ) | ### setVisiblePage

Sets the given tab page as the active (and visible) one.

void setTabFont ( const QFont &font ) | ### setTabFont

Sets the font for the tab pages. It just calls the appropriate method of its KDockTabBar.

QFont tabFont () | ### tabFont

Returns the font for the tab pages. It simply calls KDockTabBar::tabFont .

void showTabIcon ( bool ) | ### showTabIcon

Enables or disables the showing of the icons for every tab page. It simply calls KDockTabBar::showTabIcon .

bool isShowTabIcon () | ### isShowTabIcon

Returns if the tab icon is shown. It simply calls KDockTabBar::isShowTabIcon .

int pageCount () | ### pageCount

Returns the number of inserted tab pages.

QWidget* getFirstPage () | ### getFirstPage

Returns the first tab page in its KDockTabBar.

QWidget* getLastPage () | ### getLastPage

Returns the last tab page in its KDockTabBar.

QWidget* getNextPage ( QWidget* ) | ### getNextPage

Returns the tab page that is at the right side of the given tab widget.

QWidget* getPrevPage ( QWidget* ) | ### getPrevPage

Returns the tab page that is at the left side of the given tab widget.

void show () | ### show

[virtual]

Shows its encapsulated tab bar and shows the current tab page.

Reimplemented from QWidget.

bool eventFilter ( QObject*, QEvent* ) | ### eventFilter

[virtual]

Catches some events that are of interest for this class.

void setEnabled ( bool ) | ### setEnabled

[virtual slot]

Enables or disables this and its KDockTabBar.

Reimplemented from QWidget.

void setVisiblePage (int id) | ### setVisiblePage

[slot]

Sets the visible page by its id.

void paintEvent (QPaintEvent *) | ### paintEvent

[protected]

Handles paint events for this widgets Reimplemented from QWidget

Reimplemented from QWidget.

void aboutToShow ( QWidget* ) | ### aboutToShow

[signal]

Signals that the given widget is about to show.

void pageSelected ( QWidget* ) | ### pageSelected

[signal]

Signals that that tab page is selected.

void tabShowPopup ( int, QPoint ) | ### tabShowPopup

[signal]

Signals that the right mouse button is pressed on this.

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

[protected slots slot]

Do some things that should be done when someone has pressed the right mouse button on this.

KDockTabCtl_PrivateStruct* findData ( QWidget* ) | ### findData

[protected]

Returns the appropriate data for the widget from the parameter list.

KDockTabCtl_PrivateStruct* findData ( int id ) | ### findData

[protected]

Returns the appropriate data for the widget from the parameter list described by its id.

void showPage ( QWidget*, bool allowDisable = false ) | ### showPage

[protected]

Shows the tab page.

QWidgetStack* stack | ### stack

[protected]

QBoxLayout* layout | ### layout

[protected]

QBoxLayout* stack_layout | ### stack_layout

[protected]

QList<KDockTabCtl_PrivateStruct> * mainData | ### mainData

[protected]

QWidget* currentPage | ### currentPage

[protected]

KDockTabBar* tabs | ### tabs

[protected]

KDockTabBar::TabPos tabPos | ### tabPos

[protected]

bool m_autoSetCaption | ### m_autoSetCaption

[protected]

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