36 m_alt = wxEmptyString;
87 if( !
m_alt.IsEmpty() )
98 if( !
m_alt.IsEmpty() )
101 if(
name == wxS(
"~" ) )
102 return wxEmptyString;
111 return wxEmptyString;
119 if( !
m_alt.IsEmpty() )
128 if( !
m_alt.IsEmpty() )
178 bool isReplaced =
false;
197 return wxString::Format(
"Symbol %s %s",
207 aList.emplace_back(
_(
"Type" ),
_(
"Pin" ) );
216 aList.emplace_back(
_(
"Converted" ), msg );
223 aList.emplace_back(
_(
"Visible" ),
IsVisible() ?
_(
"Yes" ) :
_(
"No" ) );
234 aList.emplace_back( symbol->
GetRef( currentSheet ),
256 || ( aPin->
GetType() == ELECTRICAL_PINTYPE::PT_PASSIVE ) );
294 if( it->second.second == aForceNoConnect )
295 return it->second.first;
298 wxString
name =
"Net-(";
299 bool unconnected =
false;
301 if( aForceNoConnect ||
GetType() == ELECTRICAL_PINTYPE::PT_NC )
304 name = (
"unconnected-(" );
307 bool annotated =
true;
310 bool has_multiple =
false;
316 && unconnected == (
pin->GetType() == ELECTRICAL_PINTYPE::PT_NC ) )
338 if( unconnected || has_multiple )
365 bool aIncludeElectricalType )
const
369 aIncludeElectricalType );
385 aAccuracy = std::max( aAccuracy,
Schematic()->Settings().m_PinSymbolSize / 4 );
void Offset(coord_type dx, coord_type dy)
void RevertYAxis()
Mirror the rectangle from the X axis (negate Y pos and size).
bool Intersects(const BOX2< Vec > &aRect) const
bool Contains(const Vec &aPoint) const
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
EDA_ITEM * GetParent() const
EDA_ITEM * m_parent
Linked list: Link (parent struct)
virtual const wxString & GetText() const
Return the string associated with the text object.
wxString AsString() const
ELECTRICAL_PINTYPE GetType() const
const BOX2I GetBoundingBox() const override
PIN_ORIENTATION GetOrientation() const
wxString GetShownNumber() const
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
wxString GetShownName() const
VECTOR2I GetPosition() const override
const wxString & GetNumber() const
GRAPHIC_PINSHAPE GetShape() const
ALT GetAlt(const wxString &aAlt)
const wxString & GetName() const
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.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void AppendInfoToMsgPanel(std::vector< MSG_PANEL_ITEM > &aList) const
Adds information about the connection object to aList.
Schematic editor (Eeschema) main window.
SCH_SHEET_PATH & GetCurrentSheet() const
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_ITEM & operator=(const SCH_ITEM &aPin)
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
bool IsConnectivityDirty() const
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) 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 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.
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void SetPosition(const VECTOR2I &aPosition) override
SCH_PIN & operator=(const SCH_PIN &aPin)
wxString GetShownNumber() const
std::map< const SCH_SHEET_PATH, std::pair< wxString, bool > > m_net_name_map
bool IsGlobalPower() const
bool ConnectionPropagatesTo(const EDA_ITEM *aItem) const override
Return true if this item should propagate connection info to aItem.
LIB_PIN * GetLibPin() const
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
wxString GetNumber() const
std::recursive_mutex m_netmap_mutex
The name that this pin connection will drive onto a net.
PIN_ORIENTATION GetOrientation() const
VECTOR2I GetPosition() const override
SCH_PIN(LIB_PIN *aLibPin, SCH_SYMBOL *aParentSymbol)
bool Replace(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) override
Perform a text replace using the find and replace criteria in aSearchData on items that support text ...
const VECTOR2I GetLocalPosition() const
wxString GetShownName() const
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
VECTOR2I GetTransformedPosition() const
void ClearDefaultNetName(const SCH_SHEET_PATH *aPath)
bool IsStacked(const SCH_PIN *aPin) const
SCH_SYMBOL * GetParentSymbol() const
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
wxString GetDefaultNetName(const SCH_SHEET_PATH &aPath, bool aForceNoConnect=false)
GRAPHIC_PINSHAPE GetShape() const
ELECTRICAL_PINTYPE GetType() const
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const
Return the reference for the given sheet path.
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve a list of the SCH_PINs for the given sheet path.
VECTOR2I GetPosition() const override
TRANSFORM & GetTransform()
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
#define SHOW_ELEC_TYPE
Show pin electrical type. Shared with IS_ROLLOVER.
@ LAYER_SELECTION_SHADOWS
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE aType)
wxString PinShapeGetText(GRAPHIC_PINSHAPE aShape)
wxString PinOrientationName(PIN_ORIENTATION aOrientation)
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
PIN_ORIENTATION
The symbol library pin object orientations.
#define NO_SETTER(owner, type)
static struct SCH_PIN_DESC _SCH_PIN_DESC
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
wxString UnescapeString(const wxString &aSource)
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
ELECTRICAL_PINTYPE m_Type
@ VALUE_FIELD
Field Value of part, i.e. "3.3K".
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".