DzListView Class Reference
[Interface Widget Objects]

DAZ Script list view widget. More...

Inheritance diagram for DzListView:

DzScrollView DzWidget List of all members.

Enumerations

enum  ItemsMode {
  Selected, Unselected, Checked, NotChecked,
  All
}
enum  RenameAction { Accept, Reject }
enum  ResizeMode { NoColumn, AllColumns, LastColumn }
enum  SelectionMode { Single, Multi, Extended, NoSelection }
enum  WidthMode { Manual, Maximum }

Properties

Boolean allColumnsShowFocus
Number childCount
Number columns
RenameAction defaultRenameAction
Number itemMargin
ResizeMode resizeMode
Boolean rootIsDecorated
SelectionMode selectionMode
Boolean showSortIndicator
Boolean showToolTips
Number sortColumn
SortOrder sortOrder
Number treeStepSize

Methods

Number addColumn (String label)
void clear ()
void clearSelection ()
Number columnAlignment (Number column)
String columnText (Number index)
Number columnWidth (Number column)
WidthMode columnWidthMode (Number column)
DzListViewItem currentItem ()
void deleteItem (DzListViewItem item)
void ensureItemVisible (DzListViewItem item)
DzListViewItem findItem (String text, Number column, ComparisonFlags compare=ExactMatch|CaseSensitive)
DzListViewItem firstChild ()
Array getItems (ItemsMode mode)
void hideColumn (Number column)
Boolean isOpen (DzListViewItem item)
Boolean isRenaming ()
Boolean isSelected (DzListViewItem item)
DzListViewItem lastItem ()
void removeColumn (Number index)
void setColumnAlignment (Number column, Number align)
void setColumnText (Number index, String label)
void setColumnWidth (Number column, Number width)
void setColumnWidthMode (Number column, WidthMode mode)
void setCurrentItem (DzListViewItem item)
void setOpen (DzListViewItem item, Boolean open)
void setSelected (DzListViewItem item, Boolean selected)
void setSelectionAnchor (DzListViewItem item)
void setSorting (Number column, Boolean ascending=TRUE)
void sort ()

Constructors

 DzListView (DzWidget parent)

Signals

void clicked (DzListViewItem item, Point pos, Number col)
 Signature: "clicked(DzListViewItem*,const QPoint&,int)"
void clicked (DzListViewItem item)
 Signature: "clicked(DzListViewItem*)"
void collapsed (DzListViewItem item)
 Signature: "collapsed(DzListViewItem*)"
void contextMenuRequested (DzListViewItem item, Point pos, Number col)
 Signature: "contextMenuRequested(DzListViewItem*,const QPoint&,int)"
void currentChanged (DzListViewItem item)
 Signature: "currentChanged(DzListViewItem*)"
void doubleClicked (DzListViewItem item, Point pos, Number col)
 Signature: "doubleClicked(DzListViewItem*,const QPoint&,int)"
void expanded (DzListViewItem item)
 Signature: "expanded(DzListViewItem*)"
void itemRenamed (DzListViewItem item, Number col)
 Signature: "itemRenamed(DzListViewItem*,int)"
void itemRenamed (DzListViewItem item, Number col, String text)
 Signature: "itemRenamed(DzListViewItem*,int,const QString&)"
void mouseButtonClicked (Number button, DzListViewItem item, Point pos, Number col)
 Signature: "mouseButtonClicked(int,DzListViewItem*,const QPoint&,int)"
void mouseButtonPressed (Number button, DzListViewItem item, Point pos, Number col)
 Signature: "mouseButtonPressed(int,DzListViewItem*,const QPoint&,int)"
void pressed (DzListViewItem item, Point pos, Number col)
 Signature: "pressed(DzListViewItem*,const QPoint&,int)"
void pressed (DzListViewItem item)
 Signature: "pressed(DzListViewItem*)"
void returnPressed (DzListViewItem item)
 Signature: "returnPressed(DzListViewItem*)"
void rightButtonClicked (DzListViewItem item, Point pos, Number col)
 Signature: "rightButtonClicked(DzListViewItem*,const QPoint&,int)"
void rightButtonPressed (DzListViewItem item, Point pos, Number col)
 Signature: "rightButtonPressed(DzListViewItem*,const QPoint&,int)"
void selectionChanged (DzListViewItem item)
 Signature: "selectionChanged(DzListViewItem*)"
void selectionChanged ()
 Signature: "selectionChanged()"
void spacePressed (DzListViewItem item)
 Signature: "spacePressed(DzListViewItem*)"

Detailed Description

DAZ Script list view widget.

Todo:
The findItem() method takes a ComparisonFlags enum. ComparisonFlags is either not exposed or not documented.


Member Enumeration Documentation

enum DzListView::ItemsMode

The item mode types

Enumerator:
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

enum DzListView::RenameAction

The rename action types

Enumerator:
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.

enum DzListView::ResizeMode

The resize modes of list views

Enumerator:
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

enum DzListView::SelectionMode

The selection mode types for list views

Enumerator:
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

enum DzListView::WidthMode

The width modes types

Enumerator:
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.


Constructor & Destructor Documentation

DzListView::DzListView ( DzWidget  parent  ) 

Creates a list view widget with the given parent widget


Member Function Documentation

Number DzListView::addColumn ( String  label  ) 

Add a column to the list view with the given label

void DzListView::clear (  ) 

Clears all the items from the list view.

void DzListView::clearSelection (  ) 

Clears the current selection in the view.

void DzListView::clicked ( DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

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

Parameters:
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 occured (undefined if item is 0)

void DzListView::clicked ( DzListViewItem  item  )  [signal]

Signature: "clicked(DzListViewItem*)"

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

Parameters:
item The item clicked (or 0 if no item was clicked)

void DzListView::collapsed ( DzListViewItem  item  )  [signal]

Signature: "collapsed(DzListViewItem*)"

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

Parameters:
item The item collapsed

Number DzListView::columnAlignment ( Number  column  ) 

Returns:
The alignment of the given column.

String DzListView::columnText ( Number  index  ) 

Returns:
The label of the column at the given index

Number DzListView::columnWidth ( Number  column  ) 

Returns:
The width of the given column.

WidthMode DzListView::columnWidthMode ( Number  column  ) 

Returns:
The width mode of the given column.

void DzListView::contextMenuRequested ( DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

Parameters:
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 occured (-1 if no item is pressed)

void DzListView::currentChanged ( DzListViewItem  item  )  [signal]

Signature: "currentChanged(DzListViewItem*)"

Emitted when the current item changes

Parameters:
item The newly currentItem()

DzListViewItem DzListView::currentItem (  ) 

Returns:
The currently highlighted item

void DzListView::deleteItem ( DzListViewItem  item  ) 

Deletes given item from the list view.

void DzListView::doubleClicked ( DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

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

Parameters:
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 occured (-1 if outside the list view)

void DzListView::ensureItemVisible ( DzListViewItem  item  ) 

Ensures the the given item is visible in the view.

void DzListView::expanded ( DzListViewItem  item  )  [signal]

Signature: "expanded(DzListViewItem*)"

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

Parameters:
item The item expanded

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

Returns:
The list view item with the given text for the given column, matched according to the given flags.

DzListViewItem DzListView::firstChild (  ) 

Returns:
The first child in the list view.

Array DzListView::getItems ( ItemsMode  mode  ) 

Return an array of DzListView items that match the supplied ItemsMode Flag.

Parameters:
mode The ItemsMode which will be used to fill the array.
Returns:
Array of DsListView items which match the supplied flag.

void DzListView::hideColumn ( Number  column  ) 

Hide the given column

Boolean DzListView::isOpen ( DzListViewItem  item  ) 

Returns:
true if the given item is expanded (open), or false if it is collapsed (closed)

Boolean DzListView::isRenaming (  ) 

Returns:
true if the view is currently in a renaming operation.

Boolean DzListView::isSelected ( DzListViewItem  item  ) 

Returns:
true if the given item is selcted

void DzListView::itemRenamed ( DzListViewItem  item,
Number  col 
) [signal]

Signature: "itemRenamed(DzListViewItem*,int)"

Emitted when an item is renamed

Parameters:
item The item renamed
col The column in which the renaming occured

void DzListView::itemRenamed ( DzListViewItem  item,
Number  col,
String  text 
) [signal]

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

Emitted when an item is renamed

Parameters:
item The item renamed
col The column in which the renaming occured
text The the new text for item

DzListViewItem DzListView::lastItem (  ) 

Returns:
The last item in the list view.

void DzListView::mouseButtonClicked ( Number  button,
DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

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

Parameters:
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 occured (undefined if item is 0)

void DzListView::mouseButtonPressed ( Number  button,
DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

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

Parameters:
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 occured (undefined if item is 0)

void DzListView::pressed ( DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

Emitted when an item is pressed (mouse button pressed)

Parameters:
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 occured (undefined if item is 0)

void DzListView::pressed ( DzListViewItem  item  )  [signal]

Signature: "pressed(DzListViewItem*)"

Emitted when an item is pressed (mouse button pressed)

Parameters:
item The item pressed (or 0 if no item was pressed)

void DzListView::removeColumn ( Number  index  ) 

Remove the column at index from the list view

void DzListView::returnPressed ( DzListViewItem  item  )  [signal]

Signature: "returnPressed(DzListViewItem*)"

Emitted when return is pressed on the current item

Parameters:
item The current item

void DzListView::rightButtonClicked ( DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

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

Parameters:
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 occured (-1 if outside the list view)

void DzListView::rightButtonPressed ( DzListViewItem  item,
Point  pos,
Number  col 
) [signal]

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

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

Parameters:
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 occured (-1 if outside the list view)

void DzListView::selectionChanged ( DzListViewItem  item  )  [signal]

Signature: "selectionChanged(DzListViewItem*)"

Emitted when the selected item changes

Parameters:
item The newly selected item

void DzListView::selectionChanged (  )  [signal]

Signature: "selectionChanged()"

Emitted when the selected item changes.

void DzListView::setColumnAlignment ( Number  column,
Number  align 
)

Sets the alignment of the given column.

void DzListView::setColumnText ( Number  index,
String  label 
)

Change the label of the column at the given index

void DzListView::setColumnWidth ( Number  column,
Number  width 
)

Sets the width of the given column.

void DzListView::setColumnWidthMode ( Number  column,
WidthMode  mode 
)

Sets the width mode of the given column.

void DzListView::setCurrentItem ( DzListViewItem  item  ) 

Set the currently highlighted item

void DzListView::setOpen ( DzListViewItem  item,
Boolean  open 
)

Sets whether the given item is expanded (open) or collapsed (closed)

void DzListView::setSelected ( DzListViewItem  item,
Boolean  selected 
)

Sets whether the given item is selected

void DzListView::setSelectionAnchor ( DzListViewItem  item  ) 

Sets the selection anchor of the view to item.

void DzListView::setSorting ( Number  column,
Boolean  ascending = TRUE 
)

Sets the sorting column and order for the view.

void DzListView::sort (  ) 

Sort the view

void DzListView::spacePressed ( DzListViewItem  item  )  [signal]

Signature: "spacePressed(DzListViewItem*)"

Emitted when the spacebar is pressed on the current item

Parameters:
item The current item


Member Data Documentation

bool DzListView::allColumnsShowFocus

Whether or not all columns show keyboard focus.

int DzListView::childCount

Read-Only: The number root level children in the list view

int DzListView::columns

Read-Only: The number of items in the list box

int DzListView::defaultRenameAction

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

int DzListView::itemMargin

The advisory margin for list view items

int DzListView::resizeMode

The resize mode for the list view

bool DzListView::rootIsDecorated

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

int DzListView::selectionMode

The selection mode for the list view

bool DzListView::showSortIndicator

Whether or not the sort indicator should be displayed.

bool DzListView::showToolTips

Whether or not tool tips should be displayed.

int DzListView::sortColumn

The column that the list is sorted by

int DzListView::sortOrder

The sort order of the list view.

int DzListView::treeStepSize

The number of pixels that a child item is offset from its parent


Generated on Thu Sep 24 12:21:13 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.