User Tools

Site Tools


DzComboBox

DAZScript wrapper for QComboBox.

More...

Inherits :

Enumerations

Properties

Constructors

DAZ Script
DzComboBox ( DzWidget parent )

Methods

DAZ Script
voidaddItem ( String text, String userData=“” )
voidaddItems ( Array texts )
voidclear ()
NumberfindData ( String data )
NumberfindText ( String text )
voidinsertItem ( Number index, String text, String userData=“” )
voidinsertItems ( Number index, Array list )
voidinsertSeparator ( Number index )
StringitemData ( Number index )
StringitemText ( Number index )
voidremoveItem ( Number index )
voidsetItemData ( Number index, String value )
voidsetItemText ( Number index, String text )

Signals

voidactivated ( Number index )
voidactivated ( String text )
voidcurrentIndexChanged ( String text )
voidcurrentIndexChanged ( Number index )
voidhighlighted ( String text )
voidhighlighted ( Number index )
voidtextChanged ( String text )

Detailed Description

DzComboBox provides a means of presenting a list of options to the user in a way that takes up the minimum amount of screen space.

Enumerations


: InsertPolicy

TODO: Add description.

  • NoInsert - TODO: Add description.
  • InsertAtTop - TODO: Add description.
  • InsertAtCurrent - TODO: Add description.
  • InsertAtBottom - TODO: Add description.
  • InsertAfterCurrent - TODO: Add description.
  • InsertBeforeCurrent - TODO: Add description.
  • InsertAlphabetically - TODO: Add description.

—–

: SizeAdjustPolicy

TODO: Add description.

  • AdjustToContents - TODO: Add description.
  • AdjustToContentsOnFirstShow - TODO: Add description.
  • AdjustToMinimumContentsLength - TODO: Add description.
  • AdjustToMinimumContentsLengthWithIcon - TODO: Add description.

Properties


Number : count

Holds the number of items in the combobox. (Read Only)


Number : currentItem

Holds the index of the currently selected item in the combobox.


String : currentText

Holds the text of the currently selected item in the combobox.


InsertPolicy : insertPolicy

Holds the policy used to determine where user-inserted items should appear in the combobox.


Number : maxVisibleItems

Holds the maximum number of items allowed on screen; 10 by default.


Number : minimumContentsLength

Holds the minimum number of characters that should fit in the combobox.


SizeAdjustPolicy : sizeAdjustPolicy

Holds the policy describing how the size of the combobox changes when the content changes.

Constructors


DzComboBox( DzWidget parent )

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

Parameter(s):

  • parent - The widget parent for the combobox.

Methods


void : addItem( String text, String userData=“” )

Adds text to the list of items in the combobox.


void : addItems( Array texts )

Adds each of the strings in texts to the combobox


void : clear()

Removes all items from the combobox.


Number : findData( String data )

Return Value:

  • The index of the item containing data; otherwise returns -1.

Number : findText( String text )

Return Value:

  • The index of the item containing text; otherwise returns -1.

void : insertItem( Number index, String text, String userData=“” )

Inserts the text and userData into the combobox at index. If index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If index is zero or negative, the new item is prepended to the list of existing items.


void : insertItems( Number index, Array list )

Inserts the strings in list into the combobox as separate items, starting at index.


void : insertSeparator( Number index )

Inserts a separator into the combobox at index.


String : itemData( Number index )

Return Value:

  • The data of the item at index.

String : itemText( Number index )

Return Value:

  • The text of the item at index.

void : removeItem( Number index )

Removes the item at index from the list of items.


void : setItemData( Number index, String value )

Sets the data for the item at index.


void : setItemText( Number index, String text )

Sets the text for the item at index.

Signals


void : activated( Number index )

Signature:“activated(int)”

Emitted when an item is selected, passes the index of the item that was activated.


void : activated( String text )

Signature:“activated(const QString&)”

Emitted when an item is selected, passes the text of the item that was activated.


void : currentIndexChanged( String text )

Signature:“currentIndexChanged(const QString&)”

Emitted when the current index changes, passes the text of the item that changed.


void : currentIndexChanged( Number index )

Signature:“currentIndexChanged(int)”

Emitted when the current index changes, passes the index of the item that changed.


void : highlighted( String text )

Signature:“highlighted(const QString&)”

Emitted when the highlighted item changes, passes the text of the item that is highlighted.


void : highlighted( Number index )

Signature:“highlighted(int)”

Emitted when the highlighted item changes, passes the index of the item that is highlighted.


void : textChanged( String text )

Signature:“textChanged(const QString&)”

Emitted when the text of the box changes, passes the new text of the box.