KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_group_tool.h
Go to the documentation of this file.
1#include <tool/group_tool.h>
2#include <board_commit.h>
3#include <pcb_group.h>
4
6{
7public:
11 int PickNewMember( const TOOL_EVENT& aEvent ) override;
12
14 int Group( const TOOL_EVENT& aEvent ) override;
15
16protected:
17 std::shared_ptr<COMMIT> createCommit() override { return std::make_shared<BOARD_COMMIT>( this ); }
18
20 {
21 if( aItem->Type() == PCB_GROUP_T )
22 return static_cast<PCB_GROUP*>( aItem );
23
24 return nullptr;
25 }
26};
A set of EDA_ITEMs (i.e., without duplicates).
Definition: eda_group.h:46
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:97
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:109
EDA_GROUP * getGroupFromItem(EDA_ITEM *aItem) override
Subclasses implement to provide correct *_COMMIT object type.
int PickNewMember(const TOOL_EVENT &aEvent) override
Invoke the picker tool to select a new member of the group.
int Group(const TOOL_EVENT &aEvent) override
Ungroup selected items.
std::shared_ptr< COMMIT > createCommit() override
A set of BOARD_ITEMs (i.e., without duplicates).
Definition: pcb_group.h:53
Generic, UI-independent tool event.
Definition: tool_event.h:168
Class to handle a set of BOARD_ITEMs.
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
Definition: typeinfo.h:110