DzActionMenu Class Reference
[Interface Components]

Class that encapsulates a popup menu that contains DzActionMenuItems. More...

List of all members.

Methods

void clear ()
void exec (Point pos)
void exec ()
DzActionMenu findSubMenu (String name)
DzActionMenuItem getItem (Number which)
Array getItemList ()
Number getNumItems ()
DzActionMenu getSubMenu (String name)
Boolean hasItems ()
void insertAction (String action, Number at=-1)
void insertCustomAction (String action, Number at=-1)
void insertMenu (String text, DzActionMenu menu, Number at=-1)
void insertSeparator (Number at=-1)
void removeItem (DzActionMenuItem item)
void simplifySeparators ()

Signals

void itemListChanged ()
 Signature: "itemListChanged()"


Detailed Description

Class that encapsulates a popup menu that contains DzActionMenuItems.

See also:
DzActionMgr::getMenu(), DzPane::getOptionsMenu()


Member Function Documentation

void DzActionMenu::clear (  ) 

Removes all items from the menu.

void DzActionMenu::exec ( Point  pos  ) 

Displays the menu to the user at the given position.

Parameters:
pos The global window coordinates at which to display the popup menu.

void DzActionMenu::exec (  ) 

Displays the menu to the user

DzActionMenu DzActionMenu::findSubMenu ( String  name  ) 

Parameters:
name The name of the submenu to find.
Returns:
A pointer to the submenu with the given name, NULL if no submenu with the name is found.

DzActionMenuItem DzActionMenu::getItem ( Number  which  ) 

Parameters:
which The index of the item to return.
Returns:
A pointer to the menu item at the given index, NULL if the index is invalid

Array DzActionMenu::getItemList (  ) 

This function is provided for DAZ Script access. Plugin developers are encouraged to use the much more efficient itemListIterator() method.

Returns:
A QObjectList of all the items in this menu.

Number DzActionMenu::getNumItems (  ) 

Returns:
The number of items in the menu

DzActionMenu DzActionMenu::getSubMenu ( String  name  ) 

Parameters:
name The name of the submenu to get.
Returns:
A pointer to a submenu with the given name - if one does not already exist, it is created, and added to the end of the menu.

Boolean DzActionMenu::hasItems (  ) 

Returns:
true if there are items in this menu, false if the menu is empty.

void DzActionMenu::insertAction ( String  action,
Number  at = -1 
)

Inserts the given action into the menu at the given location.

Parameters:
action The class name of the action to insert into the menu
at The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void DzActionMenu::insertCustomAction ( String  action,
Number  at = -1 
)

Inserts the given custom action into the menu at the given location.

Parameters:
action The name of the custom action to insert into the menu
at The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void DzActionMenu::insertMenu ( String  text,
DzActionMenu  menu,
Number  at = -1 
)

Inserts the given menu into the menu at the given location as a submenu.

Parameters:
text The text to display in this menu for the submenu item
menu The submenu to insert into this menu
at The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void DzActionMenu::insertSeparator ( Number  at = -1  ) 

Inserts a separator into the menu at the given location.

Parameters:
at The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void DzActionMenu::itemListChanged (  )  [signal]

Signature: "itemListChanged()"

Emitted when items are added to or removed from this menu

void DzActionMenu::removeItem ( DzActionMenuItem  item  ) 

Remove the given item from the menu.

Parameters:
item The item to remove from the menu

void DzActionMenu::simplifySeparators (  ) 

Removes any duplicate separators from the menu by replacing multiple separators with a single separator.


Generated on Thu Sep 24 12:21:10 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.