User Tools

Site Tools


DzBasicDialog

A basic dialog that provides typical buttons found on most DAZ Studio dialogs.

More...

Inherits :

Constructors

DAZ Script
DzBasicDialog ()

Methods

DAZ Script
voidaddButton ( DzButton btn, Number index=1 )
voidaddLayout ( DzLayout layout, Number stretch=0 )
voidaddSpacing ( Number spacing )
voidaddStretch ( Number stretch=0 )
voidaddWidget ( DzWidget child, Number stretch=0, DzWidget::AlignmentFlags alignment=0 )
voidinsertWidget ( Number index, DzWidget child, Number stretch=0, DzWidget::AlignmentFlags alignment=0 )
voidsetAcceptButtonEnabled ( Boolean onOff )
voidsetAcceptButtonText ( String text )
voidsetApplyButtonEnabled ( Boolean onOff )
voidsetApplyButtonText ( String text )
voidsetCancelButtonEnabled ( Boolean onOff )
voidsetCancelButtonText ( String text )
voidsetHelpButtonEnabled ( Boolean onOff )
voidshowAcceptButton ( Boolean onOff )
voidshowApplyButton ( Boolean onOff )
voidshowCancelButton ( Boolean onOff )
voidshowHelpButton ( Boolean onOff )

Signals

voidapplyClicked ()

Detailed Description

The buttons provided by the dialog are: 'What's This', 'Apply', 'Accept', and 'Cancel'. Custom buttons can also be added to the set of default buttons by calling addButton(). All buttons but the 'Accept' button can be hidden or shown. By default, the 'Apply' button is the only hidden button. The text on the default buttons can be customized.

The dialog has a vertical box layout above the horizontal set of buttons. Widgets and sub-layouts can be added to this layout using addWidget() and addLayout().

See Also:

Constructors


DzBasicDialog()

Default Constructor. Creates a typical DAZ Studio dialog with 'What's This', 'Apply', 'Accept', and 'Cancel' buttons. By default, the 'Apply' button is hidden, call showApplyButton() to make it visible.

Methods


void : addButton( DzButton btn, Number index=1 )

Adds a button into the horizontal layout of the dialog's button bar.

Parameter(s):

  • btn - The button to add to the dialog's button layout.
  • index - The position in the button bar to insert the button.

void : addLayout( DzLayout layout, Number stretch=0 )

Adds a layout into the main vertical layout of the dialog.

Parameter(s):

  • child - The layout to add as a child of the dialog's main layout.
  • stretch - The stretch factor for the child layout.

void : addSpacing( Number spacing )

Adds spacing into the main vertical layout of the dialog.

Parameter(s):

  • spacing - The amount of spacing to add.

void : addStretch( Number stretch=0 )

Adds stretch into the main vertical layout of the dialog.

Parameter(s):

  • stretch - The stretch factor for the added stretchable space.

void : addWidget( DzWidget child, Number stretch=0, DzWidget::AlignmentFlags alignment=0 )

Adds a widget into the main vertical layout of the dialog.

Parameter(s):

  • child - The widget to add to the dialog's main layout.
  • stretch - The stretch factor for the child widget.
  • alignment - The alignment for the child widget.(since 4.9.3.93)

void : insertWidget( Number index, DzWidget child, Number stretch=0, DzWidget::AlignmentFlags alignment=0 )

Inserts a widget into the main vertical layout of the dialog.

Parameter(s):

  • index - The index to insert the widget at.
  • child - The widget to add to the dialog's main layout.
  • stretch - The stretch factor for the child widget.
  • alignment - The alignment for the child widget.

Since:

  • 4.9.3.93

void : setAcceptButtonEnabled( Boolean onOff )

Enables or disables the Accept button. By default, the button is enabled.

Parameter(s):

  • onOff - If true, the 'Accept' button will be available to the user. If false, the button will not be shown.

void : setAcceptButtonText( String text )

Sets the text for the dialog's accept button. By default, the button is labelled 'Accept'.

Parameter(s):

  • text - The new label for the accept button.

void : setApplyButtonEnabled( Boolean onOff )

Enables or disables the Apply button. By default, the button is disabled.

Parameter(s):

  • onOff - If true, the 'Apply' button will be available to the user. If false, the button will not be shown.

void : setApplyButtonText( String text )

Sets the text for the dialog's apply button. By default, the button is labelled 'Apply'.

Parameter(s):

  • text - The new label for the apply button.

void : setCancelButtonEnabled( Boolean onOff )

Enables or disables the Cancel button. By default, the button is enabled.

Parameter(s):

  • onOff - If true, the 'Cancel' button will be available to the user. If false, the button will not be shown.

void : setCancelButtonText( String text )

Sets the text for the dialog's cancel button. By default, the button is labelled 'Cancel'.

Parameter(s):

  • text - The new label for the cancel button.

void : setHelpButtonEnabled( Boolean onOff )

Enables or disables the Help button. By default, the button is enabled.

Parameter(s):

  • onOff - If true, the 'Help' button will be available to the user. If false, the button will not be shown.

void : showAcceptButton( Boolean onOff )

Shows or hides the 'Accept' button. By default, the button is shown.

Parameter(s):

  • onOff - If true, the 'Accept' button will be available to the user. If false, the button will not be shown.

void : showApplyButton( Boolean onOff )

Shows or hides the 'Apply' button. By default, the button is hidden.

Parameter(s):

  • onOff - If true, the 'Apply' button will be available to the user. If false, the button will not be shown.

void : showCancelButton( Boolean onOff )

Shows or hides the 'Cancel' button. By default, the button is shown.

Parameter(s):

  • onOff - If true, the 'Cancel' button will be available to the user. If false, the button will not be shown.

void : showHelpButton( Boolean onOff )

Shows or hides the 'What's This' button. By default, the button is shown.

Parameter(s):

  • onOff - If true, the 'What's This' button will be available to the user. If false, the button will not be shown.

Signals


void : applyClicked()

Signature:“applyClicked()”

Emitted when the 'Apply' button is clicked by the user.