ActionBuilder Class
class Core::ActionBuilderThe ActionBuilder class is convienience class to set up Core::Commands. More...
Header: | #include <coreplugin/actionmanager/actionmanager.h> |
Public Functions
ActionBuilder(QObject *contextActionParent, const int actionId) | |
~ActionBuilder() |
Detailed Description
An action builder specifies properties of a Core::Command
and a context action and uses ActionManager::registerAction() in its destructor to actually register the action for a set Core::Context for the Command.
Member Function Documentation
ActionBuilder::ActionBuilder(QObject *contextActionParent, const int actionId)
Constructs an action builder for an action with the Id actionId.
The contextActionParent is used to provide a QObject parent for the internally constructed QAction object to control its life time.
This is typically the this
pointer of the entity using ActionBuilder
.
[noexcept]
ActionBuilder::~ActionBuilder()
Registers the created action with the set properties.
See also ActionManager::registerAction().