The QTabBar class provides a tab bar, for use in e.g. tabbed dialogs. More...
#include <qtabbar.h>
Inherits QWidget.
As implemented, the class provides a look and feel suitable for QTabDialog. It can be subclassed easily, to provide tab bars with other appearances.
The following virtual functions may need to be reimplemented:
Create a new, empty tab bar.
Delete the tab control and free the memory it used.
[virtual]
Add newTab to the tab control.
Allocate a new id, set t's id, locate it just to the right of the existing tabs, add it to the bar, and return the newly allocated id.
If a page is currently visible, returns its ID. If no page is currently visible, returns either -1 or the ID of one of the pages.
Even if the return value is not -1, you cannot assume either that the user can see the relevant page, or that the tab is enabled.
When when you need to display something, the return value from this function represents the best page to display. That's all.
See also: selected().
Return TRUE if the tab with id id is enabled, or FALSE if it is disabled or there is no such tab.
See also: setTabEnabled().
[virtual protected]
Handles the tab bar's keyboard interface (if enabled).
The right and left arrow keys move a selector, the space bar makes the tab with the selector active. All other keys are ignored.
Reimplemented from QWidget.
If this tab control has keyboard focus, returns the ID of the tab Space will select. Otherwise, returns -1.
[virtual protected]
Handles mouse press events; records what tab the mouse points to.
Reimplemented from QWidget.
[virtual protected]
Handles mouse release events for the tab control. Checks that the mouse is released over the tab where it was pressed, and if it was, selects that tab.
Reimplemented from QWidget.
[virtual protected]
Paint the single tab t using p. If and only if selected is TRUE, t is currently selected.
This virtual function may be reimplemented to change the look of QTabBar. If you decide to reimplement it, you may also need to reimplement sizeHint().
[virtual protected]
Repaints the tab row. All the painting is done by paint(); paintEvent() only decides which tabs need painting and in what order.
See also: paint().
Reimplemented from QWidget.
[virtual protected]
This virtual functions is called by the mouse event handlers to determine which tab is pressed. The default implementation returns a pointer to the tab whose bounding rectangle contains p, if exactly one tab's bounding rectangle contains p. It returns 0 else.
See also: mousePressEvent() and mouseReleaseEvent().
Enable tab id if enable is TRUE, or disable it if enable is FALSE.
setTabEnabled() calls repaint() if this causes a change in id's status.
See also: update() and isTabEnabled().
[virtual]
Shows the widget, and ensures that one tab is selected.
Reimplemented from QWidget.
[virtual]
Returns a suitable size for the tab control.
Reimplemented from QWidget.
This file is part of the Qt toolkit, copyright © 1995-97 Troll Tech, all rights reserved.
It was generated from the following files: