User Tools

Site Tools


DzComboBox

Script 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 )
Deprecated
voidinsertItem ( String text )
Stringtext ( Number index )

Signals

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

Detailed Description

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.

Since:

  • 4.6.2.66

Number : maxVisibleItems

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

Since:

  • 4.6.2.66

Number : minimumContentsLength

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

Since:

  • 4.6.2.66

SizeAdjustPolicy : sizeAdjustPolicy

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

Since:

  • 4.6.2.66

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.

Since:

  • 4.6.2.66

void : addItems( Array texts )

Adds each of the strings in texts to the combobox

Since:

  • 4.6.2.66

void : clear()

Removes all items from the combobox.


Number : findData( String data )

Return Value:

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

Since:

  • 4.6.2.66

Number : findText( String text )

Return Value:

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

Since:

  • 4.6.2.66

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.

Since:

  • 4.6.2.66

void : insertItems( Number index, Array list )

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

Since:

  • 4.6.2.66

void : insertSeparator( Number index )

Inserts a separator into the combobox at index.

Since:

  • 4.6.2.66

String : itemData( Number index )

Return Value:

  • The data of the item at index.

Since:

  • 4.6.2.66

String : itemText( Number index )

Return Value:

  • The text of the item at index.

Since:

  • 4.6.2.66

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.

Since:

  • 4.6.2.66

void : setItemText( Number index, String text )

Sets the text for the item at index.

Since:

  • 4.6.2.66

void : insertItem( String text )

Deprecated

Exists only to keep old code working. Do not use in new code. Use addItem() instead.


String : text( Number index )

Deprecated

Exists only to keep old code working. Do not use in new code. Use itemText() instead.

Signals


void : activated( Number index )

Signature:“activated(int)”

Emitted when an item is selected.

Parameter(s):

  • index - The index of the item that was activated.

void : currentIndexChanged( Number index )

Signature:“currentIndexChanged(int)”

Emitted when the current index changes.

Parameter(s):

  • index - The index of the current item.

Since:

  • 4.6.2.66

void : highlighted( Number index )

Signature:“highlighted(int)”

Emitted when the highlighted item changes.

Parameter(s):

  • index - 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.


void : activated( String text )

Signature:“activated(const QString&)”

Deprecated

Exists only to keep old code working. Do not use in new code.

Emitted when an item is selected.

Parameter(s):

  • text - The text of the item that was activated.

void : currentIndexChanged( String text )

Signature:“currentIndexChanged(const QString&)”

Deprecated

Exists only to keep old code working. Do not use in new code.

Emitted when the current index changes.

Parameter(s):

  • text - The text of the current item.

Since:

  • 4.6.2.66

void : highlighted( String text )

Signature:“highlighted(const QString&)”

Deprecated

Exists only to keep old code working. Do not use in new code.

Emitted when the highlighted item changes.

Parameter(s):

  • text - The text of the item that is highlighted.