KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_group_tool.h
Go to the documentation of this file.
1#include <tool/group_tool.h>
2#include <sch_commit.h>
3#include <sch_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<SCH_COMMIT>( m_toolMgr ); }
18
20 {
21 if( aItem->Type() == SCH_GROUP_T )
22 return static_cast<SCH_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
int Group(const TOOL_EVENT &aEvent) override
Ungroup selected items.
int PickNewMember(const TOOL_EVENT &aEvent) override
Invoke the picker tool to select a new member of the group.
EDA_GROUP * getGroupFromItem(EDA_ITEM *aItem) override
Subclasses implement to provide correct *_COMMIT object type.
std::shared_ptr< COMMIT > createCommit() override
A set of SCH_ITEMs (i.e., without duplicates).
Definition: sch_group.h:52
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:220
Generic, UI-independent tool event.
Definition: tool_event.h:168
Class to handle a set of SCH_ITEMs.
@ SCH_GROUP_T
Definition: typeinfo.h:173