- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends

# QTabBar Class Reference

Search for all occurrences

## Detailed Description

Definition at line 59 of file qtabbar.h.

`#include <qtabbar.h>`

Inheritance diagram for QTabBar:
[legend]

List of all members.

## Public Types
enum | Shape { RoundedNorth, RoundedSouth, RoundedWest, RoundedEast, TriangularNorth, TriangularSouth, TriangularWest, TriangularEast }
enum | ButtonPosition { LeftSide, RightSide }
enum | SelectionBehavior { SelectLeftTab, SelectRightTab, SelectPreviousTab }
## Public Slots
void | setCurrentIndex (int index)
## Signals
void | currentChanged (int index)
void | tabCloseRequested (int index)
void | tabMoved (int from, int to)
## Public Member Functions
| QTabBar (QWidget *parent=0)
| ~QTabBar ()
Shape | shape () const
void | setShape (Shape shape)
int | addTab (const QString &text)
int | addTab (const QIcon &icon, const QString &text)
int | insertTab (int index, const QString &text)
int | insertTab (int index, const QIcon &icon, const QString &text)
void | removeTab (int index)
void | moveTab (int from, int to)
bool | isTabEnabled (int index) const
void | setTabEnabled (int index, bool)
QString | tabText (int index) const
void | setTabText (int index, const QString &text)
QColor | tabTextColor (int index) const
void | setTabTextColor (int index, const QColor &color)
QIcon | tabIcon (int index) const
void | setTabIcon (int index, const QIcon &icon)
Qt::TextElideMode | elideMode () const
void | setElideMode (Qt::TextElideMode)
void | setTabToolTip (int index, const QString &tip)
QString | tabToolTip (int index) const
void | setTabWhatsThis (int index, const QString &text)
QString | tabWhatsThis (int index) const
void | setTabData (int index, const QVariant &data)
QVariant | tabData (int index) const
QRect | tabRect (int index) const
int | tabAt (const QPoint &pos) const
int | currentIndex () const
int | count () const
QSize | sizeHint () const
QSize | minimumSizeHint () const
void | setDrawBase (bool drawTheBase)
bool | drawBase () const
QSize | iconSize () const
void | setIconSize (const QSize &size)
bool | usesScrollButtons () const
void | setUsesScrollButtons (bool useButtons)
bool | tabsClosable () const
void | setTabsClosable (bool closable)
void | setTabButton (int index, ButtonPosition position, QWidget *widget)
QWidget * | tabButton (int index, ButtonPosition position) const
SelectionBehavior | selectionBehaviorOnRemove () const
void | setSelectionBehaviorOnRemove (SelectionBehavior behavior)
bool | expanding () const
void | setExpanding (bool enabled)
bool | isMovable () const
void | setMovable (bool movable)
bool | documentMode () const
void | setDocumentMode (bool set)
## Protected Member Functions
virtual QSize | tabSizeHint (int index) const
virtual void | tabInserted (int index)
virtual void | tabRemoved (int index)
virtual void | tabLayoutChange ()
bool | event (QEvent *)
void | resizeEvent (QResizeEvent *)
void | showEvent (QShowEvent *)
void | hideEvent (QHideEvent *)
void | paintEvent (QPaintEvent *)
void | mousePressEvent (QMouseEvent *)
void | mouseMoveEvent (QMouseEvent *)
void | mouseReleaseEvent (QMouseEvent *)
void | wheelEvent (QWheelEvent *event)
void | keyPressEvent (QKeyEvent *)
void | changeEvent (QEvent *)
void | initStyleOption (QStyleOptionTab *option, int tabIndex) const
## Properties
Shape | shape
int | currentIndex
int | count
bool | drawBase
QSize | iconSize
Qt::TextElideMode | elideMode
bool | usesScrollButtons
bool | tabsClosable
SelectionBehavior | selectionBehaviorOnRemove
bool | expanding
bool | movable
bool | documentMode
## Friends
class | QAccessibleTabBar

## Member Enumeration Documentation

enum Shape

Search for all occurrences

Enumerator:

  RoundedNorth | Search for all occurrences
  RoundedSouth | Search for all occurrences
  RoundedWest | Search for all occurrences
  RoundedEast | Search for all occurrences
  TriangularNorth | Search for all occurrences
  TriangularSouth | Search for all occurrences
  TriangularWest | Search for all occurrences
  TriangularEast | Search for all occurrences

Definition at line 81 of file qtabbar.h.

                   { RoundedNorth, RoundedSouth, RoundedWest, RoundedEast,
                     TriangularNorth, TriangularSouth, TriangularWest, TriangularEast
    #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
                    , RoundedAbove = RoundedNorth, RoundedBelow = RoundedSouth,
                    TriangularAbove = TriangularNorth, TriangularBelow = TriangularSouth
    #endif
        };

enum ButtonPosition

Search for all occurrences

Enumerator:

  LeftSide | Search for all occurrences
  RightSide | Search for all occurrences

Definition at line 89 of file qtabbar.h.

                            {
            LeftSide,
            RightSide
        };

enum SelectionBehavior

Search for all occurrences

Enumerator:

  SelectLeftTab | Search for all occurrences
  SelectRightTab | Search for all occurrences
  SelectPreviousTab | Search for all occurrences

Definition at line 94 of file qtabbar.h.

                               {
            SelectLeftTab,
            SelectRightTab,
            SelectPreviousTab
        };

## Constructor & Destructor Documentation

QTabBar | ( | QWidget * | parent = `0` | ) | `[explicit]`

~QTabBar | ( |  | ) |

## Member Function Documentation

Shape shape | ( |  | ) | const

Search for all occurrences

void setShape | ( | Shape | shape | ) |

Search for all occurrences

int addTab | ( | const QString & | text | ) |

Search for all occurrences

int addTab | ( | const QIcon & | icon,
|  | const QString & | text
| ) |  |

Search for all occurrences

int insertTab | ( | int | index,
|  | const QString & | text
| ) |  |

Search for all occurrences

int insertTab | ( | int | index,
|  | const QIcon & | icon,
|  | const QString & | text
| ) |  |

Search for all occurrences

void removeTab | ( | int | index | ) |

Search for all occurrences

void moveTab | ( | int | from,
|  | int | to
| ) |  |

Search for all occurrences

bool isTabEnabled | ( | int | index | ) | const

Search for all occurrences

void setTabEnabled | ( | int | index,
|  | bool |
| ) |  |

Search for all occurrences

QString tabText | ( | int | index | ) | const

Search for all occurrences

void setTabText | ( | int | index,
|  | const QString & | text
| ) |  |

Search for all occurrences

QColor tabTextColor | ( | int | index | ) | const

Search for all occurrences

void setTabTextColor | ( | int | index,
|  | const QColor & | color
| ) |  |

Search for all occurrences

QIcon tabIcon | ( | int | index | ) | const

Search for all occurrences

void setTabIcon | ( | int | index,
|  | const QIcon & | icon
| ) |  |

Search for all occurrences

Qt::TextElideMode elideMode | ( |  | ) | const

Search for all occurrences

void setElideMode | ( | Qt::TextElideMode |  | ) |

Search for all occurrences

void setTabToolTip | ( | int | index,
|  | const QString & | tip
| ) |  |

Search for all occurrences

QString tabToolTip | ( | int | index | ) | const

Search for all occurrences

void setTabWhatsThis | ( | int | index,
|  | const QString & | text
| ) |  |

Search for all occurrences

QString tabWhatsThis | ( | int | index | ) | const

Search for all occurrences

void setTabData | ( | int | index,
|  | const QVariant & | data
| ) |  |

Search for all occurrences

QVariant tabData | ( | int | index | ) | const

Search for all occurrences

QRect tabRect | ( | int | index | ) | const

Search for all occurrences

int tabAt | ( | const QPoint & | pos | ) | const

Search for all occurrences

int currentIndex | ( |  | ) | const

Search for all occurrences

int count | ( |  | ) | const

Search for all occurrences

QSize sizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

QSize minimumSizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

void setDrawBase | ( | bool | drawTheBase | ) |

Search for all occurrences

bool drawBase | ( |  | ) | const

Search for all occurrences

QSize iconSize | ( |  | ) | const

Search for all occurrences

void setIconSize | ( | const QSize & | size | ) |

Search for all occurrences

bool usesScrollButtons | ( |  | ) | const

Search for all occurrences

void setUsesScrollButtons | ( | bool | useButtons | ) |

Search for all occurrences

bool tabsClosable | ( |  | ) | const

Search for all occurrences

void setTabsClosable | ( | bool | closable | ) |

Search for all occurrences

void setTabButton | ( | int | index,
|  | ButtonPosition | position,
|  | QWidget * | widget
| ) |  |

Search for all occurrences

QWidget* tabButton | ( | int | index,
|  | ButtonPosition | position
| ) |  | const

Search for all occurrences

SelectionBehavior selectionBehaviorOnRemove | ( |  | ) | const

Search for all occurrences

void setSelectionBehaviorOnRemove | ( | SelectionBehavior | behavior | ) |

Search for all occurrences

bool expanding | ( |  | ) | const

Search for all occurrences

void setExpanding | ( | bool | enabled | ) |

Search for all occurrences

bool isMovable | ( |  | ) | const

Search for all occurrences

void setMovable | ( | bool | movable | ) |

Search for all occurrences

bool documentMode | ( |  | ) | const

Search for all occurrences

void setDocumentMode | ( | bool | set | ) |

Search for all occurrences

void setCurrentIndex | ( | int | index | ) | `[slot]`

Search for all occurrences

void currentChanged | ( | int | index | ) | `[signal]`

Search for all occurrences

void tabCloseRequested | ( | int | index | ) | `[signal]`

Search for all occurrences

void tabMoved | ( | int | from,
|  | int | to
| ) |  | `[signal]`

Search for all occurrences

virtual QSize tabSizeHint | ( | int | index | ) | const `[protected, virtual]`

Search for all occurrences

virtual void tabInserted | ( | int | index | ) | `[protected, virtual]`

Search for all occurrences

virtual void tabRemoved | ( | int | index | ) | `[protected, virtual]`

Search for all occurrences

virtual void tabLayoutChange | ( |  | ) | `[protected, virtual]`

Search for all occurrences

bool event | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void resizeEvent | ( | QResizeEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void showEvent | ( | QShowEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void hideEvent | ( | QHideEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void paintEvent | ( | QPaintEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mousePressEvent | ( | QMouseEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseMoveEvent | ( | QMouseEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseReleaseEvent | ( | QMouseEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void wheelEvent | ( | QWheelEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void keyPressEvent | ( | QKeyEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void changeEvent | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void initStyleOption | ( | QStyleOptionTab * | option,
|  | int | tabIndex
| ) |  | const `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QAccessibleTabBar `[friend]`

Search for all occurrences

Definition at line 212 of file qtabbar.h.

## Property Documentation

Shape shape `[read, write]`

Search for all occurrences

Definition at line 64 of file qtabbar.h.

int currentIndex `[read, write]`

Search for all occurrences

Definition at line 65 of file qtabbar.h.

int count `[read]`

Search for all occurrences

Definition at line 66 of file qtabbar.h.

bool drawBase `[read, write]`

Search for all occurrences

Definition at line 67 of file qtabbar.h.

QSize iconSize `[read, write]`

Search for all occurrences

Definition at line 68 of file qtabbar.h.

Qt::TextElideMode elideMode `[read, write]`

Search for all occurrences

Definition at line 69 of file qtabbar.h.

bool usesScrollButtons `[read, write]`

Search for all occurrences

Definition at line 70 of file qtabbar.h.

bool tabsClosable `[read, write]`

Search for all occurrences

Definition at line 71 of file qtabbar.h.

SelectionBehavior selectionBehaviorOnRemove `[read, write]`

Search for all occurrences

Definition at line 72 of file qtabbar.h.

bool expanding `[read, write]`

Search for all occurrences

Definition at line 73 of file qtabbar.h.

bool movable `[read, write]`

Search for all occurrences

Definition at line 74 of file qtabbar.h.

bool documentMode `[read, write]`

Search for all occurrences

Definition at line 75 of file qtabbar.h.

The documentation for this class was generated from the following file:

- QtGui/qtabbar.h

QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar
QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar QTabBar