Provides a menu widget for use in menu bars, context menus, and other popup menus.
Inherits :
DAZ Script | |
---|---|
Number | addAction ( DzAction action, Number menuId=0 ) |
Number | addAction ( String className, Number menuId=0 ) |
Number | addItem ( String label, Number menuId=0 ) |
Number | addItem ( String label, QObject receiver, String member, Number menuId=0 ) |
void | addSeparator ( Number menuId=0 ) |
Number | addSubMenu ( String label, Number menuId=0 ) |
Number | exec ( Point pos ) |
Number | findSubMenu ( String label, Number menuId=0 ) |
Boolean | isEmpty () |
void | setItemCheckable ( Number itemId, Boolean checkable ) |
void | setItemChecked ( Number itemId, Boolean checked ) |
void | setItemData ( Number itemId, Object data ) |
void | setItemEnabled ( Number itemId, Boolean enabled ) |
TODO: Add detailed description.
Number : addAction( DzAction action, Number menuId=0 )
Adds the DzAction to the given menu.
Parameter(s):
Return Value:
Number : addAction( String className, Number menuId=0 )
Convenience method to find an action by class name and add it to the menu.
Parameter(s):
Return Value:
Number : addItem( String label, Number menuId=0 )
Adds an entry to the given menu.
Parameter(s):
Return Value:
Number : addItem( String label, QObject receiver, String member, Number menuId=0 )
Adds an entry to the given menu and connects it to a slot.
Parameter(s):
Return Value:
void : addSeparator( Number menuId=0 )
Adds a separator bar to the given menu.
Parameter(s):
Number : addSubMenu( String label, Number menuId=0 )
Creates a submenu with the given label, and adds it to the given menu.
Parameter(s):
Return Value:
Shows the menu to the user.
Parameter(s):
Return Value:
Number : findSubMenu( String label, Number menuId=0 )
Finds a submenu with the given label, and returns its menu id.
Parameter(s):
Return Value:
Return Value:
true
if no items or actions have been added to the menu, otherwise false
.void : setItemCheckable( Number itemId, Boolean checkable )
Sets weather or not an item is checkable.
Parameter(s):
true
, the item is made checkable.void : setItemChecked( Number itemId, Boolean checked )
Sets weather or not an item is checked.
Parameter(s):
true
, the item is checked.void : setItemData( Number itemId, Object data )
Sets the data for the item.
Parameter(s):
void : setItemEnabled( Number itemId, Boolean enabled )
Sets whether or not an item is enabled.
Parameter(s):
true
, the action is enabled.Since: