User Tools

Site Tools


DzEnumSlider

DAZScript integer slider that displays a set of string values in place of numeric values.

More...

Inherits :

Properties

Constructors

DAZ Script
DzEnumSlider ( DzWidget parent )

Methods

DAZ Script
NumberaddItem ( String label )
voidclear ()
StringgetItem ( Number which )
voidmoveItem ( Number which, Number idx )
voidremoveItem ( Number which )
voidrenameItem ( Number which, String label )

Signals

voideditEnd ()
voideditStart ()
voidvalueChanged ( Number value )

Detailed Description

A DzEnumSlider provides a control that allows a user to adjust a bounded, enumerated, integer value. The slider is clamped by default, and automatically sets its min and max range according to the number of string values it contains.

Properties


Number : count

Holds the number of items on the slider. (Read Only)


String : text

Holds the text of the slider. (Read Only)


Number : value

Holds the current value of the slider.

Constructors


DzEnumSlider( DzWidget parent )

Creates a new enumerated slider widget.

Parameter(s):

  • parent - The widget parent for the slider.

Methods


Number : addItem( String label )

Adds a string to the list of items, and adjusts the maximum value for the slider.

Parameter(s):

  • label - The string value to add to the list of items in the slider.

Return Value:

  • The index of the item - this is the numeric value of the slider that corresponds to the string value.

void : clear()

Clears the list of string values for this slider.


String : getItem( Number which )

Return Value:

  • The String representing the which item.

void : moveItem( Number which, Number idx )

Moves the item at index which to idx.

Parameter(s):

  • which - The index of the item to move. If out of range, this method has no effect.
  • idx - The index to move which to. If out of range, which becomes the last item.

void : removeItem( Number which )

Removes the item at which from the list.

Parameter(s):

  • which - The index of the item. If out of range, this method has no effect.

void : renameItem( Number which, String label )

Renames the item at index which.

Parameter(s):

  • which - The index of the item to rename. If out of range, this method has no effect.
  • label - The new value of the item at index which.

Signals


void : editEnd()

Signature:“editEnd()”

Emitted when the user releases the slider.


void : editStart()

Signature:“editStart()”

Emitted when the user starts dragging the slider.


void : valueChanged( Number value )

Signature:“valueChanged(int)”

Emitted when the value of the slider changes, passes the new value.