Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Properties
CTabWidget Class Reference

CTabWidget is a widget representing a tab in the mainwindow. More...

#include <tab-widget.hh>

List of all members.

Public Types

enum  SelectionBehavior { SelectCurrent, SelectNew }

Public Slots

void closeTab ()
void closeTab (int index)
void prev ()
void next ()
void changeTabText (const QString &text)

Public Member Functions

 CTabWidget (QWidget *parent=0)
 Constructor.
virtual ~CTabWidget ()
 Destructor.
int addTab (QWidget *widget)
int addTab (QWidget *widget, const QString &label)
SelectionBehavior selectionBehaviorOnAdd () const
void setSelectionBehaviorOnAdd (SelectionBehavior behavior)

Protected Member Functions

void updateTabBarVisibility ()

Properties

SelectionBehavior selectionBehaviorOnAdd

Detailed Description

CTabWidget is a widget representing a tab in the mainwindow.

Note that a tab-widget is a generic widget that is a plain container but from the application point of view, two kinds of tabs should be distinguished :


Member Enumeration Documentation

This enum type is used to determine focus for new tabs.

Enumerator:
SelectCurrent 

this will keep focus on the current tab.

SelectNew 

this will shift focus on the new tab.


Member Function Documentation

int CTabWidget::addTab ( QWidget *  widget)

Add a new tab with widget as his parent and returns the new tab position in the bar. The tab's label is the title of the parent widget's window.

int CTabWidget::addTab ( QWidget *  widget,
const QString &  label 
)

Add a new tab with a title label and widget as its parent.

void CTabWidget::changeTabText ( const QString &  text)
slot

Change the tab label.

Parameters:
textthe new label
void CTabWidget::closeTab ( )
slot

Close the current tab.

void CTabWidget::closeTab ( int  index)
slot

Close the tab at a given index.

Parameters:
indexa tab index
void CTabWidget::next ( )
slot

The current tab becomes the previous tab on the left.

void CTabWidget::prev ( )
slot

The current tab becomes the next tab on the right.

SelectionBehavior CTabWidget::selectionBehaviorOnAdd ( ) const

Returns the selection behavior to apply when a new tab is added.

See also:
setSelectionBehaviorOnAdd, SelectionBehavior
void CTabWidget::setSelectionBehaviorOnAdd ( CTabWidget::SelectionBehavior  behavior)

Sets the selection behavior to apply when a new tab is added. This defines if the focus should be set on the tab or kept on current tab.

See also:
selectionBehaviorOnAdd, SelectionBehavior
void CTabWidget::updateTabBarVisibility ( )
protected

Hide or display the tab bar. The tab bar is hidden when there is only the library tab to be displayed (no song-editor tabs).


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