TabbedPanel Class Reference

Class for tabbed panels. More...

#include <tabbedpanel.h>

Collaboration diagram for TabbedPanel:
Collaboration graph
[legend]

List of all members.

Public Slots

void closePanel ()
 Slot that closes the panel.
void openPanel (QWidget *widget=0)
 Slot that opens the panel.
void resizePanel (const QSize &size)
 Slot to redraw the panel after window resize event.

Signals

void currentChanged (int index)
 This signal is emitted whenever the current tab page changes.
void panelClosed ()
 Signal that is sent when panel is closed.
void panelOpened ()
 Signal that is sent when panel is opened.
void toggleState ()
 Signal that is sent when the panel state must be changed.

Public Member Functions

 TabbedPanel (QWidget *parent=0)
 Constructor.
int addTab (QWidget *widget, const QIcon &icon)
 Adds a tab to the panel.
int insertTab (int index, QWidget *widget, const QIcon &icon)
 Inserts a tab to the panel.
void removeTab (int index)
 Removes a tab from the panel.
void setTabsEnabled (const QList< int > &tabIndexes, bool enabled)
 Sets tabs enabled.

Private Slots

void calculateMask ()
 Calculates mask for tabbed panel.
void repositionContextButtonBar ()
 Repositions context button bar.
void setCurrentIndex (int index)
 Sets the panel at current index active.
void stateChanged ()
 Internal slot used to set the panel state.

Private Attributes

bool m_open
 Current state of the panel.
bool m_closeRequestPending
 Indicates wheater the panel is waiting to be closed.
QState * m_stateClosed
 State of the closed panel.
QState * m_stateOpened
 State of the opened panel.
PanelBarm_panelBar
 Widget for panel bar.
PanelContentStackm_panelContentStack
 Stack for panel widgets.
PanelContextButtonBarm_panelContextButtonBar
 Widget for panel context button bar.
PanelTabBarm_panelTabBar
 Widget for panel tab bar.

Detailed Description

Class for tabbed panels.

Author:
Kaj Wallin - kaj.wallin (at) ixonos.com
Pekka Nissinen - pekka.nissinen (at) ixonos.com

Constructor & Destructor Documentation

TabbedPanel::TabbedPanel ( QWidget *  parent = 0  ) 

Constructor.

Parameters:
parent Parent

Member Function Documentation

int TabbedPanel::addTab ( QWidget *  widget,
const QIcon &  icon 
)

Adds a tab to the panel.

Adds a tab with the given widget and icon into the tabbed panel and returns the index of the inserted tab.

Parameters:
widget Widget to be added into the tab
icon Icon of the tab
void TabbedPanel::calculateMask (  )  [private, slot]

Calculates mask for tabbed panel.

Mask is constructed from PanelTabBar, PanelContextButtonBar and panel content sizes

void TabbedPanel::currentChanged ( int  index  )  [signal]

This signal is emitted whenever the current tab page changes.

Parameters:
index Index of the new tab page
int TabbedPanel::insertTab ( int  index,
QWidget *  widget,
const QIcon &  icon 
)

Inserts a tab to the panel.

Inserts a tab with the given widget and icon into the tabbed panel at the specified index, and returns the index of the inserted tab.

If index is out of range, the tab is simply appended. Otherwise it is inserted at the specified position.

Parameters:
index Index of the tab
widget Widget to be inserted into the tab
icon Icon of the tab
void TabbedPanel::openPanel ( QWidget *  widget = 0  )  [slot]

Slot that opens the panel.

If widget pointer is provided the corresponding tab is also set active

Parameters:
widget Widget
void TabbedPanel::panelClosed (  )  [signal]

Signal that is sent when panel is closed.

See also:
openPanel
closePanel
void TabbedPanel::panelOpened (  )  [signal]

Signal that is sent when panel is opened.

See also:
openPanel
closePanel
void TabbedPanel::removeTab ( int  index  ) 

Removes a tab from the panel.

Removes a tab and its widget from the panel at index position. The widget itself is not deleted.

Parameters:
index Index of the tab
void TabbedPanel::resizePanel ( const QSize &  size  )  [slot]

Slot to redraw the panel after window resize event.

Parameters:
size Size of the new window
void TabbedPanel::setCurrentIndex ( int  index  )  [private, slot]

Sets the panel at current index active.

Parameters:
index Index of the panel
void TabbedPanel::setTabsEnabled ( const QList< int > &  tabIndexes,
bool  enabled 
)

Sets tabs enabled.

If disabled tab is currently selected, panel will be closed also

Parameters:
tabIndexes tab indexes to set
enabled true if should be enabled, false otherwise
void TabbedPanel::toggleState (  )  [signal]

Signal that is sent when the panel state must be changed.

See also:
openPanel
closePanel

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