|
KiCad PCB EDA Suite
|
#include <design_block.h>
Public Member Functions | |
| LIB_ID | GetLIB_ID () const override |
| wxString | GetName () const override |
| wxString | GetLibNickname () const override |
| wxString | GetDesc () override |
| std::vector< SEARCH_TERM > & | GetSearchTerms () override |
| void | SetLibId (const LIB_ID &aName) |
| const LIB_ID & | GetLibId () const |
| LIB_ID & | GetLibId () |
| const wxString & | GetLibDescription () const |
| void | SetLibDescription (const wxString &aDesc) |
| const wxString & | GetKeywords () const |
| void | SetKeywords (const wxString &aKeywords) |
| const wxString & | GetSchematicFile () const |
| void | SetSchematicFile (const wxString &aFile) |
| const wxString & | GetBoardFile () const |
| void | SetBoardFile (const wxString &aFile) |
| const nlohmann::ordered_map< wxString, wxString > & | GetFields () const |
| nlohmann::ordered_map< wxString, wxString > & | GetFields () |
| void | Serialize (google::protobuf::Any &aContainer) const override |
| Serializes this object to the given Any message. | |
| void | Serialize (kiapi::common::types::DesignBlock &aDesignBlock) const |
| bool | Deserialize (const google::protobuf::Any &aContainer) override |
| Deserializes the given protobuf message into this object. | |
| bool | Deserialize (const kiapi::common::types::DesignBlock &aDesignBlock) |
| DESIGN_BLOCK ()=default | |
| DESIGN_BLOCK (DESIGN_BLOCK &&aOther)=delete | |
| This is the only way to get m_fields to compile as a class member. | |
| virtual void | GetChooserFields (std::map< wxString, wxString > &aColumnMap) |
| Retrieves a key/value map of the fields on this item that should be exposed to the library browser/chooser for displaying in columns, searching, etc. | |
| virtual bool | IsRoot () const |
| For items having aliases, IsRoot() indicates the principal item. | |
| virtual bool | IsPowerSymbol () const |
| For symbols that could be a power symbol. | |
| virtual wxString | GetFootprint () const |
| For items with footprint fields. | |
| virtual int | GetPinCount () const |
| The pin count for symbols or the unique pad count for footprints. | |
| virtual int | GetSubUnitCount () const |
| For items with units, return the number of units. | |
| virtual wxString | GetUnitName (int aUnit) const |
| For items with units, return an identifier for unit x. | |
Private Attributes | |
| LIB_ID | m_lib_id |
| wxString | m_schematicFile |
| File name and path for schematic file. | |
| wxString | m_boardFile |
| File name and path for board file. | |
| wxString | m_libDescription |
| File name and path for documentation file. | |
| wxString | m_keywords |
| Search keywords to find design block in library. | |
| nlohmann::ordered_map< wxString, wxString > | m_fields |
| std::vector< SEARCH_TERM > | m_searchTerms |
Definition at line 32 of file design_block.h.
|
default |
Referenced by DESIGN_BLOCK().
|
delete |
This is the only way to get m_fields to compile as a class member.
References DESIGN_BLOCK().
|
overridevirtual |
Deserializes the given protobuf message into this object.
| aContainer | is an Any which should have a concrete type matching this object |
Reimplemented from SERIALIZABLE.
Definition at line 104 of file design_block.cpp.
References Deserialize().
Referenced by Deserialize().
| bool DESIGN_BLOCK::Deserialize | ( | const kiapi::common::types::DesignBlock & | aDesignBlock | ) |
Definition at line 81 of file design_block.cpp.
References m_boardFile, m_fields, m_keywords, m_lib_id, m_libDescription, m_schematicFile, and kiapi::common::UnpackLibId().
|
inline |
Definition at line 55 of file design_block.h.
References m_boardFile.
Referenced by DESIGN_BLOCK_IO::DesignBlockSave(), and PCB_DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock().
|
inlinevirtualinherited |
Retrieves a key/value map of the fields on this item that should be exposed to the library browser/chooser for displaying in columns, searching, etc.
Reimplemented in LIB_SYMBOL.
Definition at line 53 of file lib_tree_item.h.
Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().
|
inlineoverridevirtual |
Implements LIB_TREE_ITEM.
Definition at line 39 of file design_block.h.
References GetLibDescription().
Referenced by GetSearchTerms().
|
inline |
Definition at line 59 of file design_block.h.
References m_fields.
|
inline |
Definition at line 58 of file design_block.h.
References m_fields.
Referenced by DESIGN_BLOCK_IO::DesignBlockLoad(), DESIGN_BLOCK_IO::DesignBlockSave(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo(), and SCH_EDIT_FRAME::SaveSheetAsDesignBlock().
|
inlinevirtualinherited |
For items with footprint fields.
Reimplemented in LIB_SYMBOL.
Definition at line 68 of file lib_tree_item.h.
Referenced by FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), PCB_IO_KICAD_SEXPR::ImportFootprint(), LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), DIALOG_FOOTPRINT_FIELDS_TABLE::LoadFieldNames(), and FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
inline |
Definition at line 49 of file design_block.h.
References m_keywords.
Referenced by DESIGN_BLOCK_IO::DesignBlockSave(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo(), and GetSearchTerms().
|
inlineoverridevirtual |
Implements LIB_TREE_ITEM.
Definition at line 36 of file design_block.h.
References GetLibId().
Referenced by GetSearchTerms().
|
inline |
Definition at line 46 of file design_block.h.
References m_libDescription.
Referenced by DESIGN_BLOCK_IO::DesignBlockSave(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo(), and GetDesc().
|
inline |
Definition at line 44 of file design_block.h.
References m_lib_id.
|
inline |
Definition at line 43 of file design_block.h.
References m_lib_id.
Referenced by PCB_CONTROL::AppendBoard(), DESIGN_BLOCK_IO::DesignBlockSave(), GetLIB_ID(), PCB_EDIT_FRAME::SaveBoardAsDesignBlock(), PCB_EDIT_FRAME::SaveSelectionAsDesignBlock(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), PCB_EDIT_FRAME::saveSelectionToDesignBlock(), and SCH_EDIT_FRAME::SaveSheetAsDesignBlock().
|
inlineoverridevirtual |
Implements LIB_TREE_ITEM.
Definition at line 38 of file design_block.h.
References m_lib_id.
Referenced by GetSearchTerms().
|
inlineoverridevirtual |
Implements LIB_TREE_ITEM.
Definition at line 37 of file design_block.h.
References m_lib_id.
Referenced by GetSearchTerms(), and DESIGN_BLOCK_LIBRARY_ADAPTER::SaveDesignBlock().
|
inlinevirtualinherited |
The pin count for symbols or the unique pad count for footprints.
Reimplemented in FOOTPRINT, FOOTPRINT_INFO, and LIB_SYMBOL.
Definition at line 73 of file lib_tree_item.h.
Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM().
|
inline |
Definition at line 52 of file design_block.h.
References m_schematicFile.
Referenced by DESIGN_BLOCK_IO::DesignBlockSave(), and SCH_DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock().
|
overridevirtual |
Implements LIB_TREE_ITEM.
Definition at line 26 of file design_block.cpp.
References Format(), GetDesc(), GetKeywords(), GetLIB_ID(), GetLibNickname(), GetName(), and m_searchTerms.
|
inlinevirtualinherited |
For items with units, return the number of units.
Reimplemented in LIB_SYMBOL.
Definition at line 78 of file lib_tree_item.h.
Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().
|
inlinevirtualinherited |
For items with units, return an identifier for unit x.
Reimplemented in LIB_SYMBOL.
Definition at line 83 of file lib_tree_item.h.
Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().
|
inlinevirtualinherited |
For symbols that could be a power symbol.
Reimplemented in LIB_SYMBOL.
Definition at line 63 of file lib_tree_item.h.
Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().
|
inlinevirtualinherited |
For items having aliases, IsRoot() indicates the principal item.
Reimplemented in LIB_SYMBOL.
Definition at line 60 of file lib_tree_item.h.
Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().
|
overridevirtual |
Serializes this object to the given Any message.
The Any message's concrete type will be specific to the object in question.
| aContainer | will be filled with a message describing this object |
Reimplemented from SERIALIZABLE.
Definition at line 71 of file design_block.cpp.
References Serialize().
Referenced by API_HANDLER_LIBRARIES::packLibraryItem(), and Serialize().
| void DESIGN_BLOCK::Serialize | ( | kiapi::common::types::DesignBlock & | aDesignBlock | ) | const |
Definition at line 48 of file design_block.cpp.
References m_boardFile, m_fields, m_keywords, m_lib_id, m_libDescription, m_schematicFile, name, and kiapi::common::PackLibId().
|
inline |
Definition at line 56 of file design_block.h.
References m_boardFile.
Referenced by DESIGN_BLOCK_IO::DesignBlockLoad(), PCB_EDIT_FRAME::SaveBoardAsDesignBlock(), and PCB_EDIT_FRAME::saveSelectionToDesignBlock().
|
inline |
Definition at line 50 of file design_block.h.
References m_keywords.
Referenced by DESIGN_BLOCK_IO::DesignBlockLoad().
|
inline |
Definition at line 47 of file design_block.h.
References m_libDescription.
Referenced by DESIGN_BLOCK_IO::DesignBlockLoad().
|
inline |
Definition at line 42 of file design_block.h.
References m_lib_id.
Referenced by DESIGN_BLOCK_IO::DesignBlockLoad(), PCB_EDIT_FRAME::SaveBoardAsDesignBlock(), PCB_EDIT_FRAME::SaveSelectionAsDesignBlock(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), and SCH_EDIT_FRAME::SaveSheetAsDesignBlock().
|
inline |
Definition at line 53 of file design_block.h.
References m_schematicFile.
Referenced by DESIGN_BLOCK_IO::DesignBlockLoad(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), and SCH_EDIT_FRAME::SaveSheetAsDesignBlock().
|
private |
File name and path for board file.
Definition at line 75 of file design_block.h.
Referenced by Deserialize(), GetBoardFile(), Serialize(), and SetBoardFile().
|
private |
Definition at line 79 of file design_block.h.
Referenced by Deserialize(), GetFields(), GetFields(), and Serialize().
|
private |
Search keywords to find design block in library.
Definition at line 77 of file design_block.h.
Referenced by Deserialize(), GetKeywords(), Serialize(), and SetKeywords().
|
private |
Definition at line 73 of file design_block.h.
Referenced by Deserialize(), GetLibId(), GetLibId(), GetLibNickname(), GetName(), Serialize(), and SetLibId().
|
private |
File name and path for documentation file.
Definition at line 76 of file design_block.h.
Referenced by Deserialize(), GetLibDescription(), Serialize(), and SetLibDescription().
|
private |
File name and path for schematic file.
Definition at line 74 of file design_block.h.
Referenced by Deserialize(), GetSchematicFile(), Serialize(), and SetSchematicFile().
|
private |
Definition at line 80 of file design_block.h.
Referenced by GetSearchTerms().