35using namespace std::placeholders;
55 if( ( aNetCode >= 0 ) && board )
81 *aSource = constraint.
GetName();
122 return wxT(
"[** NO BOARD DEFINED **]" );
126 if( !netname.length() )
127 return wxT(
"[<no net>]" );
129 return wxT(
"[" ) +
UnescapeString( netname ) + wxT(
"](" ) +
_(
"Not Found" ) + wxT(
")" );
153 if( layerEnum.
Choices().GetCount() == 0 )
170 layer->SetChoices( layerEnum.
Choices() );
207 auto supportsTeardrops =
212 if( bci->GetBoard()->LegacyTeardrops() )
221 auto supportsTeardropPreferZoneSetting =
226 if( bci->GetBoard()->LegacyTeardrops() )
235 const wxString groupTeardrops =
_HKI(
"Teardrops" );
240 enableTeardrops->SetAvailableFunc( supportsTeardrops );
241 propMgr.
AddProperty( enableTeardrops, groupTeardrops );
246 bestLength->SetAvailableFunc( supportsTeardrops );
253 maxLength->SetAvailableFunc( supportsTeardrops );
259 bestWidth->SetAvailableFunc( supportsTeardrops );
266 maxWidth->SetAvailableFunc( supportsTeardrops );
272 curvePts->SetAvailableFunc( supportsTeardrops );
278 preferZones->SetAvailableFunc( supportsTeardropPreferZoneSetting );
279 propMgr.
AddProperty( preferZones, groupTeardrops );
284 twoTracks->SetAvailableFunc( supportsTeardrops );
290 maxTrackWidth->SetAvailableFunc( supportsTeardrops );
291 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)
int GetTeardropCurvePts() const
double GetTeardropMaxTrackWidth() const
bool GetTeardropsEnabled() const
void SetTeardropAllowSpanTwoTracks(bool aAllow)
double GetTeardropBestWidthRatio() const
wxString GetNetClassName() const
Returns the name of the effective netclass.
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 SetTeardropCurvePts(int aPointCount)
void SetTeardropMaxWidth(int aMaxWidth)
wxString GetShortNetname() const
int GetTeardropMaxWidth() const
void SetTeardropPreferZoneConnections(bool aPrefer)
void SetTeardropBestLengthRatio(double aRatio)
void SetTeardropMaxLength(int aMaxLength)
bool GetTeardropAllowSpanTwoTracks() const
wxString GetUnescapedShortNetname() 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.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
static LSET AllLayersMask()
static const wxChar * 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
const wxString & GetShortNetname() const
const wxString & GetNetname() const
const wxString & GetUnescapedShortNetname() 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)
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