PanelTabBar Class Reference

Class for tab bar. More...

#include <paneltabbar.h>

List of all members.

Public Slots

void deselectTabs ()
 This slot is used to clear tab selections.
void selectTab (int index)
 This slot selects a tab at given index.

Signals

void currentChanged (int index)
 This signal is emitted whenever the current tab changes.
void sizeChangeRequested ()
 This signal is emitted when tabs are added or removed.
void tabCloseRequested (int index)
 This signal is emitted whenever user wants to close a tab.

Public Member Functions

 PanelTabBar (QWidget *parent=0)
 Constructor.
int addTab (const QIcon &icon)
 Adds a tab.
int insertTab (int index, const QIcon &icon)
 Inserts a tab.
void removeTab (int index)
 Removes a tab.
QButtonGroup * tabs () const
 Returns all tabs.

Private Slots

void setCurrentIndex (int index)
 Sets the tab at current index active.

Private Member Functions

void setUpTabLayout ()
 Initializes and formats tab buttons layout.

Private Attributes

int m_activeTab
 Index of a active tab.
QButtonGroup * m_tabButtonGroup
 Button groub for tab buttons.

Detailed Description

Class for tab bar.

Author:
Pekka Nissinen - pekka.nissinen (at) ixonos.com

Constructor & Destructor Documentation

PanelTabBar::PanelTabBar ( QWidget *  parent = 0  ) 

Constructor.

Parameters:
parent Parent

Member Function Documentation

int PanelTabBar::addTab ( const QIcon &  icon  ) 

Adds a tab.

Adds a tab with icon and returns the index of the inserted tab

Parameters:
icon Icon of the tab
void PanelTabBar::currentChanged ( int  index  )  [signal]

This signal is emitted whenever the current tab changes.

Parameters:
index Index of the new tab
int PanelTabBar::insertTab ( int  index,
const QIcon &  icon 
)

Inserts a tab.

Inserts a tab with icon at the specified index and returns the index of the inserted tab. If index is out of range, the tab is appended.

Parameters:
index Index of the tab
icon Icon of the tab
void PanelTabBar::removeTab ( int  index  ) 

Removes a tab.

Removes a tab at index position

Todo:
: Fix tab drawing order
Parameters:
index Index of the tab
void PanelTabBar::selectTab ( int  index  )  [slot]

This slot selects a tab at given index.

Parameters:
index Index of the tab
void PanelTabBar::setCurrentIndex ( int  index  )  [private, slot]

Sets the tab at current index active.

Parameters:
index Index of the tab
void PanelTabBar::tabCloseRequested ( int  index  )  [signal]

This signal is emitted whenever user wants to close a tab.

Parameters:
index Index of the currently active tab
QButtonGroup * PanelTabBar::tabs (  )  const

Returns all tabs.

Returns:
All tabs

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

Generated on Fri Sep 3 12:05:42 2010 for Situare client for Maemo by  doxygen 1.6.1