class KDockTabCtl

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

Definition#include <kdocktabctl.h>
InheritsQWidget (qt) [public ]
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 )

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:
wthe widget that is inserted
labelthe title for the caption bar of the tab page
idsuggest an identification number for access operations but it will be shifted to the next free value
indexthe 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:
wthe widget we want to give a new caption
swell, 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:
wthe 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:
wthe widget we want to give a new icon
pixthe 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:
wthe widget we want to give the tooltip
toolTipStrthe 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:
wthe widget we want to give a new text colour
colorthe 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:
wthe 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:
wthe 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:
wthe widget that should be enabled
eboolean 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:
idthe identification number of the page

int  id ( QWidget* w)

id

Returns the widget's Id.

Parameters:
wthe widget that should return its id

int  index ( QWidget* w)

index

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

Parameters:
wthe 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:
wthe 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]