The Action JavaScript global object. Trigger action associated to menu or tool bar items.
More...
|
void | perform (String &slot) |
| Perform the requested action (slot - menu item, toolbar item,...) More...
|
|
void | perform (String &slot, String &responder) |
| Perform the requested action (slot - menu item, toolbar item,...) More...
|
|
QVariant | validate (String &slot) |
| Validate the requested action (slot - menu item, toolbar item,...) More...
|
|
QVariant | validate (String &slot, String &responder) |
| Validate the requested action (slot - menu item, toolbar item,...) More...
|
|
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()
{
}
function callDisable3DSubnode()
{
if(
Action.
validate(
"onActionHideSubNode()",
"graph3dresponder").isEnabled)
{
}
}
◆ perform [1/2]
void Action::perform |
( |
String & |
slot | ) |
|
|
slot |
Perform the requested action (slot - menu item, toolbar item,...)
Perform the requested action for the main application responder. If the main responder doesn't own the requested action, try to use the current view with focus as the responder.
- Parameters
-
slot | The action function name (ex: onMyAction() ). |
◆ perform [2/2]
void Action::perform |
( |
String & |
slot, |
|
|
String & |
responder |
|
) |
| |
|
slot |
Perform the requested action (slot - menu item, toolbar item,...)
Perform the requested action for a specific responder.
Action.
perform(
"onActionToggleApplyToolToAllLayers()",
"drawingView");
- Parameters
-
slot | The action function name (ex: onMyAction() ). |
responder | The responder to the function name (ex: drawingView ). |
◆ validate [1/2]
QVariant Action::validate |
( |
String & |
slot | ) |
|
|
slot |
Validate the requested action (slot - menu item, toolbar item,...)
Validate the requested action for the main application responder. If the main responder doesn't own the requested action, try to use the current view with focus as the responder.
- Parameters
-
slot | The action function name(ex : onMyAction() ). |
- Returns
- A script object that has the isValid, enabled and checked boolean properties.
◆ validate [2/2]
QVariant Action::validate |
( |
String & |
slot, |
|
|
String & |
responder |
|
) |
| |
|
slot |
Validate the requested action (slot - menu item, toolbar item,...)
Validate the requested action for a specific responder.
var validateData =
Action.
validate(
"onActionToggleApplyToolToAllLayers()",
"drawingView");
if(!validateData.checked)
Action.
perform(
"onActionToggleApplyToolToAllLayers()",
"drawingView");
var validateData =
Action.
validate(
"onActionCreateNewDeformationChain()",
"miniPegModuleResponder");
if(!(validateData.isValid && validateData.enabled))
MessageLog.
trace(
"The desired action is unavailable, please select an element node");
- Parameters
-
slot | The action function name (ex: onMyAction() ). |
responder | The responder to the function name (ex: drawingView ). |
- Returns
- A script object that has the isValid, enabled and checked boolean properties.