Harmony
Scripting Interface Documentation
Action Class Reference

The Action JavaScript global object. Trigger action associated to menu or tool bar items. More...

Public Slots

void perform (String &slot)
 using action manager, perform the requested action (slot - menu item, toolbar item,...) More...
 
void perform (String &slot, String &responder)
 using action manager, perform the requested action (slot - menu item, toolbar item,...) More...
 
QVariant validate (String &slot)
 using action manager, validates the requested action (slot - menu item, toolbar item,...) More...
 
QVariant validate (String &slot, String &responder)
 using action manager, validates the requested action (slot - menu item, toolbar item,...) More...
 

Detailed Description

The Action JavaScript global object. Trigger action associated to menu or tool bar items.

Call either global actions or actions associated to a specific responder.

function callAbout()
{
// Call the global action onActionAbout() which will show the About dialog.
Action.perform("onActionAbout()");
}
function callDisable3DSubnode()
{
// Validate if the action is available right now. In this example, it will fail if no subnode is selected.
if(validate("onActionHideSubNode()", "graph3dresponder"))
{
// Call the hide subnode action from the 3D Graph menu (or toolbar).
Action.perform("onActionHideSubNode()", "graph3dresponder");
}
}

Member Function Documentation

◆ perform [1/2]

void Action::perform ( String &  slot)
slot

using action manager, perform the requested action (slot - menu item, toolbar item,...)

◆ perform [2/2]

void Action::perform ( String &  slot,
String &  responder 
)
slot

using action manager, perform the requested action (slot - menu item, toolbar item,...)

◆ validate [1/2]

QVariant Action::validate ( String &  slot)
slot

using action manager, validates the requested action (slot - menu item, toolbar item,...)

◆ validate [2/2]

QVariant Action::validate ( String &  slot,
String &  responder 
)
slot

using action manager, validates the requested action (slot - menu item, toolbar item,...)