KiCad PCB EDA Suite
|
A group of actions that will be displayed together on a toolbar palette. More...
#include <action_toolbar.h>
Public Member Functions | |
ACTION_GROUP (const std::string_view &aName) | |
ACTION_GROUP (const std::string_view &aName, const std::vector< const TOOL_ACTION * > &aActions) | |
void | SetDefaultAction (const TOOL_ACTION &aDefault) |
Set the default action to use when first creating the toolbar palette icon. | |
const TOOL_ACTION * | GetDefaultAction () const |
Get the default action to use when first creating this group's toolbar palette icon. | |
std::string | GetName () const |
Get the name of the group. | |
int | GetUIId () const |
Get the ID used in the UI to reference this group. | |
void | SetActions (const std::vector< const TOOL_ACTION * > &aActions) |
Set the actions contained in this group. | |
const std::vector< const TOOL_ACTION * > & | GetActions () const |
Get a vector of all the actions contained inside this group. | |
Protected Attributes | |
int | m_id |
< The action ID for this action group | |
std::string | m_name |
The default action to display on the toolbar item. | |
const TOOL_ACTION * | m_defaultAction |
The actions that compose the group. | |
std::vector< const TOOL_ACTION * > | m_actions |
Friends | |
class | ACTION_TOOLBAR |
A group of actions that will be displayed together on a toolbar palette.
Definition at line 47 of file action_toolbar.h.
ACTION_GROUP::ACTION_GROUP | ( | const std::string_view & | aName | ) |
Definition at line 60 of file action_toolbar.cpp.
References m_id, m_name, and ACTION_MANAGER::MakeActionId().
ACTION_GROUP::ACTION_GROUP | ( | const std::string_view & | aName, |
const std::vector< const TOOL_ACTION * > & | aActions | ||
) |
Definition at line 67 of file action_toolbar.cpp.
References m_id, m_name, ACTION_MANAGER::MakeActionId(), and SetActions().
|
inline |
Get a vector of all the actions contained inside this group.
Definition at line 94 of file action_toolbar.h.
References m_actions.
|
inline |
Get the default action to use when first creating this group's toolbar palette icon.
Definition at line 70 of file action_toolbar.h.
References m_defaultAction.
|
inline |
int ACTION_GROUP::GetUIId | ( | ) | const |
Get the ID used in the UI to reference this group.
Definition at line 86 of file action_toolbar.cpp.
References TOOL_ACTION::GetBaseUIId(), and m_id.
Referenced by ACTION_TOOLBAR::doSelectAction().
void ACTION_GROUP::SetActions | ( | const std::vector< const TOOL_ACTION * > & | aActions | ) |
Set the actions contained in this group.
The first action in the list will be the new default action.
aActions | is the new set of actions. |
Definition at line 77 of file action_toolbar.cpp.
References m_actions, and m_defaultAction.
Referenced by ACTION_GROUP().
void ACTION_GROUP::SetDefaultAction | ( | const TOOL_ACTION & | aDefault | ) |
Set the default action to use when first creating the toolbar palette icon.
If no default action is provided, the default will be the first action in the vector.
aDefault | is the default action. |
Definition at line 92 of file action_toolbar.cpp.
References m_actions, and m_defaultAction.
|
friend |
Definition at line 51 of file action_toolbar.h.
|
protected |
Definition at line 107 of file action_toolbar.h.
Referenced by GetActions(), ACTION_TOOLBAR::SelectAction(), SetActions(), and SetDefaultAction().
|
protected |
The actions that compose the group.
Definition at line 104 of file action_toolbar.h.
Referenced by GetDefaultAction(), SetActions(), and SetDefaultAction().
|
protected |
< The action ID for this action group
The name of this action group
Definition at line 98 of file action_toolbar.h.
Referenced by ACTION_GROUP(), and GetUIId().
|
protected |
The default action to display on the toolbar item.
Definition at line 101 of file action_toolbar.h.
Referenced by ACTION_GROUP(), and GetName().