User Tools

Site Tools


DzTabWidget

DAZScript wrapper for QTabWidget.

More...

Inherits :

Enumerations

DAZ Script
TabPosition{ North, South, West, East }

Properties

Constructors

DAZ Script
DzTabWidget ( DzWidget parent )

Methods

DAZ Script
NumberaddTab ( DzWidget page, String label )
voidclear ()
DzWidgetcornerWidget ()
DzWidgetcurrentWidget ()
NumberindexOf ( DzWidget page )
NumberinsertTab ( Number index, DzWidget page, String label )
boolisTabEnabled ( Number index )
voidremoveTab ( Number index )
voidsetCornerWidget ( DzWidget widget )
voidsetCurrentWidget ( DzWidget page )
voidsetTabEnabled ( Number index, Boolean enable )
voidsetTabText ( Number index, String label )
voidsetTabToolTip ( Number index, String tip )
voidsetTabWhatsThis ( Number index, String text )
StringtabText ( Number index )
StringtabToolTip ( Number index )
StringtabWhatsThis ( Number index )
DzWidgetwidget ( Number index )

Signals

voidcurrentChanged ( Number index )
voidtabCloseRequested ( Number index )

Detailed Description

A DzTabWidget provides a stack of tabbed widgets.

Enumerations


: TabPosition

Enumerated value for describing where the tab is drawn.

  • North - The top of the widget.
  • South - The bottom of the widget.
  • West - The left of the widget.
  • East - The right of the widget.

Properties


Number : count

The number of tabs in the tab stack. (Read-Only)


Number : currentIndex

The index position of the current tab page.


Boolean : documentMode

Whether or not the widget is rendered in a mode suitable for document pages, without a frame.


Boolean : movable

Whether or not the tabs can be reordered.


TabPosition : tabPosition

Holds which side of the widget the tab row is drawn on.


Boolean : tabsClosable

Whether or not close buttons are automatically added to each tab.

See Also:


Boolean : usesScrollButtons

Whether or not a tab bar should use buttons to scroll tabs when it has many tabs.

Constructors


DzTabWidget( DzWidget parent )

Creates a tab widget as a child of the given parent widget.

Parameter(s):

  • parent - The widget parent for the tab widget.

Methods


Number : addTab( DzWidget page, String label )

Adds page as a new tab with the given label.

Return Value:

  • The index of the added tab

void : clear()

Removes all the pages, but does not delete them.


DzWidget : cornerWidget()

Return Value:

  • The widget shown in the corner of the tab widget or null.

DzWidget : currentWidget()

Return Value:

  • The widget for the page currently being displayed.

Number : indexOf( DzWidget page )

Return Value:

  • The index position of the page occupied by widget, or -1 if widget cannot be found.

Number : insertTab( Number index, DzWidget page, String label )

Inserts page as a new tab with the label label at position index.

Return Value:

  • The index of the inserted tab.

bool : isTabEnabled( Number index )

Return Value:

  • true if the page at position index is enabled, otherwise false.

void : removeTab( Number index )

Removes the page at index from the tab widget.

Attention:

  • The widget itself is not deleted.

void : setCornerWidget( DzWidget widget )

Sets widget to be shown in the corner of the tab widget.


void : setCurrentWidget( DzWidget page )

Makes widget the current page.


void : setTabEnabled( Number index, Boolean enable )

Sets the enabled state of the page at position index.


void : setTabText( Number index, String label )

Sets the label of the page at position index.


void : setTabToolTip( Number index, String tip )

Sets the tool tip text for the page at position index.


void : setTabWhatsThis( Number index, String text )

Sets the what's this text for the page at position index.


String : tabText( Number index )

Return Value:

  • The label of the page at position index.

String : tabToolTip( Number index )

Return Value:

  • The tool tip for the page at position index.

String : tabWhatsThis( Number index )

Return Value:

  • The whats this text for the page at position index.

DzWidget : widget( Number index )

Return Value:

  • The widget for the page at position index.

Signals


void : currentChanged( Number index )

Signature:“currentChanged(int)”

Emitted whenever the current page index changes.


void : tabCloseRequested( Number index )

Signature:“tabCloseRequested(int)”

Emitted when the close button on a tab is clicked.