KDEUI
KMultiTabBar Class Reference
#include <kmultitabbar.h>

Detailed Description
A Widget for horizontal and vertical tabs.(Note that in Qt4, QTabBar can be vertical as well)
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".
Definition at line 54 of file kmultitabbar.h.
Public Types | |
enum | KMultiTabBarPosition { Left, Right, Top, Bottom } |
enum | KMultiTabBarStyle { VSNET = 0, KDEV3ICON = 2, STYLELAST = 0xffff } |
Public Member Functions | |
int | appendButton (const QPixmap &pic, int id=-1, QMenu *popup=0, const QString ¬_used_yet=QString()) |
int | appendTab (const QPixmap &pic, int id=-1, const QString &text=QString()) |
class KMultiTabBarButton * | button (int id) const |
bool | isTabRaised (int id) const |
KMultiTabBar (KMultiTabBarPosition pos, QWidget *parent=0) | |
KMultiTabBarPosition | position () const |
void | removeButton (int id) |
void | removeTab (int id) |
void | setPosition (KMultiTabBarPosition pos) |
void | setStyle (KMultiTabBarStyle style) |
void | setTab (int id, bool state) |
class KMultiTabBarTab * | tab (int id) const |
KMultiTabBarStyle | tabStyle () const |
virtual | ~KMultiTabBar () |
Protected Member Functions | |
virtual void | fontChange (const QFont &) |
void | updateSeparator () |
Member Enumeration Documentation
The list of available styles for KMultiTabBar
- VSNET - Visual Studio .Net like, always shows icon, only show the text of active tabs
- KDEV3ICON - Kdevelop 3 like, always shows the text and icons.
Definition at line 65 of file kmultitabbar.h.
Constructor & Destructor Documentation
KMultiTabBar::KMultiTabBar | ( | KMultiTabBarPosition | pos, | |
QWidget * | parent = 0 | |||
) | [explicit] |
Definition at line 447 of file kmultitabbar.cpp.
KMultiTabBar::~KMultiTabBar | ( | ) | [virtual] |
Definition at line 477 of file kmultitabbar.cpp.
Member Function Documentation
int KMultiTabBar::appendButton | ( | const QPixmap & | pic, | |
int | id = -1 , |
|||
QMenu * | popup = 0 , |
|||
const QString & | not_used_yet = QString() | |||
) |
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 484 of file kmultitabbar.cpp.
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 510 of file kmultitabbar.cpp.
KMultiTabBarButton * KMultiTabBar::button | ( | int | id | ) | const |
get a pointer to a button within the button area identified by its ID
Definition at line 516 of file kmultitabbar.cpp.
void KMultiTabBar::fontChange | ( | const QFont & | ) | [protected, virtual] |
Definition at line 590 of file kmultitabbar.cpp.
bool KMultiTabBar::isTabRaised | ( | int | id | ) | const |
KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position | ( | ) | const |
void KMultiTabBar::removeButton | ( | int | id | ) |
void KMultiTabBar::removeTab | ( | int | id | ) |
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 579 of file kmultitabbar.cpp.
void KMultiTabBar::setStyle | ( | KMultiTabBarStyle | style | ) |
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 553 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 528 of file kmultitabbar.cpp.
KMultiTabBar::KMultiTabBarStyle KMultiTabBar::tabStyle | ( | ) | const |
get the display style of the tabs
- Returns:
- display style
Definition at line 574 of file kmultitabbar.cpp.
void KMultiTabBar::updateSeparator | ( | ) | [protected] |
Definition at line 495 of file kmultitabbar.cpp.
The documentation for this class was generated from the following files: