MenuAction
Represents an item inside a Menu where a callback function is called when user clicks on it.
Besides the default appearance it can also be of checkable type where an underlying boolean state
is toggled through the action (usually indicated by a checkmark icon), or of radio
type where multiple actions comprise an enumeration of possible values of which only one can be
selected (usually indicated by a radio button icon). By convention, a group of exclusive options
is formed by the set of adjacent actions of this type where there is no Separator in-between.
Extends
Methods
| Method | Description |
|---|---|
| title() | Returns the text to be displayed on the menu entry. |
| description() | Returns the optional text that explains the menu entry, to be shown as tooltip/and or in the status bar. |
| type() | Returns the type of the action as string, either default, checkable, or radio. |
| isChecked() | Returns whether this action is currently checked/selected if MenuAction#type is checkable or radio. |
| activationCallback() | Callback function to C++ to be called when this action was clicked by the user. |
Inherited from ClassHandle
| Method | Description |
|---|---|
| isAliasOf() | Returns true if this handle and other alias the same underlying C++ object. |
| delete() | Releases this JavaScript handle. |
| deleteLater() | Schedules this handle for deferred deletion and returns this handle. |
| isDeleted() | Returns true if this handle has already been deleted. |
| [dispose]() | Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually. |
| clone() | Returns a new JavaScript handle aliasing the same underlying C++ object. |
title()
title(): string;Returns the text to be displayed on the menu entry.
Returns
string
description()
description(): string;Returns the optional text that explains the menu entry, to be shown as tooltip/and or in the status bar.
Returns
string
type()
type(): string;Returns the type of the action as string, either default, checkable, or radio.
Returns
string
isChecked()
isChecked(): boolean;Returns whether this action is currently checked/selected if MenuAction#type is checkable or radio.
Returns
boolean
activationCallback()
activationCallback(): void;Callback function to C++ to be called when this action was clicked by the user.
Returns
void