User Tools

Site Tools


DzListViewItem

Script wrapper for Q3ListViewItem.

More...

Inherits :

Inherited By : DzCheckListItem

Properties

Constructors

DAZ Script
DzListViewItem ( DzListView parent, Number id=-1 )
DzListViewItem ( DzListViewItem parent, Number id=-1 )

Methods

DAZ Script
voidaddDataItem ( String key, Object val )
NumberchildCount ()
Numbercompare ( DzListViewItem item, Number column, Boolean ascending )
voiddeleteItem ( DzListViewItem item )
Numberdepth ()
DzListViewItemfirstChild ()
ObjectgetDataItem ( String key )
NumbergetNumDataItems ()
voidinsertItem ( DzListViewItem newChild )
DzListViewItemitemAbove ()
DzListViewItemitemBelow ()
Stringkey ( Number column, Boolean ascending )
DzListViewlistView ()
voidmoveItem ( DzListViewItem item )
DzListViewItemnextSibling ()
DzListViewItemparent ()
voidremoveItem ( DzListViewItem item )
BooleanrenameEnabled ( Number column )
voidsetPixmap ( Number column, Pixmap pixmap )
voidsetRenameEnabled ( Number column, Boolean yesNo )
voidsetText ( Number column, String text )
voidsort ()
voidsortChildItems ( Number column, Boolean ascending )
voidstartRename ( Number column )
Stringtext ( Number column )

Detailed Description

This is not a widget, but a helper for working with DzListView. Each DzListViewItem represents a single item in a list view - add items to a list view by creating a new DzListViewItem that is a child of the list view, or a child of another list view item in the list view.

Properties


Boolean : dragEnabled

Holds whether or not the item can be dragged.


Boolean : dropEnabled

Holds whether or not the item can have other items dropped on it.


Boolean : enabled

Holds whether or not the item can be enabled .


Boolean : expandable

Holds whether or not the item can be expanded (opened).


Number : height

Holds the height of the item.


Number : id

Holds the identifier for this item. (Read Only)


Boolean : multiLinesEnabled

Holds whether or not the item can be displayed on multiple lines.


Boolean : open

Holds whether or not the item is expanded (open) or collapsed (closed).


Boolean : selectable

Holds whether or not the item can be selected.


Boolean : selected

Holds whether or not the item is selected.


Boolean : visible

Holds whether or not the item is visible.

Constructors


DzListViewItem( DzListView parent, Number id=-1 )

Creates a list view item at the root level of the specified list view

Parameter(s):

  • parent - The listview to create this item as a child of
  • id - The identifier for this item

DzListViewItem( DzListViewItem parent, Number id=-1 )

Creates a list view item as a child of the specified list view item

Parameter(s):

  • parent - The item to create this item as a child of
  • id - The identifier for this item

Methods


void : addDataItem( String key, Object val )

Adds an arbitrary data item to be stored with the item.

Parameter(s):

  • key - The key for the data.
  • val - The value of the data.

Number : childCount()

Return Value:

  • The number of child items of this item.

Number : compare( DzListViewItem item, Number column, Boolean ascending )

Compares the specified item with this item in the specified column (if any).

Parameter(s):

  • item - The item to compare.
  • column - The index of the column.
  • ascending - Whether to compare in ascending, or descending, order.

Return Value:

  • -1 if this item is less than item, 0 if they are equal, and 1 if this item is greater than item.

void : deleteItem( DzListViewItem item )

Deletes an item from this item's list of child items.

Parameter(s):

  • item - The item to delete.

Number : depth()

Return Value:

  • The hierarchical depth of this item.

DzListViewItem : firstChild()

Return Value:

  • The first child item of this item.

Object : getDataItem( String key )

Parameter(s):

  • key - The key for the data.

Return Value:

  • The value of the data on the item with the specified key (if any).

Number : getNumDataItems()

Return Value:

  • The number of data items on the item.

void : insertItem( DzListViewItem newChild )

Inserts an item as a child of this item.

Parameter(s):

  • newChild - The item to insert.

DzListViewItem : itemAbove()

Return Value:

  • The item above this item.

DzListViewItem : itemBelow()

Return Value:

  • The item below this item.

String : key( Number column, Boolean ascending )

Parameter(s):

  • column - The index of the column.
  • ascending - Whether to compare in ascending, or descending, order.

Return Value:

  • A key that can be used for sorting by column - i.e., text()

DzListView : listView()

Return Value:

  • The list view that this item resides in.

void : moveItem( DzListViewItem item )

Moves this item to be after the specified item, which must be one of its siblings.

Parameter(s):

  • item - The item to move after.

DzListViewItem : nextSibling()

Return Value:

  • The next sibling of this item.

DzListViewItem : parent()

Return Value:

  • The parent of this item.

void : removeItem( DzListViewItem item )

Removes an item from the children of this item.

Parameter(s):

  • item - The item to insert.

Boolean : renameEnabled( Number column )

Parameter(s):

  • column - The index of the column.

Return Value:

  • Whether or not the text in the specified column can be changed by the user.

void : setPixmap( Number column, Pixmap pixmap )

Sets the pixmap for this item in the specified column.

Parameter(s):

  • column - The index of the column.
  • pixmap - The pixmap to set.

void : setRenameEnabled( Number column, Boolean yesNo )

Sets whether or not the text in the specified column can be changed by the user.

Parameter(s):

  • column - The index of the column.
  • yesNo - Whether or not the column can be changed.

void : setText( Number column, String text )

Sets the text for this item in the specified column.

Parameter(s):

  • column - The index of the column.
  • text - The text to set.

void : sort()

Sorts the children of this item according to the current sorting column and order.


void : sortChildItems( Number column, Boolean ascending )

Sorts the child items of this item by the specified column in the specified order.

Parameter(s):

  • column - The index of the column.
  • ascending - Whether to sort in ascending, or descending, order.

void : startRename( Number column )

Starts a rename operation.

Parameter(s):

  • column - The index of the column.

String : text( Number column )

Parameter(s):

  • column - The index of the column.

Return Value:

  • The text for this item in the specified column