130 bestPosition.
x = pageSize.
x / 2;
131 bestPosition.
y = pageSize.
y / 2;
144 msg.Printf(
_(
"Cannot add %s (no footprint assigned)." ),
153 if( footprint ==
nullptr )
155 msg.Printf(
_(
"Cannot add %s (footprint '%s' not found)." ),
168 msg.Printf(
_(
"Add %s (footprint '%s')." ),
183 pad->SetNetCode( 0 );
198 msg.Printf(
_(
"Added %s (footprint '%s')." ),
211 wxString curClassName, newClassName;
215 curClassName = curClass->
GetName();
227 newClassName = newClass->
GetName();
230 if( curClassName == newClassName )
237 if( curClassName == wxEmptyString && newClassName != wxEmptyString )
239 msg.Printf(
_(
"Change %s component class to '%s'." ),
243 else if( curClassName != wxEmptyString && newClassName == wxEmptyString )
245 msg.Printf(
_(
"Remove %s component class (currently '%s')." ),
251 msg.Printf(
_(
"Change %s component class from '%s' to '%s'." ),
259 wxASSERT_MSG( newClass !=
nullptr,
"Component class should not be nullptr" );
263 if( curClassName == wxEmptyString && newClassName != wxEmptyString )
265 msg.Printf(
_(
"Changed %s component class to '%s'." ),
269 else if( curClassName != wxEmptyString && newClassName == wxEmptyString )
271 msg.Printf(
_(
"Removed %s component class (was '%s')." ),
277 msg.Printf(
_(
"Changed %s component class from '%s' to '%s'." ),
295 msg.Printf(
_(
"Cannot update %s (no footprint assigned)." ),
304 if( newFootprint ==
nullptr )
306 msg.Printf(
_(
"Cannot update %s (footprint '%s' not found)." ),
318 msg.Printf(
_(
"Cannot change %s footprint from '%s' to '%s' (footprint is locked)."),
329 msg.Printf(
_(
"Change %s footprint from '%s' to '%s'."),
343 msg.Printf(
_(
"Could not change %s footprint from '%s' to '%s' (footprint is locked)."),
356 msg.Printf(
_(
"Changed %s footprint from '%s' to '%s'."),
379 copy->SetParentGroup(
nullptr );
382 bool changed =
false;
389 msg.Printf(
_(
"Change %s reference designator to %s." ),
395 msg.Printf(
_(
"Changed %s reference designator to %s." ),
411 msg.Printf(
_(
"Change %s value from %s to %s." ),
418 msg.Printf(
_(
"Changed %s value from %s to %s." ),
433 if( !aNetlistComponent->
GetKIIDs().empty() )
434 new_path.push_back( aNetlistComponent->
GetKIIDs().front() );
436 if( aPcbFootprint->
GetPath() != new_path )
440 msg.Printf(
_(
"Update %s symbol association from %s to %s." ),
447 msg.Printf(
_(
"Updated %s symbol association from %s to %s." ),
453 aPcbFootprint->
SetPath( new_path );
459 nlohmann::ordered_map<wxString, wxString> fpFieldsAsMap;
464 if( field->IsReference() || field->IsValue() || field->IsComponentClass() )
469 fpFieldsAsMap[field->GetName()] = field->GetText();
473 nlohmann::ordered_map<wxString, wxString> compFields = aNetlistComponent->
GetFields();
479 compFields.erase( wxT(
"Component Class" ) );
486 for(
const auto& [
name, value] : compFields )
488 if( fpFieldsAsMap.count(
name ) == 0 || fpFieldsAsMap[
name] != value )
495 for(
const auto& [
name, value] : fpFieldsAsMap )
497 if( compFields.count(
name ) == 0 )
508 msg.Printf(
_(
"Update %s fields." ), aPcbFootprint->
GetReference() );
514 if( field->IsMandatory() )
517 if( compFields.count( field->GetName() ) == 0 )
519 msg.Printf(
_(
"Remove %s footprint fields not in symbol." ),
528 msg.Printf(
_(
"Updated %s fields." ), aPcbFootprint->
GetReference() );
534 for(
auto& [
name, value] : compFields )
543 aPcbFootprint->
Add( newField );
563 std::vector<PCB_FIELD*> fieldList;
564 aPcbFootprint->
GetFields( fieldList,
false );
568 if( field->IsMandatory() )
571 if( compFields.count( field->GetName() ) == 0 )
576 msg.Printf(
_(
"Removed %s footprint fields not in symbol." ),
581 aPcbFootprint->
Remove( field );
598 if( !humanSheetPath.empty() )
599 sheetname = humanSheetPath;
600 else if( aNetlistComponent->
GetProperties().count( wxT(
"Sheetname" ) ) > 0 )
601 sheetname = aNetlistComponent->
GetProperties().at( wxT(
"Sheetname" ) );
603 if( aNetlistComponent->
GetProperties().count( wxT(
"Sheetfile" ) ) > 0 )
604 sheetfile = aNetlistComponent->
GetProperties().at( wxT(
"Sheetfile" ) );
606 if( aNetlistComponent->
GetProperties().count( wxT(
"ki_fp_filters" ) ) > 0 )
607 fpFilters = aNetlistComponent->
GetProperties().at( wxT(
"ki_fp_filters" ) );
613 msg.Printf(
_(
"Update %s sheetname to '%s'." ),
620 msg.Printf(
_(
"Updated %s sheetname to '%s'." ),
632 msg.Printf(
_(
"Update %s sheetfile to '%s'." ),
639 msg.Printf(
_(
"Updated %s sheetfile to '%s'." ),
647 if( fpFilters != aPcbFootprint->
GetFilters() )
651 msg.Printf(
_(
"Update %s footprint filters to '%s'." ),
658 msg.Printf(
_(
"Updated %s footprint filters to '%s'." ),
666 if( ( aNetlistComponent->
GetProperties().count( wxT(
"exclude_from_bom" ) ) > 0 )
671 if( aNetlistComponent->
GetProperties().count( wxT(
"exclude_from_bom" ) ) )
673 msg.Printf(
_(
"Add %s 'exclude from BOM' fabrication attribute." ),
678 msg.Printf(
_(
"Remove %s 'exclude from BOM' fabrication attribute." ),
686 if( aNetlistComponent->
GetProperties().count( wxT(
"exclude_from_bom" ) ) )
689 msg.Printf(
_(
"Added %s 'exclude from BOM' fabrication attribute." ),
694 attributes &= ~FP_EXCLUDE_FROM_BOM;
695 msg.Printf(
_(
"Removed %s 'exclude from BOM' fabrication attribute." ),
706 if( ( aNetlistComponent->
GetProperties().count( wxT(
"dnp" ) ) > 0 )
711 if( aNetlistComponent->
GetProperties().count( wxT(
"dnp" ) ) )
713 msg.Printf(
_(
"Add %s 'Do not place' fabrication attribute." ),
718 msg.Printf(
_(
"Remove %s 'Do not place' fabrication attribute." ),
726 if( aNetlistComponent->
GetProperties().count( wxT(
"dnp" ) ) )
729 msg.Printf(
_(
"Added %s 'Do not place' fabrication attribute." ),
734 attributes &= ~FP_DNP;
735 msg.Printf(
_(
"Removed %s 'Do not place' fabrication attribute." ),
758 msg.Printf(
_(
"Added %s 'duplicate pad numbers are jumpers' attribute." ),
763 msg.Printf(
_(
"Removed %s 'duplicate pad numbers are jumpers' attribute." ),
771 msg.Printf(
_(
"Add %s 'duplicate pad numbers are jumpers' attribute." ),
776 msg.Printf(
_(
"Remove %s 'duplicate pad numbers are jumpers' attribute." ),
790 msg.Printf(
_(
"Updated %s jumper pad groups" ), aPcbFootprint->
GetReference() );
794 msg.Printf(
_(
"Update %s jumper pad groups" ), aPcbFootprint->
GetReference() );
800 if( changed &&
copy )
823 copy->SetParentGroup(
nullptr );
826 bool changed =
false;
835 KIID existingGroupKIID = existingGroup ? existingGroup->
m_Uuid : 0;
840 return group->m_Uuid == newGroupKIID;
848 if( newGroupKIID == existingGroupKIID )
852 if( existingGroupKIID != 0 )
856 msg.Printf(
_(
"Remove %s from group \"%s\"." ),
862 msg.Printf(
_(
"Removed %s from group \"%s\"." ),
876 if( newGroupKIID != 0 )
880 msg.Printf(
_(
"Add %s to group \"%s\"." ),
886 msg.Printf(
_(
"Added %s group \"%s\"." ),
892 if( newGroup ==
nullptr )
895 const_cast<KIID&
>( newGroup->
m_Uuid ) = newGroupKIID;
908 newGroup->
AddItem( aPcbFootprint );
915 if( changed &&
copy )
935 copy->SetParentGroup(
nullptr );
938 bool changed =
false;
941 std::deque<PAD*> pads = aFootprint->
Pads();
942 std::set<wxString> padNetnames;
944 std::sort( pads.begin(), pads.end(),
947 return a->m_Uuid < b->m_Uuid;
954 wxString pinFunction;
965 if(
pad->GetPinFunction() != pinFunction )
968 pad->SetPinFunction( pinFunction );
971 if(
pad->GetPinType() != pinType )
974 pad->SetPinType( pinType );
983 if( !net.
IsValid() || !
pad->IsOnCopperLayer() )
985 if( !
pad->GetNetname().IsEmpty() )
989 msg.Printf(
_(
"Disconnect %s pin %s." ),
995 msg.Printf(
_(
"Disconnected %s pin %s." ),
1002 else if(
pad->IsOnCopperLayer() && !
pad->GetNumber().IsEmpty() )
1005 msg.Printf(
_(
"No net found for component %s pad %s (no pin %s in symbol)." ),
1020 if(
pad->GetNetname().IsEmpty() )
1021 pad->SetPinFunction( wxEmptyString );
1033 if(
pad->IsNoConnectPad() )
1035 netName = wxString::Format( wxS(
"%s" ),
1038 for(
int jj = 1; !padNetnames.insert( netName ).second; jj++ )
1040 netName = wxString::Format( wxS(
"%s_%d" ),
1050 if(
pad->GetNetname() != netName )
1053 if( netinfo ==
nullptr )
1060 if( netinfo ==
nullptr )
1072 msg.Printf(
_(
"Add net %s." ),
1077 if( !
pad->GetNetname().IsEmpty() )
1083 msg.Printf(
_(
"Reconnect %s pin %s from %s to %s."),
1091 msg.Printf(
_(
"Reconnected %s pin %s from %s to %s."),
1102 msg.Printf(
_(
"Connect %s pin %s to %s."),
1109 msg.Printf(
_(
"Connected %s pin %s to %s."),
1121 pad->SetNet( netinfo );
1131 if( changed &&
copy )
1144 if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() )
1155 std::set<wxString> netlistNetnames;
1157 for(
int ii = 0; ii < (int) aNetlist.
GetCount(); ii++ )
1161 for(
unsigned jj = 0; jj < component->
GetNetCount(); jj++ )
1173 if( netlistNetnames.count(
via->GetNetname() ) == 0 )
1175 wxString updatedNetname = wxEmptyString;
1184 if( !updatedNetname.IsEmpty() )
1188 wxString originalNetname =
via->GetNetname();
1190 msg.Printf(
_(
"Reconnect via from %s to %s." ),
1205 wxString originalNetname =
via->GetNetname();
1208 via->SetNet( netinfo );
1210 msg.Printf(
_(
"Reconnected via from %s to %s." ),
1220 msg.Printf(
_(
"Via connected to unknown net (%s)." ),
1231 if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() )
1234 if( netlistNetnames.count( zone->GetNetname() ) == 0 )
1239 wxString updatedNetname = wxEmptyString;
1252 if( updatedNetname.IsEmpty() &&
m_oldToNewNets.count( zone->GetNetname() ) )
1257 if( !updatedNetname.IsEmpty() )
1261 wxString originalNetname = zone->GetNetname();
1263 if( !zone->GetZoneName().IsEmpty() )
1265 msg.Printf(
_(
"Reconnect copper zone '%s' from %s to %s." ),
1266 zone->GetZoneName(),
1272 msg.Printf(
_(
"Reconnect copper zone from %s to %s." ),
1288 wxString originalNetname = zone->GetNetname();
1291 zone->SetNet( netinfo );
1293 if( !zone->GetZoneName().IsEmpty() )
1295 msg.Printf(
_(
"Reconnected copper zone '%s' from %s to %s." ),
1302 msg.Printf(
_(
"Reconnected copper zone from %s to %s." ),
1313 if( !zone->GetZoneName().IsEmpty() )
1315 msg.Printf(
_(
"Copper zone '%s' has no pads connected." ),
1321 VECTOR2I pos = zone->GetPosition();
1332 msg.Printf(
_(
"Copper zone on layer %s at (%s, %s) has no pads connected." ),
1357 if( netlistGroup ==
nullptr )
1360 if( netlistGroup->
name != pcbGroup->GetName() )
1365 msg.Printf(
_(
"Change group name to '%s' to '%s'." ),
EscapeHTML( pcbGroup->GetName() ),
1372 msg.Printf(
_(
"Changed group name to '%s' to '%s'." ),
EscapeHTML( pcbGroup->GetName() ),
1375 pcbGroup->SetName( netlistGroup->
name );
1379 if( netlistGroup->
libId != pcbGroup->GetDesignBlockLibId() )
1384 msg.Printf(
_(
"Change group library link to '%s'." ),
1391 msg.Printf(
_(
"Changed group library link to '%s'." ),
1394 pcbGroup->SetDesignBlockLibId( netlistGroup->
libId );
1404 std::map<COMPONENT*, FOOTPRINT*>& aFootprintMap )
1412 for(
int i = 0; i < (int) aNetlist.
GetCount(); i++ )
1415 FOOTPRINT* footprint = aFootprintMap[component];
1421 for(
unsigned jj = 0; jj < component->
GetNetCount(); jj++ )
1425 if( padNumber.IsEmpty() )
1428 msg.Printf(
_(
"Symbol %s has pins with no number. These pins can not be matched "
1438 msg.Printf(
_(
"%s pad %s not found in %s." ),
1454 FOOTPRINT* lastPreexistingFootprint =
nullptr;
1457 std::unordered_set<wxString> sheetPaths;
1463 std::map<COMPONENT*, FOOTPRINT*> footprintMap;
1476 net->SetIsCurrent( net->GetNetCode() == 0 );
1484 for(
unsigned i = 0; i < aNetlist.
GetCount(); i++ )
1488 if( component->
GetProperties().count( wxT(
"exclude_from_board" ) ) )
1491 msg.Printf(
_(
"Processing symbol '%s:%s'." ),
1507 base.push_back( uuid );
1509 if( footprint->GetPath() == base )
1518 match = footprint->GetReference().CmpNoCase( component->
GetReference() ) == 0;
1533 footprintMap[ component ] = tmp;
1540 sheetPaths.insert( footprint->GetSheetname() );
1546 if( footprint == lastPreexistingFootprint )
1553 if( matchCount == 0 )
1559 footprintMap[ component ] = footprint;
1569 else if( matchCount > 1 )
1571 msg.Printf(
_(
"Multiple footprints found for %s." ),
1586 bool matched =
false;
1597 if( component && component->
GetProperties().count( wxT(
"exclude_from_board" ) ) == 0 )
1600 if( doDelete && !matched && footprint->IsLocked() && !
m_overrideLocks )
1604 msg.Printf(
_(
"Cannot remove unused footprint %s (footprint is locked)." ),
1605 footprint->GetReference() );
1609 msg.Printf(
_(
"Could not remove unused footprint %s (footprint is locked)." ),
1610 footprint->GetReference() );
1618 if( doDelete && !matched )
1622 msg.Printf(
_(
"Remove unused footprint %s." ),
1623 footprint->GetReference() );
1627 if( footprint->GetParentGroup() )
1631 msg.Printf(
_(
"Removed unused footprint %s." ),
1632 footprint->GetReference() );
1642 for(
PAD*
pad : footprint->Pads() )
1645 pad->GetNet()->SetIsCurrent(
true );
1661 if( !net->IsCurrent() )
1663 msg.Printf(
_(
"Removed unused net %s." ),
1688 for(
const std::pair<const wxString, NETINFO_ITEM*>& addedNet :
m_addedNets )
1689 delete addedNet.second;
constexpr EDA_IU_SCALE pcbIUScale
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
COMMIT & Stage(EDA_ITEM *aItem, CHANGE_TYPE aChangeType, BASE_SCREEN *aScreen=nullptr) override
Add a change of the item aItem of type aChangeType to the change list.
wxString GetNetname() const
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
std::map< PAD *, wxString > m_padNets
bool m_deleteUnusedFootprints
void cacheNetname(PAD *aPad, const wxString &aNetname)
bool UpdateNetlist(NETLIST &aNetlist)
Update the board's components according to the new netlist.
wxString getNetname(PAD *aPad)
wxString getPinFunction(PAD *aPad)
std::vector< FOOTPRINT * > m_addedFootprints
std::map< wxString, wxString > m_oldToNewNets
void updateComponentClass(FOOTPRINT *aFootprint, COMPONENT *aNewComponent)
bool updateFootprintGroup(FOOTPRINT *aPcbFootprint, COMPONENT *aNetlistComponent)
bool updateFootprintParameters(FOOTPRINT *aPcbFootprint, COMPONENT *aNetlistComponent)
std::map< wxString, NETINFO_ITEM * > m_addedNets
bool testConnectivity(NETLIST &aNetlist, std::map< COMPONENT *, FOOTPRINT * > &aFootprintMap)
bool updateCopperZoneNets(NETLIST &aNetlist)
void cachePinFunction(PAD *aPad, const wxString &aPinFunction)
bool updateGroups(NETLIST &aNetlist)
BOARD_NETLIST_UPDATER(PCB_EDIT_FRAME *aFrame, BOARD *aBoard)
bool updateComponentPadConnections(FOOTPRINT *aFootprint, COMPONENT *aNewComponent)
VECTOR2I estimateFootprintInsertionPosition()
std::map< PAD *, wxString > m_padPinFunctions
std::map< ZONE *, std::vector< PAD * > > m_zoneConnectionsCache
FOOTPRINT * replaceFootprint(NETLIST &aNetlist, FOOTPRINT *aFootprint, COMPONENT *aNewComponent)
void cacheCopperZoneConnections()
FOOTPRINT * addNewFootprint(COMPONENT *aComponent)
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
const PAGE_INFO & GetPageSettings() const
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
const ZONES & Zones() const
const GROUPS & Groups() const
The groups must maintain the following invariants.
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
void RemoveUnusedNets(BOARD_COMMIT *aCommit)
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
COMPONENT_CLASS_MANAGER & GetComponentClassManager()
Gets the component class manager.
bool SynchronizeComponentClasses(const std::unordered_set< wxString > &aNewSheetPaths) const
Copy component class / component class generator information from the project settings.
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
constexpr size_type GetWidth() const
constexpr Vec Centre() const
constexpr size_type GetHeight() const
constexpr coord_type GetBottom() const
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Modify a given item in the model.
COMMIT & Added(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
COMMIT & Modified(EDA_ITEM *aItem, EDA_ITEM *aCopy, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
int GetStatus(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Returns status of an item.
COMPONENT_CLASS * GetEffectiveStaticComponentClass(const std::unordered_set< wxString > &classNames)
Gets an effective component class for the given constituent class names.
static wxString GetFullClassNameForConstituents(const std::unordered_set< wxString > &classNames)
Gets the full effective class name for the given set of constituent classes.
void FinishNetlistUpdate()
Cleans up the manager after a board update Must be called after updating the PCB from the netlist.
const COMPONENT_CLASS * GetNoneComponentClass() const
Returns the unassigned component class.
void InitNetlistUpdate()
Prepare the manager for a board update Must be called prior to updating the PCB from the netlist.
A lightweight representation of a component class.
const wxString & GetName() const
Fetches the full name of this component class.
Used to store the component pin name to net name (and pin function) associations stored in a netlist.
const wxString & GetNetName() const
const wxString & GetPinFunction() const
const wxString & GetPinName() const
const wxString & GetPinType() const
Store all of the related footprint information found in a netlist.
const wxString & GetHumanReadablePath() const
const COMPONENT_NET & GetNet(unsigned aIndex) const
const KIID_PATH & GetPath() const
const wxString & GetReference() const
const wxString & GetValue() const
const nlohmann::ordered_map< wxString, wxString > & GetFields() const
const std::map< wxString, wxString > & GetProperties() const
NETLIST_GROUP * GetGroup() const
const std::vector< KIID > & GetKIIDs() const
bool GetDuplicatePadNumbersAreJumpers() const
const LIB_ID & GetFPID() const
unsigned GetNetCount() const
std::unordered_set< wxString > & GetComponentClassNames()
std::vector< std::set< wxString > > & JumperPadGroups()
virtual bool RemoveItem(EDA_ITEM *aItem)=0
Remove item from group.
virtual EDA_ITEM * AsEdaItem()=0
void SetName(const wxString &aName)
virtual EDA_GROUP * GetParentGroup() const
virtual void SetParentGroup(EDA_GROUP *aGroup)
virtual void SetParent(EDA_ITEM *aParent)
virtual void SetVisible(bool aVisible)
virtual void SetText(const wxString &aText)
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
wxString AsString() const
wxString GetUniStringLibId() const
Handle the data for a net.
void SetIsCurrent(bool isCurrent)
static const int UNCONNECTED
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are ...
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
unsigned GetCount() const
COMPONENT * GetComponentByPath(const KIID_PATH &aPath)
Return a COMPONENT by aPath.
COMPONENT * GetComponentByReference(const wxString &aReference)
Return a COMPONENT by aReference.
NETLIST_GROUP * GetGroupByUuid(const KIID &aUuid)
Return a NETLIST_GROUP by aUuid.
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
static REPORTER & GetInstance()
const wxString & GetPinFunction() const
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
DISPLAY_OPTIONS m_Display
PCBNEW_SETTINGS * GetPcbNewSettings() const
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Attempt to load aFootprintId from the footprint library table.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Return the BOARD_DESIGN_SETTINGS for the open project.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
The main frame for Pcbnew.
void OnModify() override
Must be called after a board change to set the modified flag.
void ExchangeFootprint(FOOTPRINT *aExisting, FOOTPRINT *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetFabricationAttrs=true, bool resetTextContent=true, bool resetClearanceOverrides=true, bool reset3DModels=true, bool *aUpdated=nullptr)
Replace aExisting footprint by aNew footprint using the Existing footprint settings (position,...
void SetName(const wxString &aName)
A set of BOARD_ITEMs (i.e., without duplicates).
EDA_ITEM * AsEdaItem() override
bool AddItem(EDA_ITEM *aItem) override
Add item to group.
void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings) override
virtual void SetPosition(const VECTOR2I &aPos) override
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
Class to handle a set of BOARD_ITEMs.
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
wxString UnescapeString(const wxString &aSource)
constexpr int mmToIU(double mm) const
bool m_DisplayInvertYAxis
bool m_DisplayInvertXAxis
bool m_ShowGlobalRatsnest
wxString GetCanonicalFieldName(FIELD_T aFieldType)
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)