class KDockTabCtl

A manager for a single KDockTabBar (and member of the dockwidget class set). More...

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

Public Methods

Public Slots

Signals

Protected Methods

Protected Slots

Protected Members


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 )

Constructs a dock-tab control object.

KDockTabCtl ()

Destructs this.

void  setTabPos ( KDockTabBar::TabPos )

[virtual]

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

KDockTabBar::TabPos  getTabPos ()

Returns the current tab position of its docktabbar.

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

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

Parameters:

Returns: the id of the new inserted page

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

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

Parameters:

void  setPageCaption ( int id, const QString &caption )

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)

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

Parameters:

Returns: a string containing the title of the page

QString  pageCaption ( int id )

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 )

bool  isCaptionAutoSet ()

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

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

Parameters:

void  setPixmap ( int id, const QPixmap &pix )

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 )

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

Parameters:

void  setTabTextColor ( QWidget*, const QColor &color )

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

Parameters:

void  setTabTextColor ( int id, const QColor &color )

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)

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

Parameters:

const QColor&  tabTextColor ( int id )

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)

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

Parameters:

bool  isPageEnabled ( int id )

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)

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:

void  setPageEnabled ( int id, bool enabled )

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)

/

/** Returns the widget that embedded in a page.

Parameters:

int  id ( QWidget* w)

Returns the widget's Id.

Parameters:

int  index ( QWidget* w)

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

Parameters:

void  removePage ( QWidget* w)

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

Parameters:

void  removePage ( int id )

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

QWidget*  visiblePage ()

Returns the current (visible) tab page.

int  visiblePageId ()

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

void  setVisiblePage ( QWidget*, bool allowDisable = false )

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

void  setTabFont ( const QFont &font )

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

QFont  tabFont ()

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

void  showTabIcon ( bool )

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

bool  isShowTabIcon ()

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

int  pageCount ()

Returns the number of inserted tab pages.

QWidget*  getFirstPage ()

Returns the first tab page in its KDockTabBar.

QWidget*  getLastPage ()

Returns the last tab page in its KDockTabBar.

QWidget*  getNextPage ( QWidget* )

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

QWidget*  getPrevPage ( QWidget* )

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

void  show ()

[virtual]

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

bool  eventFilter ( QObject*, QEvent* )

[virtual]

Catches some events that are of interest for this class.

void  setEnabled ( bool )

[virtual slot]

Enables or disables this and its KDockTabBar.

void  setVisiblePage (int id)

[slot]

Sets the visible page by its id.

void  paintEvent (QPaintEvent *)

[protected]

Handles paint events for this widgets Reimplemented from QWidget

void  aboutToShow ( QWidget* )

[signal]

Signals that the given widget is about to show.

void  pageSelected ( QWidget* )

[signal]

Signals that that tab page is selected.

void  tabShowPopup ( int, QPoint )

[signal]

Signals that the right mouse button is pressed on this.

void  rightButtonPress ( int, QPoint )

[protected slot]

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

KDockTabCtl_PrivateStruct*  findData ( QWidget* )

[protected]

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

KDockTabCtl_PrivateStruct*  findData ( int id )

[protected]

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

void  showPage ( QWidget*, bool allowDisable = false )

[protected]

Shows the tab page.

QWidgetStack* stack

[protected]

a data structure that contains all embedded widgets.

QBoxLayout* layout

[protected]

The layout manager for automatic positioning and resizing of the embedded tab pages.

QBoxLayout* stack_layout

[protected]

The layout manager for the widget stack.

QList<KDockTabCtl_PrivateStruct> * mainData

[protected]

An internal list for managing the tab pages. It stores data items for every tab page in the tab bar. An data item is of type KDockTabCtl_PrivateStruct (a struct) that contains the widget, its id and information about whether it is enabled or disabled.

QWidget* currentPage

[protected]

A pointer to the widget that is the current tab page in the covered tab bar.

KDockTabBar* tabs

[protected]

The actual tab bar widget that is encapsulated by this control class. Often this manager puts only method calls through and does some additional management functions.

KDockTabBar::TabPos tabPos

[protected]

The current tab position.

bool m_autoSetCaption

[protected]