36using namespace std::placeholders;
56 if( ( aNetCode >= 0 ) && board )
82 *aSource = constraint.
GetName();
129 return wxT(
"[** NO BOARD DEFINED **]" );
133 if( !netname.length() )
134 return wxT(
"[<no net>]" );
136 return wxT(
"[" ) +
UnescapeString( netname ) + wxT(
"](" ) +
_(
"Not Found" ) + wxT(
")" );
159 if( board->GetNetInfo().m_DisplayNetnamesDirty )
160 board->GetNetInfo().RebuildDisplayNetnames();
173 if( layerEnum.
Choices().GetCount() == 0 )
190 layer->SetChoices( layerEnum.
Choices() );
227 auto supportsTeardrops =
232 if( bci->GetBoard()->LegacyTeardrops() )
241 auto supportsTeardropPreferZoneSetting =
246 if( bci->GetBoard()->LegacyTeardrops() )
255 const wxString groupTeardrops =
_HKI(
"Teardrops" );
260 enableTeardrops->SetAvailableFunc( supportsTeardrops );
261 propMgr.
AddProperty( enableTeardrops, groupTeardrops );
266 bestLength->SetAvailableFunc( supportsTeardrops );
273 maxLength->SetAvailableFunc( supportsTeardrops );
279 bestWidth->SetAvailableFunc( supportsTeardrops );
286 maxWidth->SetAvailableFunc( supportsTeardrops );
292 curvePts->SetAvailableFunc( supportsTeardrops );
298 preferZones->SetAvailableFunc( supportsTeardropPreferZoneSetting );
299 propMgr.
AddProperty( preferZones, groupTeardrops );
304 twoTracks->SetAvailableFunc( supportsTeardrops );
310 maxTrackWidth->SetAvailableFunc( supportsTeardrops );
311 propMgr.
AddProperty( maxTrackWidth, groupTeardrops );
static struct BOARD_CONNECTED_ITEM_DESC _BOARD_CONNECTED_ITEM_DESC
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
wxString GetNetnameMsg() const
bool GetTeardropPreferZoneConnections() const
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
double GetTeardropBestLengthRatio() const
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
void SetTeardropBestWidthRatio(double aRatio)
wxString GetNetname() const
void SetTeardropMaxTrackWidth(double aRatio)
int GetTeardropMaxLength() const
BOARD_CONNECTED_ITEM(BOARD_ITEM *aParent, KICAD_T idtype)
double GetTeardropMaxTrackWidth() const
bool GetTeardropsEnabled() const
wxString GetNetClassVariableSubstitutionName() const
bool GetTeardropCurved() const
void SetTeardropAllowSpanTwoTracks(bool aAllow)
const wxString & GetDisplayNetname() const
const wxString & GetShortNetname() const
double GetTeardropBestWidthRatio() const
wxString GetNetClassName() const
Returns the name of the effective netclass.
void SetTeardropCurved(bool aCurve)
NETINFO_ITEM * m_netinfo
Store all information about the net that item belongs to.
virtual int GetOwnClearance(PCB_LAYER_ID aLayer, wxString *aSource=nullptr) const
Return an item's "own" clearance in internal units.
void SetTeardropMaxWidth(int aMaxWidth)
int GetTeardropMaxWidth() const
void SetTeardropPreferZoneConnections(bool aPrefer)
void SetTeardropBestLengthRatio(double aRatio)
void SetTeardropMaxLength(int aMaxLength)
bool GetTeardropAllowSpanTwoTracks() const
bool m_localRatsnestVisible
void SetTeardropsEnabled(bool aEnable)
Container for design settings for a BOARD object.
std::shared_ptr< NET_SETTINGS > m_NetSettings
std::shared_ptr< DRC_ENGINE > m_DRCEngine
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
virtual bool IsOnCopperLayer() const
Information pertinent to a Pcbnew printed circuit board.
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
MINOPTMAX< int > & Value()
ENUM_MAP & Map(T aValue, const wxString &aName)
static ENUM_MAP< T > & Instance()
ENUM_MAP & Undefined(T aValue)
Class that other classes need to inherit from, in order to be inspectable.
static LSET AllLayersMask()
static wxString Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
A collection of nets and the parameters used to route or test these nets.
const wxString GetName() const
Gets the consolidated name of this netclass (which may be an aggregate)
const wxString GetVariableSubstitutionName() const
Gets the name of this (maybe aggregate) netclass in a format for label variable substitutions.
const wxString & GetShortNetname() const
const wxString & GetNetname() const
const wxString & GetDisplayNetname() const
Container for NETINFO_ITEM elements, which are the nets.
static NETINFO_ITEM * OrphanedItem()
NETINFO_ITEM meaning that there was no net assigned for an item, as there was no board storing net li...
PROPERTY_BASE & SetIsHiddenFromPropertiesManager(bool aHide=true)
PROPERTY_BASE & SetIsHiddenFromRulesEditor(bool aHide=true)
PROPERTY_BASE & SetIsHiddenFromLibraryEditors(bool aIsHidden=true)
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.
PROPERTY_BASE & ReplaceProperty(size_t aBase, const wxString &aName, PROPERTY_BASE *aNew, const wxString &aGroup=wxEmptyString)
Replace an existing property for a specific type.
static VALIDATOR_RESULT PositiveRatioValidator(const wxAny &&aValue, EDA_ITEM *aItem)
Some functions to handle hotkeys in KiCad.
PCB_LAYER_ID
A quick note on layer IDs:
#define NO_SETTER(owner, type)
static const char * emptyString
wxString UnescapeString(const wxString &aSource)
BOARD_CONNECTED_ITEM_DESC()
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_PAD_T
class PAD, a pad in a footprint