User Tools

Site Tools


DzAction

Properties

Methods

DAZ Script
BooleanhasModifier ()
voidhover ()
StringmodifierDescription ( Number modifiers )
voidsetChecked ( Boolean onOff )
voidsetDisabled ( Boolean onOff )
voidsetEnabled ( Boolean onOff )
voidsetOff ( Boolean onOff )
voidsetVisible ( Boolean onOff )
voidtoggle ()
voidtrigger ()
voidtriggerWithSettings ( Object settings )

Signals

voidchanged ()
voidenabled ( Boolean onOff )
voidhovered ()
voidpreExecute ()
voidtoggled ( Boolean checked )
voidtriggered ( Boolean checked )

Detailed Description

This class represents an action that the user can perform in the interface via pressing a hot key or clicking on a menu/toolbar item.

All action items are added to a list of interface actions which the user can customize. The user can specify their own keyboard shortcut or 'Hot Key' for the action, and any action item can be moved into a custom toolbar, as well as appear in the main menu.

See Also:

Properties


String : actionGroup

Holds the action group that this action belongs to (Read Only)


Boolean : autoRepeat

Holds whether this action will auto-repeat when the keyboard shortcut combination is held down.


Boolean : checkable

Holds whether this action is checkable (has an on/off state).


Boolean : checked

Holds whether this action is checked (on) - checkable must be true.


String : defaultMenu

Holds the primary menu that this action is added to by default, if the user has not chosen a custom location (Read Only)


Array : defaultMenus

Holds the menus that this action is added to by default, if the user has not chosen a custom location (Read Only).

Since:

  • 4.6.2.62

Object : defaultSettings

Holds the settings revealed by a DzAction subclass author as being supported when triggerWithSettings() is called. (Read Only)

Since:

  • 4.22.1.31

String : defaultShortcut

Holds the default keyboard shortcut (hotkey) that is associated with this action (Read Only before 4.6.4.48)


String : defaultToolBar

Holds the primary toolBar that this action is added to by default, if the user has not chosen a custom location (Read Only)


Array : defaultToolBars

Holds the toolBars that this action is added to by default, if the user has not chosen a custom location (Read Only).

Since:

  • 4.6.2.62

String : description

Holds the user-readable description of the action.


String : documentationUrl

Holds the documentation URL for the action. (Read Only)

Since:

  • 4.22.1.157

Boolean : enabled

Holds whether this action is enabled. Disabled actions cannot be triggered by the user via the UI.

Emitted when an action is enabled or disabled. onOff is true if the action was enabled, false if it was disabled.


String : iconFile

Holds the image file that is used as the icon for this action (if any).


Object : iconMap

Holds the map describing image files that are used in the icon for this action (if any).

Since:

  • 4.22.1.169

String : iconText

Holds the descriptive icon text for this action.


Boolean : iconVisibleInMenu

Holds whether this action should show an icon in a menu.


String : shortcut

Holds the primary shortcut key sequence for this action.


String : simpleText

Holds the text of the action with any mnemonic (&) and/or trailing ellipsis (…) removed. (Read Only)

Since:

  • 4.22.1.130

String : statusTip

Holds the status bar text for this action.


Number : styleIcon

Holds the standard pixmap that is used as the icon for this action (if any).

Since:

  • 4.11.0.43

String : text

Holds the label for this action.


String : toolTip

Holds the popup tool tip text for this action.


Object : triggerSettings

Holds the settings used when triggerWithSettings() is called - will be empty if/when trigger() is called. (Read Only)

Since:

  • 4.16.1.18

Boolean : visible

Holds whether this action can be seen in the UI (e.g., in menus and toolbars).


String : whatsThis

Holds the brief description text for this action.

Methods


Boolean : hasModifier()

Return Value:

  • true if this action offers a modified behavior when a keyboard modifier combination is pressed and the action is triggered, otherwise false.

See Also:

Since:

  • 4.22.1.31

void : hover()

Activates the action in the 'Hover' state programatically.

See Also:


String : modifierDescription( Number modifiers )

Parameter(s):

  • modifiers - A bitwise OR of the keyboard modifiers to retrieve a description for.

Return Value:

  • The description of the modified behavior for the specified keyboard modifier combination (if any), otherwise an empty string.

See Also:

Since:

  • 4.22.1.31

void : setChecked( Boolean onOff )

Sets the action's toggle state.

Parameter(s):

  • onOff - If true, the action's toggle state is set on, otherwise, its toggle state is set off.

See Also:


void : setDisabled( Boolean onOff )

Disables/Enables the action in the interface.

Parameter(s):

  • onOff - If true, the action will be 'grayed out' in menus, and the user will be unable to activate it. If false, the action will be enabled.

See Also:


void : setEnabled( Boolean onOff )

Enables/Disables the action in the interface.

Parameter(s):

  • onOff - If true, the action will be displayed normally in menus, and the user will be able to activate it. If false, the action will be disabled.

See Also:


void : setOff( Boolean onOff )

The same as calling setChecked( !onOff ). This method is provided for convenience when connecting this slot to a signal that emits a value that is the inverse of the desired onOff state.

Parameter(s):

  • onOff - If true, the action's toggle state is set off, otherwise, its toggle state is set on.

See Also:


void : setVisible( Boolean onOff )

Sets whether the action is visible in the interface.

Parameter(s):

  • onOff - If true, the action will be displayed in menus and toolbars that it has been added to. If false, the action will not be displayed in any menus or toolbars.

void : toggle()

Toggles the action programatically.

See Also:


void : trigger()

Activates the action programatically.

See Also:


void : triggerWithSettings( Object settings )

Triggers this action with the settings provided.

Parameter(s):

  • settings - The settings to use when the action is triggered.

Attention:

  • It is up to DzAction derived classes to determine if/how the settings are used.

See Also:

Since:

  • 4.16.1.18

Signals


void : changed()

Signature:“changed()”

Emitted when an action has changed.


void : enabled( Boolean onOff )

TODO: Add description.


void : hovered()

Signature:“hovered()”

Emitted when an action is highlighted by the user; for example, when the user pauses with the cursor over a menu option, toolbar button, or presses an action's shortcut key combination.


void : preExecute()

Signature:“preExecute()”

Emitted immediately before executeAction() is called.

Since:

  • 4.6.3.32

void : toggled( Boolean checked )

Signature:“toggled(bool)”

Emitted when a toggle action changes state. checked is the new action state, true for on, false for off.


void : triggered( Boolean checked )

Signature:“triggered(bool)”

Emitted when an action is activated by the user; for example, when the user clicks a menu option, toolbar button, or presses an action's shortcut key combination, or when trigger() was called. Notably, it is not emitted when setChecked() or toggle() is called. checked is true if the action is checked, or false if the action is unchecked.