KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ACTION_GROUP Class Reference

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 &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. More...
 
const TOOL_ACTIONGetDefaultAction () const
 Get the default action to use when first creating this group's toolbar palette icon. More...
 
std::string GetName () const
 Get the name of the group. More...
 
int GetUIId () const
 Get the ID used in the UI to reference this group. More...
 
const std::vector< const TOOL_ACTION * > & GetActions () const
 Get a vector of all the actions contained inside this group. More...
 

Protected Attributes

int m_id
 < The action ID for this action group More...
 
std::string m_name
 The default action to display on the toolbar item. More...
 
const TOOL_ACTIONm_defaultAction
 The actions that compose the group. More...
 
std::vector< const TOOL_ACTION * > m_actions
 

Friends

class ACTION_TOOLBAR
 

Detailed Description

A group of actions that will be displayed together on a toolbar palette.

Definition at line 46 of file action_toolbar.h.

Constructor & Destructor Documentation

◆ ACTION_GROUP()

ACTION_GROUP::ACTION_GROUP ( const std::string &  aName,
const std::vector< const TOOL_ACTION * > &  aActions 
)

Definition at line 51 of file action_toolbar.cpp.

References m_actions, m_defaultAction, m_id, m_name, and ACTION_MANAGER::MakeActionId().

Member Function Documentation

◆ GetActions()

const std::vector< const TOOL_ACTION * > & ACTION_GROUP::GetActions ( ) const
inline

Get a vector of all the actions contained inside this group.

Definition at line 82 of file action_toolbar.h.

References m_actions.

◆ GetDefaultAction()

const TOOL_ACTION * ACTION_GROUP::GetDefaultAction ( ) const
inline

Get the default action to use when first creating this group's toolbar palette icon.

Definition at line 67 of file action_toolbar.h.

References m_defaultAction.

Referenced by ACTION_TOOLBAR::AddGroup().

◆ GetName()

std::string ACTION_GROUP::GetName ( ) const
inline

Get the name of the group.

Definition at line 72 of file action_toolbar.h.

References m_name.

◆ GetUIId()

int ACTION_GROUP::GetUIId ( ) const

Get the ID used in the UI to reference this group.

Definition at line 65 of file action_toolbar.cpp.

References TOOL_ACTION::GetBaseUIId(), and m_id.

Referenced by ACTION_TOOLBAR::AddGroup(), and ACTION_TOOLBAR::doSelectAction().

◆ SetDefaultAction()

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.

Parameters
aDefaultis the default action.

Definition at line 71 of file action_toolbar.cpp.

References m_actions, and m_defaultAction.

Friends And Related Function Documentation

◆ ACTION_TOOLBAR

friend class ACTION_TOOLBAR
friend

Definition at line 50 of file action_toolbar.h.

Member Data Documentation

◆ m_actions

std::vector<const TOOL_ACTION*> ACTION_GROUP::m_actions
protected

◆ m_defaultAction

const TOOL_ACTION* ACTION_GROUP::m_defaultAction
protected

The actions that compose the group.

Definition at line 92 of file action_toolbar.h.

Referenced by ACTION_GROUP(), GetDefaultAction(), and SetDefaultAction().

◆ m_id

int ACTION_GROUP::m_id
protected

< The action ID for this action group

The name of this action group

Definition at line 86 of file action_toolbar.h.

Referenced by ACTION_GROUP(), and GetUIId().

◆ m_name

std::string ACTION_GROUP::m_name
protected

The default action to display on the toolbar item.

Definition at line 89 of file action_toolbar.h.

Referenced by ACTION_GROUP(), and GetName().


The documentation for this class was generated from the following files: