40#include <api/board/board_types.pb.h> 
   41#include <google/protobuf/any.pb.h> 
   61    group.mutable_id()->set_value( 
m_Uuid.AsStdString() );
 
   66        kiapi::common::types::KIID* itemId = 
group.add_items();
 
   67        itemId->set_value( item->m_Uuid.AsStdString() );
 
   70    aContainer.PackFrom( 
group );
 
 
   76    kiapi::board::types::Group 
group;
 
   78    if( !aContainer.UnpackTo( &
group ) )
 
   89    for( 
const kiapi::common::types::KIID& itemId : 
group.items() )
 
   91        KIID id( itemId.value() );
 
 
  102    std::unordered_set<BOARD_ITEM*> items;
 
  106        if( item->IsBOARD_ITEM() )
 
  107            items.insert( 
static_cast<BOARD_ITEM*
>( item ) );
 
 
  132    if( 
group == aScope )
 
  135    while( 
group && 
group->AsEdaItem()->GetParentGroup() && 
group->AsEdaItem()->GetParentGroup() != aScope )
 
 
  238    std::swap( *
this, *
image );
 
 
  272            bbox.
Merge( item->GetBoundingBox() );
 
 
  283    std::shared_ptr<SHAPE_COMPOUND> shape = std::make_shared<SHAPE_COMPOUND>();
 
  286        shape->AddShape( item->GetEffectiveShape( aLayer, aFlash )->Clone() );
 
 
  293                                 const std::vector<KICAD_T>& aScanTypes )
 
  295    for( 
KICAD_T scanType : aScanTypes )
 
  297        if( scanType == 
Type() )
 
 
  364        static_cast<BOARD_ITEM*
>( item )->
Flip( aCentre, aFlipDirection );
 
 
  378        return wxString::Format( 
_( 
"Unnamed Group, %zu members" ), 
m_items.size() );
 
  380        return wxString::Format( 
_( 
"Group '%s', %zu members" ), 
m_name, 
m_items.size() );
 
 
  392    aList.emplace_back( 
_( 
"Group" ), 
m_name.empty() ? 
_( 
"<unnamed>" ) : 
m_name );
 
  393    aList.emplace_back( 
_( 
"Members" ), wxString::Format( wxT( 
"%zu" ), 
m_items.size() ) );
 
  396        aList.emplace_back( 
_( 
"Status" ), 
_( 
"Locked" ) );
 
 
  420    catch( std::bad_function_call& )
 
  422        wxFAIL_MSG( wxT( 
"Error calling function in PCB_GROUP::RunOnChildren" ) );
 
 
  434    return *
this == other;
 
 
  448    for( 
auto it1 = itemSet.begin(), it2 = otherItemSet.begin(); it1 != itemSet.end(); ++it1, ++it2 )
 
  452        if( ( *it1 )->m_Uuid != ( *it2 )->m_Uuid )
 
 
  467    double similarity = 0.0;
 
  477    return similarity / 
m_items.size();
 
 
  496        const wxString groupTab = 
_HKI( 
"Group Properties" );
 
 
 
constexpr EDA_IU_SCALE pcbIUScale
 
BITMAPS
A list of all bitmap identifiers.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
 
virtual BOARD_ITEM * Duplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const
Create a copy of this BOARD_ITEM.
 
void SetLocked(bool aLocked) override
 
bool IsLocked() const override
 
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
 
BOARD_ITEM_CONTAINER * GetParent() const
 
Information pertinent to a Pcbnew printed circuit board.
 
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
 
constexpr Vec Centre() const
 
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
 
The base class for create windows for drawing purpose.
 
A set of EDA_ITEMs (i.e., without duplicates).
 
std::unordered_set< EDA_ITEM * > m_items
 
std::unordered_set< EDA_ITEM * > & GetItems()
 
void AddItem(EDA_ITEM *aItem)
Add item to group.
 
virtual EDA_ITEM * AsEdaItem()=0
 
void SetName(const wxString &aName)
 
virtual EDA_GROUP * GetParentGroup() const
 
KICAD_T Type() const
Returns the type of object.
 
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
 
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
 
static constexpr double LOD_HIDE
Return this constant from ViewGetLOD() to hide the item unconditionally.
 
static constexpr double LOD_SHOW
Return this constant from ViewGetLOD() to show the item unconditionally.
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
 
LSET is a set of PCB_LAYER_IDs.
 
A set of BOARD_ITEMs (i.e., without duplicates).
 
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
 
static bool WithinScope(BOARD_ITEM *aItem, PCB_GROUP *aScope, bool isFootprintEditor)
 
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
 
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
 
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const override
Invoke a function on all children.
 
PCB_GROUP * DeepClone() const
 
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
 
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
 
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
 
static EDA_GROUP * TopLevelGroup(BOARD_ITEM *aItem, EDA_GROUP *aScope, bool isFootprintEditor)
 
bool operator==(const PCB_GROUP &aOther) const
 
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
 
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
 
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
 
void SetPosition(const VECTOR2I &aNewpos) override
 
void Move(const VECTOR2I &aMoveVector) override
Move this object.
 
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
 
INSPECT_RESULT Visit(INSPECTOR aInspector, void *aTestData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
 
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
 
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
 
std::unordered_set< BOARD_ITEM * > GetBoardItems() const
 
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
 
VECTOR2I GetPosition() const override
 
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
 
PCB_GROUP * DeepDuplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const
 
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
 
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
 
PCB_GROUP(BOARD_ITEM *aParent)
 
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
 
void swapData(BOARD_ITEM *aImage) override
 
void SetLocked(bool aLocked) override
 
std::vector< int > ViewGetLayers() const override
 
Provide class metadata.Helper macro to map type hashes to names.
 
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
 
void Mask(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName)
Sets a base class property as masked in a derived class.
 
static PROPERTY_MANAGER & Instance()
 
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
 
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
This file is part of the common library.
 
#define PCB_EDIT_FRAME_NAME
 
std::set< EDA_ITEM *, CompareByUuid > EDA_ITEM_SET
 
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
 
#define IGNORE_PARENT_GROUP
 
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
 
@ LAYER_ANCHOR
Anchor of items having an anchor point (texts, footprints).
 
PCB_LAYER_ID
A quick note on layer IDs:
 
Message panel definition file.
 
EDA_GROUP * getClosestGroup(BOARD_ITEM *aItem, bool isFootprintEditor)
 
static struct PCB_GROUP_DESC _PCB_GROUP_DESC
 
EDA_GROUP * getNestedGroup(BOARD_ITEM *aItem, EDA_GROUP *aScope, bool isFootprintEditor)
Returns the top level group inside the aScope group, or nullptr.
 
Class to handle a set of BOARD_ITEMs.
 
EDA_GROUP * getNestedGroup(SCH_ITEM *aItem, EDA_GROUP *aScope, bool isSymbolEditor)
Returns the top level group inside the aScope group, or nullptr.
 
EDA_GROUP * getClosestGroup(SCH_ITEM *aItem, bool isSymbolEditor)
 
wxString UnescapeString(const wxString &aSource)
 
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
 
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
 
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
 
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
 
VECTOR2< int32_t > VECTOR2I