#include <EditorAction.h>
Inherits QObject.
Public Member Functions | |
EditorAction (AZStd::string contextIdentifier, AZStd::string identifier, AZStd::string name, AZStd::string description, AZStd::string category, AZStd::string iconPath, ActionVisibility menuVisibility, ActionVisibility toolBarVisibility, AZStd::function< void()> handler, AZStd::function< bool()> checkStateCallback=nullptr) | |
const AZStd::string & | GetActionIdentifier () const |
const AZStd::string & | GetActionContextIdentifier () const |
const AZStd::string & | GetName () const |
void | SetName (AZStd::string name) |
const AZStd::string & | GetDescription () const |
void | SetDescription (AZStd::string description) |
const AZStd::string & | GetCategory () const |
void | SetCategory (AZStd::string category) |
const AZStd::string & | GetIconPath () const |
void | SetIconPath (AZStd::string iconPath) |
AZStd::string | GetHotKey () const |
void | SetHotKey (const AZStd::string &hotKey) |
ActionVisibility | GetMenuVisibility () const |
ActionVisibility | GenerateToolBarVisibility () const |
QAction * | GetAction () |
Returns the pointer to the action. | |
const QAction * | GetAction () const |
void | AddEnabledStateCallback (AZStd::function< bool()> enabledStateCallback) |
Adds an enabled state callback to the action. | |
void | AssignToMode (AZStd::string modeIdentifier) |
Adds a mode to the list of modes this action is enabled in. | |
bool | HasEnabledStateCallbacks () const |
Returns true if the EditorAction has one or more enabled state callbacks set, false otherwise. | |
bool | IsEnabled () const |
Returns true if the EditorAction is enabled, false otherwise. | |
bool | IsCheckable () |
Returns whether the action is checkable. | |
void | Update () |
Updates the action's checked and enabled state via the appropriate callbacks, if any. | |
bool | IsActiveInCurrentMode () const |
Returns whether the Action is active. | |
void | Trigger () |
Trigger the Action's behavior. | |
Static Public Member Functions | |
static void | Initialize () |
Editor Action class definitions. Wraps a QAction and provides additional metadata.