kutils Library API Documentation

KMultiTabBar Class Reference

A Widget for horizontal and vertical tabs. More...

#include <kmultitabbar.h>

Inheritance diagram for KMultiTabBar:

Inheritance graph
[legend]
Collaboration diagram for KMultiTabBar:

Collaboration graph
[legend]
List of all members.

Public Types

enum  KMultiTabBarMode { Horizontal, Vertical }
enum  KMultiTabBarPosition { Left, Right, Top, Bottom }
enum  KMultiTabBarStyle {
  VSNET = 0, KDEV3 = 1, KONQSBC = 2, KDEV3ICON = 3,
  STYLELAST = 0xffff
}

Public Member Functions

 KMultiTabBar (KMultiTabBarMode bm, QWidget *parent=0, const char *name=0)
virtual ~KMultiTabBar ()
int appendButton (const QPixmap &pic, int id=-1, QPopupMenu *popup=0, const QString &not_used_yet=QString::null)
void removeButton (int id)
int appendTab (const QPixmap &pic, int id=-1, const QString &text=QString::null)
void removeTab (int id)
void setTab (int id, bool state)
bool isTabRaised (int id) const
KMultiTabBarButtonbutton (int id) const
KMultiTabBarTabtab (int id) const
void setPosition (KMultiTabBarPosition pos)
void setStyle (KMultiTabBarStyle style)
QPtrList< KMultiTabBarTab > * tabs ()
QPtrList< KMultiTabBarButton > * buttons ()
void showActiveTabTexts (bool show=true)

Protected Member Functions

virtual void fontChange (const QFont &)
void updateSeparator ()

Friends

class KMultiTabBarButton

Detailed Description

A Widget for horizontal and vertical tabs.

It is possible to add normal buttons to the top/left The handling if only one tab at a time or multiple tabs should be raisable is left to the "user".

Author:
Joseph Wenninger

Definition at line 54 of file kmultitabbar.h.


Member Enumeration Documentation

enum KMultiTabBar::KMultiTabBarStyle
 

VSNET == Visual Studio .Net like (only show the text of active tabs KDEV3 == Kdevelop 3 like (always show the text) KONQSBC == konqy's classic sidebar style (unthemed), this one is disabled at the moment, but will be renabled soon too.

Definition at line 67 of file kmultitabbar.h.


Member Function Documentation

int KMultiTabBar::appendButton const QPixmap pic,
int  id = -1,
QPopupMenu popup = 0,
const QString not_used_yet = QString::null
 

append a new button to the button area.

The button can later on be accessed with button(ID) eg for connecting signals to it

Parameters:
pic a pixmap for the button
id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button if more than one button is connected to a signals.
popup A popup menu which should be displayed if the button is clicked
not_used_yet will be used for a popup text in the future

Definition at line 878 of file kmultitabbar.cpp.

References QPtrList::append(), QBoxLayout::insertWidget(), and KMultiTabBarButton.

void KMultiTabBar::removeButton int  id  ) 
 

remove a button with the given ID

Definition at line 923 of file kmultitabbar.cpp.

References QPtrList::at(), QPtrList::count(), and QPtrList::take().

int KMultiTabBar::appendTab const QPixmap pic,
int  id = -1,
const QString text = QString::null
 

append a new tab to the tab area.

It can be accessed lateron with tabb(id);

Parameters:
pic a bitmap for the tab
id an arbitrary ID which can be used later on to identify the tab
text if a mode with text is used it will be the tab text, otherwise a mouse over hint

Definition at line 902 of file kmultitabbar.cpp.

void KMultiTabBar::removeTab int  id  ) 
 

remove a tab with a given ID

Definition at line 936 of file kmultitabbar.cpp.

void KMultiTabBar::setTab int  id,
bool  state
 

set a tab to "raised"

Parameters:
id The ID of the tab to manipulate
state true == activated/raised, false == not active

Definition at line 941 of file kmultitabbar.cpp.

References KMultiTabBarTab::setState(), and tab().

bool KMultiTabBar::isTabRaised int  id  )  const
 

return the state of a tab, identified by it's ID

Definition at line 950 of file kmultitabbar.cpp.

References QPushButton::isOn(), and tab().

KMultiTabBarButton * KMultiTabBar::button int  id  )  const
 

get a pointer to a button within the button area identified by its ID

Definition at line 908 of file kmultitabbar.cpp.

KMultiTabBarTab * KMultiTabBar::tab int  id  )  const
 

get a pointer to a tab within the tab area, identiifed by its ID

Definition at line 916 of file kmultitabbar.cpp.

Referenced by isTabRaised(), and setTab().

void KMultiTabBar::setPosition KMultiTabBarPosition  pos  ) 
 

set the real position of the widget.

Parameters:
pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right

Definition at line 972 of file kmultitabbar.cpp.

References QPtrList::at(), and QPtrList::count().

Referenced by KMultiTabBar().

void KMultiTabBar::setStyle KMultiTabBarStyle  style  ) 
 

set the display style of the tabs

Definition at line 967 of file kmultitabbar.cpp.

Referenced by KMultiTabBar().

QPtrList< KMultiTabBarTab > * KMultiTabBar::tabs  ) 
 

be carefull, don't delete tabs yourself and don't delete the list itself

Definition at line 986 of file kmultitabbar.cpp.

Referenced by fontChange().

QPtrList< KMultiTabBarButton > * KMultiTabBar::buttons  ) 
 

be carefull, don't delete buttons yourself and don't delete the list itself

Definition at line 987 of file kmultitabbar.cpp.

void KMultiTabBar::showActiveTabTexts bool  show = true  ) 
 

might vanish, not sure yet

Definition at line 962 of file kmultitabbar.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kutils Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Jul 20 12:45:11 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003