User Tools

Site Tools


DzListBox

Enumerations

Properties

Constructors

DAZ Script
DzListBox ( DzWidget parent )

Methods

DAZ Script
voidclear ()
voidinsertItem ( String text )
BooleanisSelected ( Number index )
voidremoveItem ( Number index )
voidsetSelected ( Number index, Boolean selected )
Stringtext ( Number index )

Signals

voidclicked ( Number index )
voidclicked ( Number index, Point pnt )
voidcontextMenuRequested ( Number index, Point pos )
voidcurrentChanged ( Number index )
voiddoubleClicked ( Number index )
voidhighlighted ( String text )
voidhighlighted ( Number index )
voidmouseButtonClicked ( Number button, Number index, Point pos )
voidmouseButtonPressed ( Number button, Number index, Point pos )
voidonItem ( Number index )
voidonViewport ()
voidpressed ( Number index, Point pnt )
voidpressed ( Number index )
voidreturnPressed ( Number index )
voidrightButtonClicked ( Number index, Point pnt )
voidrightButtonPressed ( Number index, Point pnt )
voidselected ( Number index )
voidselected ( String text )
voidselectionChanged ()
voidselectionChanged ( Number index )

Detailed Description

TODO: Add detailed description.

Enumerations


: LayoutMode

The possible layout modes for the columns and rows of the list box

  • FixedNumber - There is a fixed number of rows or columns
  • FitToWidth - There are as many columns as will fit
  • FitToHeight - There are as many rows as will fit
  • Variable - There are as many rows as required by the column mode and vice-versa

—–

: SelectionMode

The possible selection modes for the list box

  • Single - Single selection - only one item in the box can be selected at a time
  • Multi - Multi selection - when the user clicks on an item, its selection state is toggled, all other items remain the same
  • Extended - Extended selection - when the user clicks on an item, the current selection is replaced with that item. The ctrl and shift keys can be used to select multiple items.
  • NoSelection - Items can not be selected

Properties


LayoutMode : columnMode

The layout mode for the columns of the list box


Number : count

The number of items in the list box (read-only)


Number : currentItem

The index of the currently highlighted item in the list box


String : currentText

The text of the currently highlighted item in the list box


Number : numColumns

The number of columns in the list box (read-only)


Number : numItemsVisible

The number of items visible in the list box (read-only)


Number : numRows

The number of rows in the list box (read-only)


LayoutMode : rowMode

The layout mode for the rows of the list box


Number : selected

The index of the currently selected item in the list box (in single selection mode only)


SelectionMode : selectionMode

The selection mode of the list box


Number : topItem

The index of the item at the top of the list box


Boolean : variableHeight

Whether or not the list box has variable height rows


Boolean : variableWidth

Whether or not the list box has variable width columns

Constructors


DzListBox( DzWidget parent )

Creates a list box with the given parent widget

Methods


void : clear()

Clears all items in the list box


void : insertItem( String text )

Inserts the given item into the list box


Boolean : isSelected( Number index )

Return Value:

  • true if the item at the given index is selected

void : removeItem( Number index )

Removes the given item from the list box


void : setSelected( Number index, Boolean selected )

Sets whether the item at the given index is selected


String : text( Number index )

Return Value:

  • The text of the item at the given index

Signals


void : clicked( Number index )

Signature:“clicked(int)”

Emitted when an item is clicked (mouse button pressed and released).


void : clicked( Number index, Point pnt )

Signature:“clicked(int,const QPoint&)”

Emitted when an item is clicked (mouse button pressed and released).


void : contextMenuRequested( Number index, Point pos )

Signature:“contextMenuRequested(int,const QPoint&)”

Emitted when the user right clicks the list box for a context menu.


void : currentChanged( Number index )

Signature:“currentChanged(int)”

Emitted when the current item changes.


void : doubleClicked( Number index )

Signature:“doubleClicked(int)”

Emitted when an item is double clicked.


void : highlighted( String text )

Signature:“highlighted(const QString&)”

Emitted when the highlighted item changes.


void : highlighted( Number index )

Signature:“highlighted(int)”

Emitted when the highlighted item changes.


void : mouseButtonClicked( Number button, Number index, Point pos )

Signature:“mouseButtonClicked(int,int,const QPoint&)”

Emitted when an item is clicked with the a mouse button (mouse button pressed and released).


void : mouseButtonPressed( Number button, Number index, Point pos )

Signature:“mouseButtonPressed(int,int,const QPoint&)”

Emitted when an item is pressed with the a mouse button (mouse button pressed).


void : onItem( Number index )

Signature:“onItem(int)”

Emitted mouse cursor moves onto an item.


void : onViewport()

Signature:“onViewport()”

Emitted mouse cursor moves from an item to an empty part of the list box.


void : pressed( Number index, Point pnt )

Signature:“pressed(int,const QPoint&)”

Emitted when an item is pressed (mouse button pressed).


void : pressed( Number index )

Signature:“pressed(int)”

Emitted when an item is pressed (mouse button pressed).


void : returnPressed( Number index )

Signature:“returnPressed(int)”

Emitted when return is pressed on the current item.


void : rightButtonClicked( Number index, Point pnt )

Signature:“rightButtonClicked(int,const QPoint&)”

Emitted when an item is clicked with the right button (mouse button pressed and released).


void : rightButtonPressed( Number index, Point pnt )

Signature:“rightButtonPressed(int,const QPoint&)”

Emitted when an item is pressed with the right button (mouse button pressed).


void : selected( Number index )

Signature:“selected(int)”

Emitted when the selected item changes.


void : selected( String text )

Signature:“selected(const QString&)”

Emitted when the selected item changes.


void : selectionChanged()

Signature:“selectionChanged()”

Emitted when the selection in the box changes.


void : selectionChanged( Number index )

Signature:“selectionChanged(int)”

Emitted when a new item is selected in single selection mode.