Isis Developer Reference
Isis::TabBar Class Reference

A TabBar is a QToolBar which is specifically designed to store and manage Tabs, which are specialized QToolButtons that can hide and show other QWidgets (see Tab). More...

#include <TabBar.h>

Inheritance diagram for Isis::TabBar:
Inheritance graph
Collaboration diagram for Isis::TabBar:
Collaboration graph

Public Member Functions

 TabBar ()
 construct a TabBar
 
virtual ~TabBar ()
 destruct a TabBar
 
virtual void addTab (Tab *newTab)
 Adds a Tab to the TabBar.
 
int curSelectedTab () const
 
void setRadioStyle (const bool &radioStyle)
 If set to true then the effect is that Tabs in the same radio group can only be selected one at a time.
 
bool radioStyle ()
 
int size () const
 
void setSelected (const int &index, const bool &status)
 Sets whether the Tab at the specified index is selected or not.
 
bool isSelected (const int &index)
 
bool noneSelected ()
 
void setEnabled (bool)
 Custom setEnabled method that also calls setEnabled for each of our Tabs.
 

Detailed Description

A TabBar is a QToolBar which is specifically designed to store and manage Tabs, which are specialized QToolButtons that can hide and show other QWidgets (see Tab).

Author
2010-05-07 Eric Hyer
See also
Tab

Constructor & Destructor Documentation

◆ TabBar()

Isis::TabBar::TabBar ( )

construct a TabBar

◆ ~TabBar()

Isis::TabBar::~TabBar ( )
virtual

destruct a TabBar

Member Function Documentation

◆ addTab()

void Isis::TabBar::addTab ( Tab * newTab)
virtual

Adds a Tab to the TabBar.

Note that The TabBar takes ownership of Tabs once they are added!

Parameters
newTabNew Tab to be added

◆ curSelectedTab()

int Isis::TabBar::curSelectedTab ( ) const

◆ isSelected()

bool Isis::TabBar::isSelected ( const int & index)
Parameters
indexIndex of the Tab. The first Tab added to the bar has an index of 0. The last Tab added has an index of size() - 1.
Returns
True if the Tab at the given index is selected, false otherwise

References isSelected(), and size().

Referenced by isSelected(), and noneSelected().

◆ noneSelected()

bool Isis::TabBar::noneSelected ( )
Returns
True if no Tabs are currently selected, false otherwise

References isSelected().

◆ radioStyle()

bool Isis::TabBar::radioStyle ( )
Returns
The current radio style being used

Referenced by setRadioStyle().

◆ setEnabled()

void Isis::TabBar::setEnabled ( bool newEnabledStatus)

Custom setEnabled method that also calls setEnabled for each of our Tabs.

Parameters
newEnabledStatusThe new enabled status that will be applied to the TabBar and all of its Tabs

References size().

◆ setRadioStyle()

void Isis::TabBar::setRadioStyle ( const bool & radioStyle)

If set to true then the effect is that Tabs in the same radio group can only be selected one at a time.

When a Tab is selected all other Tabs in the same radio group would automatically be deselected. If set to false then all Tabs in the TabBar will behave independent from eachother regardless of how their radio groups are set.

Parameters
radioStyleTrue if radio style should be used, false otherwise

References radioStyle().

◆ setSelected()

void Isis::TabBar::setSelected ( const int & index,
const bool & status )

Sets whether the Tab at the specified index is selected or not.

Parameters
indexIndex of the Tab. The first Tab added to the bar has an index of 0. The last Tab added has an index of size() - 1
statusTrue if the Tab should be selected, false otherwise

References size().

◆ size()

int Isis::TabBar::size ( ) const
Returns
The number of Tabs currently in the TabBar

Referenced by isSelected(), setEnabled(), and setSelected().


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