KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EDA_GROUP Class Referenceabstract

A set of EDA_ITEMs (i.e., without duplicates). More...

#include <eda_group.h>

Inheritance diagram for EDA_GROUP:
PCB_GROUP SCH_GROUP PCB_GENERATOR PCB_TUNING_PATTERN

Public Member Functions

virtual EDA_ITEMAsEdaItem ()=0
 
virtual ~EDA_GROUP ()=default
 
wxString GetName () const
 
void SetName (const wxString &aName)
 
std::unordered_set< EDA_ITEM * > & GetItems ()
 
const std::unordered_set< EDA_ITEM * > & GetItems () const
 
void AddItem (EDA_ITEM *aItem)
 Add item to group.
 
void RemoveItem (EDA_ITEM *aItem)
 Remove item from group.
 
void RemoveAll ()
 
KIID_VECT_LIST GetGroupMemberIds () const
 
bool HasDesignBlockLink () const
 
void SetDesignBlockLibId (const LIB_ID &aLibId)
 
const LIB_IDGetDesignBlockLibId () const
 

Protected Attributes

std::unordered_set< EDA_ITEM * > m_items
 
wxString m_name
 
LIB_ID m_designBlockLibId
 

Detailed Description

A set of EDA_ITEMs (i.e., without duplicates).

The group parent is always board/sheet, not logical parent group. The group is transparent container - e.g., its position is derived from the position of its members. A selection containing a group implicitly contains its members. However other operations on sets of items, like committing, updating the view, etc the set is explicit.

Definition at line 45 of file eda_group.h.

Constructor & Destructor Documentation

◆ ~EDA_GROUP()

virtual EDA_GROUP::~EDA_GROUP ( )
virtualdefault

Member Function Documentation

◆ AddItem()

◆ AsEdaItem()

◆ GetDesignBlockLibId()

const LIB_ID & EDA_GROUP::GetDesignBlockLibId ( ) const
inline

◆ GetGroupMemberIds()

KIID_VECT_LIST EDA_GROUP::GetGroupMemberIds ( ) const

Definition at line 58 of file eda_group.cpp.

References m_items.

◆ GetItems() [1/2]

◆ GetItems() [2/2]

const std::unordered_set< EDA_ITEM * > & EDA_GROUP::GetItems ( ) const
inline

Definition at line 55 of file eda_group.h.

References m_items.

◆ GetName()

◆ HasDesignBlockLink()

bool EDA_GROUP::HasDesignBlockLink ( ) const
inline

Definition at line 70 of file eda_group.h.

References LIB_ID::IsValid(), and m_designBlockLibId.

Referenced by PCB_IO_KICAD_SEXPR::format(), and SCH_IO_KICAD_SEXPR::saveGroup().

◆ RemoveAll()

void EDA_GROUP::RemoveAll ( )

Definition at line 49 of file eda_group.cpp.

References m_items.

Referenced by DIALOG_GROUP_PROPERTIES::TransferDataFromWindow().

◆ RemoveItem()

void EDA_GROUP::RemoveItem ( EDA_ITEM aItem)

◆ SetDesignBlockLibId()

void EDA_GROUP::SetDesignBlockLibId ( const LIB_ID aLibId)
inline

Definition at line 72 of file eda_group.h.

References m_designBlockLibId.

Referenced by DIALOG_GROUP_PROPERTIES::TransferDataFromWindow().

◆ SetName()

Member Data Documentation

◆ m_designBlockLibId

LIB_ID EDA_GROUP::m_designBlockLibId
protected

◆ m_items

◆ m_name


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