User Tools

Site Tools


DzListView

Enumerations

Properties

Constructors

DAZ Script
DzListView ( DzWidget parent )

Methods

Signals

voidclicked ( DzListViewItem item )
voidclicked ( DzListViewItem item, Point pos, Number col )
voidcollapsed ( DzListViewItem item )
voidcontextMenuRequested ( DzListViewItem item, Point pos, Number col )
voidcurrentChanged ( DzListViewItem item )
voiddoubleClicked ( DzListViewItem item, Point pos, Number col )
voidexpanded ( DzListViewItem item )
voiditemRenamed ( DzListViewItem item, Number col, String text )
voiditemRenamed ( DzListViewItem item, Number col )
voidmouseButtonClicked ( Number button, DzListViewItem item, Point pos, Number col )
voidmouseButtonPressed ( Number button, DzListViewItem item, Point pos, Number col )
voidpressed ( DzListViewItem item, Point pos, Number col )
voidpressed ( DzListViewItem item )
voidreturnPressed ( DzListViewItem item )
voidrightButtonClicked ( DzListViewItem item, Point pos, Number col )
voidrightButtonPressed ( DzListViewItem item, Point pos, Number col )
voidselectionChanged ()
voidselectionChanged ( DzListViewItem item )
voidspacePressed ( DzListViewItem item )

Detailed Description

TODO: Add detailed description.

Enumerations


: ItemsMode

The item mode types

  • Selected - The selected items.
  • Unselected - The unselected items.
  • Checked - The items that are checked.
  • NotChecked - The items that are not checked.
  • All - All the items in the view.

—–

: RenameAction

The rename action types

  • Accept - The item is renamed if return is pressed or if the user clicks away from the entry field (it loses focus).
  • Reject - The item is renamed only if the user presses return in the entry field. If the entry field loses focus, the rename operation is discarded.

—–

: ResizeMode

The resize modes of list views

  • NoColumn - The columns do not get resized.
  • AllColumns - All columns get resized equally.
  • LastColumn - The last column is resized to fit the width of the view.

—–

: SelectionMode

The selection mode types for list views

  • Single - Only one item in the list view can be selected.
  • Multi - Multiple items in the list view can be selected. When the user clicks on an item, its selection state is toggled on/off.
  • Extended - Multiple items in the list view can be selected. When the user clicks on an item, the current selection is cleared, and that item becomes selected. Multiple items are selected by clicking with the CTRL key, or SHIFT key pressed, or by clicking and dragging.
  • NoSelection - No items in the list view can be selected.

—–

: WidthMode

The width modes types

  • Manual - The column width does not change automatically.
  • Maximum - The column width grows automatically according to the maximum width of all items in the column.

Properties


Boolean : allColumnsShowFocus

Holds whether or not all columns show keyboard focus.


Number : childCount

Holds the number root level children in the list view. (Read Only)


Number : columns

Holds the number of items in the list box. (Read Only)


RenameAction : defaultRenameAction

Holds the default action that is taken when the user attempts to rename an item.


Number : itemMargin

Holds the advisory margin for list view items.


ResizeMode : resizeMode

Holds the resize mode for the list view.


Boolean : rootIsDecorated

Holds whether or not the root level items show expand/collapse boxes.


SelectionMode : selectionMode

Holds the selection mode for the list view.


Boolean : showSortIndicator

Holds whether or not the sort indicator should be displayed.


Boolean : showToolTips

Holds whether or not tool tips should be displayed.


Number : sortColumn

Holds the column that the list is sorted by.


SortOrder : sortOrder

Holds the sort order of the list view.


Number : treeStepSize

Holds the number of pixels that a child item is offset from its parent.

Constructors


DzListView( DzWidget parent )

Creates a list view widget with the specified parent widget

Parameter(s):

  • parent - The widget to parent this widget to.

Methods


Number : addColumn( String label )

Adds a column to the list view.

Parameter(s):

  • label - The label for the column.

void : clear()

Clears all items from the list view.


void : clearSelection()

Clears the current selection in the view.


Number : columnAlignment( Number column )

Parameter(s):

  • column - The index of the column.

Return Value:

  • The alignment of the specified column.

String : columnText( Number column )

Parameter(s):

  • column - The index of the column.

Return Value:

  • The label of the specified column (if any), otherwise an empty string.

Number : columnWidth( Number column )

Parameter(s):

  • column - The index of the column.

Return Value:

  • The width of the specified column.

WidthMode : columnWidthMode( Number column )

Parameter(s):

  • column - The index of the column.

Return Value:

  • The width mode of the specified column.

DzListViewItem : currentItem()

Return Value:

  • The currently highlighted item.

void : deleteItem( DzListViewItem item )

Deletes an item from the list view.

Parameter(s):

  • item - The item to delete.

void : ensureItemVisible( DzListViewItem item )

Ensures an item is visible in the view.

Parameter(s):

  • item - The item to ensure is visible.

DzListViewItem : findItem( String text, Number column, Number compare=ExactMatch|CaseSensitive )

Parameter(s):

  • text - The text to find.
  • column - The index of the column.
  • compare - A bitwise OR of the following values:
    • CaseSensitive = 0x00001 (0 0001)
    • BeginsWith = 0x00002 (0 0010)
    • EndsWith = 0x00004 (0 0100)
    • Contains = 0x00008 (0 1000)
    • ExactMatch = 0x00010 (1 0000)

Return Value:

  • The item in the view with the specified text, for the specified column, matched according to the specified flags (if any), otherwise null.

DzListViewItem : firstChild()

Return Value:

  • The first item in the list view.

Array : getItems( ItemsMode mode )

Parameter(s):

  • mode - The mode of the items to retrieve.

Return Value:

  • A list of the DzListViewItem instances in this list view that match the supplied flag.

DzHeader : header()

Return Value:

  • The header for this list view.

void : hideColumn( Number column )

Hide the specified column

Parameter(s):

  • column - The index of the column.

Boolean : isOpen( DzListViewItem item )

Parameter(s):

  • item - The item to retrieve the open state of.

Return Value:

  • true if the specified item is expanded (open), or false if it is collapsed (closed).

Boolean : isRenaming()

Return Value:

  • true if the view is currently in a renaming operation, otherwise false.

Boolean : isSelected( DzListViewItem item )

Parameter(s):

  • item - The item to check.

Return Value:

  • true if the specified item is selected, otherwise false.

DzListViewItem : lastItem()

Return Value:

  • The last item in the list view.

void : removeColumn( Number column )

Removes a column from the list view.

Parameter(s):

  • column - The index of the column.

DzListViewItem : selectedItem()

Return Value:

  • The selected item.

void : setColumnAlignment( Number column, Number align )

Sets the alignment of a column.

Parameter(s):

  • column - The index of the column.
  • align - The alignment to set.

void : setColumnText( Number column, String label )

Changes the label of a column in the list view.

Parameter(s):

  • column - The index of the column.
  • label - The label for the column.

void : setColumnWidth( Number column, Number width )

Sets the width of a column.

Parameter(s):

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

void : setColumnWidthMode( Number column, WidthMode mode )

Sets the width mode of a column.

Parameter(s):

  • column - The index of the column.
  • mode - The width mode to set.

void : setCurrentItem( DzListViewItem item )

Sets the currently highlighted item

Parameter(s):

  • item - The item to set.

void : setOpen( DzListViewItem item, Boolean open )

Sets whether or not an item is expanded (open) or collapsed (closed).

Parameter(s):

  • item - The item to set the open state of.
  • open - The open state to set.

void : setSelected( DzListViewItem item, Boolean selected )

Sets whether or not an item is selected.

Parameter(s):

  • item - The item to set the selected state of.
  • selected - The selected state to set.

void : setSelectionAnchor( DzListViewItem item )

Sets the selection anchor of the view.

Parameter(s):

  • item - The item to set.

void : setSorting( Number column, Boolean ascending=true )

Sets the sorting column and order for the view.

Parameter(s):

  • column - The index of the column.
  • ascending - If true, ascending. If false, descending.

void : sort()

Sort the view

Signals


void : clicked( DzListViewItem item )

Signature:“clicked(DzListViewItem*)”

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

Parameter(s):

  • item - The item clicked (or 0 if no item was clicked)

void : clicked( DzListViewItem item, Point pos, Number col )

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

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

Parameter(s):

  • item - The item clicked (or 0 if no item was clicked)
  • pos - The position, in global coordinates, where the user clicked
  • col - The column in which the click occurred (undefined if item is 0)

void : collapsed( DzListViewItem item )

Signature:“collapsed(DzListViewItem*)”

Emitted when an item is collapsed (when item 's children are hidden)

Parameter(s):

  • item - The item collapsed

void : contextMenuRequested( DzListViewItem item, Point pos, Number col )

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

Emitted when the user right clicks the list view, or uses a special system key, for a context menu

Parameter(s):

  • item - The item under the cursor if pressed (or 0 if no item is under the cursor), the current item if the system key is used
  • pos - The position, in global coordinates, where the user pressed
  • col - The column in which the press occurred (-1 if no item is pressed)

void : currentChanged( DzListViewItem item )

Signature:“currentChanged(DzListViewItem*)”

Emitted when the current item changes

Parameter(s):


void : doubleClicked( DzListViewItem item, Point pos, Number col )

Signature:“doubleClicked(DzListViewItem*,const QPoint&,int)”

Emitted when an item is double clicked (on the second button press, not release)

Parameter(s):

  • item - The item double clicked (or 0 if no item was double clicked)
  • pos - The position, in global coordinates, where the user double clicked
  • col - The column in which the double click occurred (-1 if outside the list view)

void : expanded( DzListViewItem item )

Signature:“expanded(DzListViewItem*)”

Emitted when an item is expanded (when item 's children are shown)

Parameter(s):

  • item - The item expanded

void : itemRenamed( DzListViewItem item, Number col, String text )

Signature:“itemRenamed(DzListViewItem*,int,const QString&)”

Emitted when an item is renamed

Parameter(s):

  • item - The item renamed
  • col - The column in which the renaming occurred
  • text - The the new text for item

void : itemRenamed( DzListViewItem item, Number col )

Signature:“itemRenamed(DzListViewItem*,int)”

Emitted when an item is renamed

Parameter(s):

  • item - The item renamed
  • col - The column in which the renaming occurred

void : mouseButtonClicked( Number button, DzListViewItem item, Point pos, Number col )

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

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

Parameter(s):

  • button - The mouse button clicked
  • item - The item clicked (or 0 if no item was clicked)
  • pos - The position, in global coordinates, where the user clicked
  • col - The column in which the click occurred (undefined if item is 0)

void : mouseButtonPressed( Number button, DzListViewItem item, Point pos, Number col )

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

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

Parameter(s):

  • button - The mouse button pressed
  • item - The item pressed (or 0 if no item was pressed)
  • pos - The position, in global coordinates, where the user pressed
  • col - The column in which the press occurred (undefined if item is 0)

void : pressed( DzListViewItem item, Point pos, Number col )

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

Emitted when an item is pressed (mouse button pressed)

Parameter(s):

  • item - The item pressed (or 0 if no item was pressed)
  • pos - The position, in global coordinates, where the user pressed
  • col - The column in which the press occurred (undefined if item is 0)

void : pressed( DzListViewItem item )

Signature:“pressed(DzListViewItem*)”

Emitted when an item is pressed (mouse button pressed)

Parameter(s):

  • item - The item pressed (or 0 if no item was pressed)

void : returnPressed( DzListViewItem item )

Signature:“returnPressed(DzListViewItem*)”

Emitted when return is pressed on the current item

Parameter(s):

  • item - The current item

void : rightButtonClicked( DzListViewItem item, Point pos, Number col )

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

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

Parameter(s):

  • item - The item clicked (or 0 if no item was clicked)
  • pos - The position, in global coordinates, where the user clicked
  • col - The column in which the click occurred (-1 if outside the list view)

void : rightButtonPressed( DzListViewItem item, Point pos, Number col )

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

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

Parameter(s):

  • item - The item pressed (or 0 if no item was pressed)
  • pos - The position, in global coordinates, where the user pressed
  • col - The column in which the press occurred (-1 if outside the list view)

void : selectionChanged()

Signature:“selectionChanged()”

Emitted when the selected item changes.


void : selectionChanged( DzListViewItem item )

Signature:“selectionChanged(DzListViewItem*)”

Emitted when the selected item changes

Parameter(s):

  • item - The newly selected item

void : spacePressed( DzListViewItem item )

Signature:“spacePressed(DzListViewItem*)”

Emitted when the space bar is pressed on the current item

Parameter(s):

  • item - The current item