KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BOARD_DESIGN_SETTINGS Class Reference

Container for design settings for a BOARD object. More...

#include <board_design_settings.h>

Inheritance diagram for BOARD_DESIGN_SETTINGS:
NESTED_SETTINGS JSON_SETTINGS

Public Member Functions

 BOARD_DESIGN_SETTINGS (JSON_SETTINGS *aParent, const std::string &aPath)
 
virtual ~BOARD_DESIGN_SETTINGS ()
 
bool operator== (const BOARD_DESIGN_SETTINGS &aOther) const
 
bool operator!= (const BOARD_DESIGN_SETTINGS &aOther) const
 
 BOARD_DESIGN_SETTINGS (const BOARD_DESIGN_SETTINGS &aOther)
 
BOARD_DESIGN_SETTINGSoperator= (const BOARD_DESIGN_SETTINGS &aOther)
 
bool LoadFromFile (const wxString &aDirectory="") override
 Loads the backing file from disk and then calls Load()
 
BOARD_STACKUPGetStackupDescriptor ()
 
const BOARD_STACKUPGetStackupDescriptor () const
 
TEARDROP_PARAMETERS_LISTGetTeadropParamsList ()
 
SEVERITY GetSeverity (int aDRCErrorCode)
 
bool Ignore (int aDRCErrorCode)
 Return true if the DRC error code's severity is SEVERITY_IGNORE.
 
ZONE_SETTINGSGetDefaultZoneSettings ()
 
void SetDefaultZoneSettings (const ZONE_SETTINGS &aSettings)
 
const wxString & GetCurrentNetClassName () const
 
bool UseNetClassTrack () const
 Return true if netclass values should be used to obtain appropriate track width.
 
bool UseNetClassVia () const
 Return true if netclass values should be used to obtain appropriate via size.
 
bool UseNetClassDiffPair () const
 Return true if netclass values should be used to obtain appropriate diff pair dimensions.
 
int GetBiggestClearanceValue () const
 
int GetSmallestClearanceValue () const
 
unsigned GetTrackWidthIndex () const
 
void SetTrackWidthIndex (unsigned aIndex)
 Set the current track width list index to aIndex.
 
int GetCurrentTrackWidth () const
 
void SetCustomTrackWidth (int aWidth)
 Sets custom width for track (i.e.
 
int GetCustomTrackWidth () const
 
unsigned GetViaSizeIndex () const
 
void SetViaSizeIndex (unsigned aIndex)
 Set the current via size list index to aIndex.
 
int GetCurrentViaSize () const
 
void SetCustomViaSize (int aSize)
 Set custom size for via diameter (i.e.
 
int GetCustomViaSize () const
 
int GetCurrentViaDrill () const
 
void SetCustomViaDrill (int aDrill)
 Sets custom size for via drill (i.e.
 
int GetCustomViaDrill () const
 
void UseCustomTrackViaSize (bool aEnabled)
 Enables/disables custom track/via size settings.
 
bool UseCustomTrackViaSize () const
 
unsigned GetDiffPairIndex () const
 
void SetDiffPairIndex (unsigned aIndex)
 
void SetCustomDiffPairWidth (int aWidth)
 Sets custom track width for differential pairs (i.e.
 
int GetCustomDiffPairWidth ()
 
void SetCustomDiffPairGap (int aGap)
 Sets custom gap for differential pairs (i.e.
 
int GetCustomDiffPairGap ()
 Function GetCustomDiffPairGap.
 
void SetCustomDiffPairViaGap (int aGap)
 Sets custom via gap for differential pairs (i.e.
 
int GetCustomDiffPairViaGap ()
 
void UseCustomDiffPairDimensions (bool aEnabled)
 Enables/disables custom differential pair dimensions.
 
bool UseCustomDiffPairDimensions () const
 
int GetCurrentDiffPairWidth () const
 
int GetCurrentDiffPairGap () const
 
int GetCurrentDiffPairViaGap () const
 
LSET GetEnabledLayers () const
 Return a bit-mask of all the layers that are enabled.
 
void SetEnabledLayers (LSET aMask)
 Change the bit-mask of enabled layers to aMask.
 
bool IsLayerEnabled (PCB_LAYER_ID aLayerId) const
 Test whether a given layer aLayerId is enabled.
 
int GetCopperLayerCount () const
 
void SetCopperLayerCount (int aNewLayerCount)
 Set the copper layer count to aNewLayerCount.
 
int GetBoardThickness () const
 The full thickness of the board including copper and masks.
 
void SetBoardThickness (int aThickness)
 
int GetDRCEpsilon () const
 
int GetHolePlatingThickness () const
 Pad & via drills are finish size.
 
int GetLineThickness (PCB_LAYER_ID aLayer) const
 Return the default graphic segment thickness from the layer class for the given layer.
 
VECTOR2I GetTextSize (PCB_LAYER_ID aLayer) const
 Return the default text size from the layer class for the given layer.
 
int GetTextThickness (PCB_LAYER_ID aLayer) const
 Return the default text thickness from the layer class for the given layer.
 
bool GetTextItalic (PCB_LAYER_ID aLayer) const
 
bool GetTextUpright (PCB_LAYER_ID aLayer) const
 
int GetLayerClass (PCB_LAYER_ID aLayer) const
 
void SetAuxOrigin (const VECTOR2I &aOrigin)
 
const VECTOR2IGetAuxOrigin ()
 
void SetGridOrigin (const VECTOR2I &aOrigin)
 
const VECTOR2IGetGridOrigin ()
 
void SetDefaultMasterPad ()
 
bool SaveToFile (const wxString &aDirectory="", bool aForce=false) override
 Calls Store() and then saves the JSON document contents into the parent JSON_SETTINGS.
 
void SetParent (JSON_SETTINGS *aParent, bool aLoadFromFile=true)
 
JSON_SETTINGSGetParent ()
 
wxString GetFilename () const
 
wxString GetFullFilename () const
 
void SetFilename (const wxString &aFilename)
 
void SetLocation (SETTINGS_LOC aLocation)
 
SETTINGS_LOC GetLocation () const
 
void SetLegacyFilename (const wxString &aFilename)
 
bool IsReadOnly () const
 
void SetReadOnly (bool aReadOnly)
 
nlohmann::json & At (const std::string &aPath)
 Wrappers for the underlying JSON API so that most consumers don't need json.hpp All of these functions take a string that is passed to PointerFromString internally.
 
bool Contains (const std::string &aPath) const
 
JSON_SETTINGS_INTERNALSInternals ()
 
virtual void Load ()
 Updates the parameters of this object based on the current JSON document contents.
 
virtual bool Store ()
 Stores the current parameters into the JSON document represented by this object Note: this doesn't do any writing to disk; that's handled by SETTINGS_MANAGER.
 
void ResetToDefaults ()
 Resets all parameters to default values.
 
std::optional< nlohmann::json > GetJson (const std::string &aPath) const
 Fetches a JSON object that is a subset of this JSON_SETTINGS object, using a path of the form "key1.key2.key3" to refer to nested objects.
 
template<typename ValueType >
std::optional< ValueType > Get (const std::string &aPath) const
 Fetches a value from within the JSON document.
 
template<>
std::optional< wxString > Get (const std::string &aPath) const
 
template<typename ValueType >
void Set (const std::string &aPath, ValueType aVal)
 Stores a value into the JSON document Will throw an exception if ValueType isn't something that the library can handle.
 
template<>
void Set (const std::string &aPath, wxString aVal)
 
template<>
KICOMMON_API void Set (const std::string &aPath, wxString aVal)
 
bool Migrate ()
 Migrates the schema of this settings from the version in the file to the latest version.
 
virtual bool MigrateFromLegacy (wxConfigBase *aLegacyConfig)
 Migrates from wxConfig to JSON-based configuration.
 
void AddNestedSettings (NESTED_SETTINGS *aSettings)
 Transfers ownership of a given NESTED_SETTINGS to this object.
 
void ReleaseNestedSettings (NESTED_SETTINGS *aSettings)
 Saves and frees a nested settings object, if it exists within this one.
 
void SetManager (SETTINGS_MANAGER *aManager)
 
const std::string FormatAsString ()
 
bool LoadFromRawFile (const wxString &aPath)
 

Static Public Member Functions

static bool SetIfPresent (const nlohmann::json &aObj, const std::string &aPath, wxString &aTarget)
 Sets the given string if the given key/path is present.
 
static bool SetIfPresent (const nlohmann::json &aObj, const std::string &aPath, bool &aTarget)
 Sets the given bool if the given key/path is present.
 
static bool SetIfPresent (const nlohmann::json &aObj, const std::string &aPath, int &aTarget)
 Sets the given int if the given key/path is present.
 
static bool SetIfPresent (const nlohmann::json &aObj, const std::string &aPath, unsigned int &aTarget)
 Sets the given unsigned int if the given key/path is present.
 

Public Attributes

std::vector< int > m_TrackWidthList
 
std::vector< VIA_DIMENSIONm_ViasDimensionsList
 
std::vector< DIFF_PAIR_DIMENSIONm_DiffPairDimensionsList
 
TEARDROP_PARAMETERS_LIST m_TeardropParamsList
 The parameters of teardrops for the different teardrop targets (via/pad, track end) 3 set of parameters always exist: for round shapes, for rect shapes, for track ends.
 
PNS::MEANDER_SETTINGS m_SingleTrackMeanderSettings
 
PNS::MEANDER_SETTINGS m_DiffPairMeanderSettings
 
PNS::MEANDER_SETTINGS m_SkewMeanderSettings
 
VIATYPE m_CurrentViaType
 (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)
 
bool m_UseConnectedTrackWidth
 
bool m_TempOverrideTrackWidth
 
int m_MinClearance
 
int m_MinGrooveWidth
 
int m_MinConn
 
int m_TrackMinWidth
 
int m_ViasMinAnnularWidth
 
int m_ViasMinSize
 
int m_MinThroughDrill
 
int m_MicroViasMinSize
 
int m_MicroViasMinDrill
 
int m_CopperEdgeClearance
 
int m_HoleClearance
 
int m_HoleToHoleMin
 
int m_SilkClearance
 
int m_MinResolvedSpokes
 
int m_MinSilkTextHeight
 
int m_MinSilkTextThickness
 
std::shared_ptr< DRC_ENGINEm_DRCEngine
 
std::map< int, SEVERITYm_DRCSeverities
 
std::set< wxString > m_DrcExclusions
 
std::map< wxString, wxString > m_DrcExclusionComments
 
bool m_ZoneKeepExternalFillets
 
int m_MaxError
 
int m_SolderMaskExpansion
 
int m_SolderMaskMinWidth
 
int m_SolderMaskToCopperClearance
 
int m_SolderPasteMargin
 
double m_SolderPasteMarginRatio
 
bool m_AllowSoldermaskBridgesInFPs
 
bool m_TentViasFront
 
bool m_TentViasBack
 
std::shared_ptr< NET_SETTINGSm_NetSettings
 
std::vector< TEXT_ITEM_INFOm_DefaultFPTextItems
 
int m_LineThickness [LAYER_CLASS_COUNT]
 
VECTOR2I m_TextSize [LAYER_CLASS_COUNT]
 
int m_TextThickness [LAYER_CLASS_COUNT]
 
bool m_TextItalic [LAYER_CLASS_COUNT]
 
bool m_TextUpright [LAYER_CLASS_COUNT]
 
DIM_UNITS_MODE m_DimensionUnitsMode
 
DIM_PRECISION m_DimensionPrecision
 Number of digits after the decimal.
 
DIM_UNITS_FORMAT m_DimensionUnitsFormat
 
bool m_DimensionSuppressZeroes
 
DIM_TEXT_POSITION m_DimensionTextPosition
 
bool m_DimensionKeepTextAligned
 
int m_DimensionArrowLength
 
int m_DimensionExtensionOffset
 
bool m_StyleFPFields
 
bool m_StyleFPText
 
bool m_StyleFPShapes
 
std::unique_ptr< PADm_Pad_Master
 
bool m_HasStackup
 
bool m_UseHeightForLengthCalcs
 Enable inclusion of stackup height in track length measurements and length tuning.
 

Protected Member Functions

void registerMigration (int aOldSchemaVersion, int aNewSchemaVersion, std::function< bool(void)> aMigrator)
 Registers a migration from one schema version to another.
 
template<typename ValueType >
bool fromLegacy (wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
 Translates a legacy wxConfig value to a given JSON pointer value.
 
bool fromLegacyString (wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
 Translates a legacy wxConfig string value to a given JSON pointer value.
 
bool fromLegacyColor (wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
 Translates a legacy COLOR4D stored in a wxConfig string to a given JSON pointer value.
 
virtual wxString getFileExt () const
 
virtual wxString getLegacyFileExt () const
 

Static Protected Member Functions

template<typename ResultType >
static ResultType fetchOrDefault (const nlohmann::json &aJson, const std::string &aKey, ResultType aDefault=ResultType())
 Helper to retrieve a value from a JSON object (dictionary) as a certain result type.
 

Protected Attributes

JSON_SETTINGSm_parent
 A pointer to the parent object to load and store from.
 
std::string m_path
 The path (in pointer format) of where to store this document in the parent.
 
wxString m_filename
 The filename (not including path) of this settings file (inicode)
 
wxString m_legacy_filename
 The filename of the wxConfig legacy file (if different from m_filename)
 
SETTINGS_LOC m_location
 The location of this settings file (.
 
std::vector< PARAM_BASE * > m_params
 The list of parameters (owned by this object)
 
std::vector< NESTED_SETTINGS * > m_nested_settings
 Nested settings files that live inside this one, if any.
 
bool m_createIfMissing
 Whether or not the backing store file should be created it if doesn't exist.
 
bool m_createIfDefault
 Whether or not the backing store file should be created if all parameters are still at their default values.
 
bool m_writeFile
 Whether or not the backing store file should be written.
 
bool m_modified
 True if the JSON data store has been written to since the last file write.
 
bool m_deleteLegacyAfterMigration
 Whether or not to delete legacy file after migration.
 
bool m_resetParamsIfMissing
 Whether or not to set parameters to their default value if missing from JSON on Load()
 
int m_schemaVersion
 Version of this settings schema.
 
SETTINGS_MANAGERm_manager
 A pointer to the settings manager managing this file (may be null)
 
std::map< int, std::pair< int, std::function< bool()> > > m_migrators
 A map of starting schema version to a pair of <ending version, migrator function>
 
std::unique_ptr< JSON_SETTINGS_INTERNALSm_internals
 

Private Member Functions

void initFromOther (const BOARD_DESIGN_SETTINGS &aOther)
 
bool migrateSchema0to1 ()
 

Private Attributes

VECTOR2I m_auxOrigin
 origin for plot exports
 
VECTOR2I m_gridOrigin
 origin for grid offsets
 
unsigned m_trackWidthIndex
 
unsigned m_viaSizeIndex
 
unsigned m_diffPairIndex
 
bool m_useCustomTrackVia
 
int m_customTrackWidth
 
VIA_DIMENSION m_customViaSize
 
bool m_useCustomDiffPair
 
DIFF_PAIR_DIMENSION m_customDiffPair
 
int m_copperLayerCount
 Number of copper layers for this design.
 
LSET m_enabledLayers
 Bit-mask for layer enabling.
 
int m_boardThickness
 Board thickness for 3D viewer.
 
wxString m_currentNetClassName
 Current net class name used to display netclass info.
 
BOARD_STACKUP m_stackup
 the description of layers stackup, for board fabrication only physical layers are in layers stackup.
 
ZONE_SETTINGS m_defaultZoneSettings
 The default settings that will be used for new zones.
 

Detailed Description

Container for design settings for a BOARD object.

Definition at line 247 of file board_design_settings.h.

Constructor & Destructor Documentation

◆ BOARD_DESIGN_SETTINGS() [1/2]

BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS ( JSON_SETTINGS aParent,
const std::string &  aPath 
)

Definition at line 41 of file board_design_settings.cpp.

References PADSTACK::ALL_LAYERS, ARC_HIGH_DEF, DEFAULT_BOARD_THICKNESS_MM, DEFAULT_COPPER_LINE_WIDTH, DEFAULT_COPPER_TEXT_SIZE, DEFAULT_COPPER_TEXT_WIDTH, DEFAULT_COPPEREDGECLEARANCE, DEFAULT_COURTYARD_WIDTH, DEFAULT_CUSTOMDPAIRGAP, DEFAULT_CUSTOMDPAIRVIAGAP, DEFAULT_CUSTOMDPAIRWIDTH, DEFAULT_CUSTOMTRACKWIDTH, DEFAULT_DIMENSION_ARROW_LENGTH, DEFAULT_DIMENSION_EXTENSION_OFFSET, DEFAULT_DP_MEANDER_SPACING, DEFAULT_EDGE_WIDTH, DEFAULT_HOLECLEARANCE, DEFAULT_HOLETOHOLEMIN, DEFAULT_LINE_WIDTH, DEFAULT_MEANDER_SPACING, DEFAULT_MICROVIASMINDRILL, DEFAULT_MICROVIASMINSIZE, DEFAULT_MINCLEARANCE, DEFAULT_MINCONNECTION, DEFAULT_MINGROOVEWIDTH, DEFAULT_MINRESOLVEDSPOKES, DEFAULT_MINTHROUGHDRILL, DEFAULT_SILK_LINE_WIDTH, DEFAULT_SILK_TEXT_SIZE, DEFAULT_SILK_TEXT_WIDTH, DEFAULT_SILKCLEARANCE, DEFAULT_SOLDERMASK_EXPANSION, DEFAULT_SOLDERMASK_MIN_WIDTH, DEFAULT_SOLDERMASK_TO_COPPER_CLEARANCE, DEFAULT_SOLDERPASTE_CLEARANCE, DEFAULT_SOLDERPASTE_RATIO, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_WIDTH, DEFAULT_TRACKMINWIDTH, DEFAULT_VIASMINSIZE, DRCE_CONNECTION_WIDTH, DRCE_COPPER_SLIVER, DRCE_DANGLING_TRACK, DRCE_DANGLING_VIA, DRCE_DRILLED_HOLES_COLOCATED, DRCE_DRILLED_HOLES_TOO_CLOSE, DRCE_DUPLICATE_FOOTPRINT, DRCE_EXTRA_FOOTPRINT, DRCE_FIRST, DRCE_FOOTPRINT_FILTERS, DRCE_FOOTPRINT_TYPE_MISMATCH, DRCE_ISOLATED_COPPER, DRCE_LAST, DRCE_LIB_FOOTPRINT_ISSUES, DRCE_LIB_FOOTPRINT_MISMATCH, DRCE_MISSING_COURTYARD, DRCE_MISSING_FOOTPRINT, DRCE_NET_CONFLICT, DRCE_NPTH_IN_COURTYARD, DRCE_OVERLAPPING_SILK, DRCE_PADSTACK, DRCE_PTH_IN_COURTYARD, DRCE_SCHEMATIC_PARITY, DRCE_SILK_CLEARANCE, DRCE_SILK_EDGE_CLEARANCE, DRCE_TEXT_HEIGHT, DRCE_TEXT_THICKNESS, F_Fab, F_SilkS, DRC_ITEM::GetItemsWithSeverities(), TEARDROP_PARAMETERS_LIST::GetParameters(), TEARDROP_PARAMETERS_LIST::GetParametersCount(), GetTeardropTargetCanonicalName(), GetTeardropTargetTypeFromCanonicalName(), EDA_IU_SCALE::IU_PER_MM, EDA_IU_SCALE::IUTomm(), LAYER_CLASS_COPPER, LAYER_CLASS_COURTYARD, LAYER_CLASS_EDGES, LAYER_CLASS_FAB, LAYER_CLASS_OTHERS, LAYER_CLASS_SILK, m_AllowSoldermaskBridgesInFPs, TEARDROP_PARAMETERS::m_AllowUseTwoTracks, TEARDROP_PARAMETERS::m_BestLengthRatio, TEARDROP_PARAMETERS::m_BestWidthRatio, m_boardThickness, m_CopperEdgeClearance, PNS::MEANDER_SETTINGS::m_cornerRadiusPercentage, PNS::MEANDER_SETTINGS::m_cornerStyle, m_CurrentViaType, TEARDROP_PARAMETERS::m_CurveSegCount, m_customDiffPair, m_customTrackWidth, m_customViaSize, m_DefaultFPTextItems, m_defaultZoneSettings, VIA_DIMENSION::m_Diameter, m_DiffPairDimensionsList, m_diffPairIndex, m_DiffPairMeanderSettings, m_DimensionArrowLength, m_DimensionExtensionOffset, m_DimensionKeepTextAligned, m_DimensionPrecision, m_DimensionSuppressZeroes, m_DimensionTextPosition, m_DimensionUnitsFormat, m_DimensionUnitsMode, m_DrcExclusionComments, m_DrcExclusions, m_DRCSeverities, VIA_DIMENSION::m_Drill, m_enabledLayers, DIFF_PAIR_DIMENSION::m_Gap, m_HasStackup, m_HoleClearance, m_HoleToHoleMin, m_LineThickness, PNS::MEANDER_SETTINGS::m_maxAmplitude, m_MaxError, m_MicroViasMinDrill, m_MicroViasMinSize, PNS::MEANDER_SETTINGS::m_minAmplitude, m_MinClearance, m_MinConn, m_MinGrooveWidth, m_MinResolvedSpokes, m_MinSilkTextHeight, m_MinSilkTextThickness, m_MinThroughDrill, m_NetSettings, m_Pad_Master, JSON_SETTINGS::m_params, JSON_SETTINGS::m_resetParamsIfMissing, m_SilkClearance, PNS::MEANDER_SETTINGS::m_singleSided, m_SingleTrackMeanderSettings, m_SkewMeanderSettings, m_SolderMaskExpansion, m_SolderMaskMinWidth, m_SolderMaskToCopperClearance, m_SolderPasteMargin, m_SolderPasteMarginRatio, PNS::MEANDER_SETTINGS::m_spacing, m_StyleFPFields, m_StyleFPShapes, m_StyleFPText, TEARDROP_PARAMETERS_LIST::m_TargetPTHPads, TEARDROP_PARAMETERS_LIST::m_TargetSMDPads, TEARDROP_PARAMETERS_LIST::m_TargetTrack2Track, TEARDROP_PARAMETERS_LIST::m_TargetVias, TEARDROP_PARAMETERS::m_TdMaxLen, TEARDROP_PARAMETERS::m_TdMaxWidth, TEARDROP_PARAMETERS::m_TdOnPadsInZones, m_TeardropParamsList, m_TempOverrideTrackWidth, m_TentViasBack, m_TentViasFront, m_TextItalic, m_TextSize, m_TextThickness, m_TextUpright, m_TrackMinWidth, m_trackWidthIndex, m_TrackWidthList, m_UseConnectedTrackWidth, m_useCustomDiffPair, m_useCustomTrackVia, m_UseHeightForLengthCalcs, TEARDROP_PARAMETERS_LIST::m_UseRoundShapesOnly, DIFF_PAIR_DIMENSION::m_ViaGap, m_ViasDimensionsList, m_viaSizeIndex, m_ViasMinAnnularWidth, m_ViasMinSize, DIFF_PAIR_DIMENSION::m_Width, TEARDROP_PARAMETERS::m_WidthtoSizeFilterRatio, ZONE_SETTINGS::m_ZoneClearance, m_ZoneKeepExternalFillets, PNS::MEANDER_STYLE_CHAMFER, PNS::MEANDER_STYLE_ROUND, migrateSchema0to1(), EDA_IU_SCALE::MilsToIU(), EDA_IU_SCALE::MM_PER_IU, EDA_IU_SCALE::mmToIU(), name, pcbIUScale, JSON_SETTINGS::registerMigration(), RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, BASE_SET::set(), SetCopperLayerCount(), SetDefaultMasterPad(), SeverityToString(), TEXT_MAX_SIZE_MM, TEXT_MIN_SIZE_MM, via, VECTOR2< T >::x, VECTOR2< T >::y, and ZONE_CLEARANCE_MM.

◆ ~BOARD_DESIGN_SETTINGS()

BOARD_DESIGN_SETTINGS::~BOARD_DESIGN_SETTINGS ( )
virtual

◆ BOARD_DESIGN_SETTINGS() [2/2]

BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS ( const BOARD_DESIGN_SETTINGS aOther)

Definition at line 916 of file board_design_settings.cpp.

References initFromOther().

Member Function Documentation

◆ AddNestedSettings()

void JSON_SETTINGS::AddNestedSettings ( NESTED_SETTINGS aSettings)
inherited

Transfers ownership of a given NESTED_SETTINGS to this object.

Can be used to construct a NESTED_SETTINGS without the parent object needing to know about the implementation of the nested object;

Parameters
aSettingsis the settings object to take ownership of
aTargetis a pointer to update to the passed in settings

Definition at line 870 of file json_settings.cpp.

References JSON_SETTINGS::GetFilename(), JSON_SETTINGS::m_nested_settings, and traceSettings.

Referenced by NESTED_SETTINGS::SetParent().

◆ At()

nlohmann::json & JSON_SETTINGS::At ( const std::string &  aPath)
inherited

Wrappers for the underlying JSON API so that most consumers don't need json.hpp All of these functions take a string that is passed to PointerFromString internally.

Definition at line 118 of file json_settings.cpp.

References JSON_SETTINGS::m_internals.

Referenced by EESCHEMA_SETTINGS::migrateBomSettings(), GERBVIEW_SETTINGS::MigrateFromLegacy(), APP_SETTINGS_BASE::migrateLibTreeWidth(), migrateSchema0to1(), FOOTPRINT_EDITOR_SETTINGS::migrateSchema0to1(), COLOR_SETTINGS::migrateSchema0to1(), and PCBNEW_SETTINGS::PCBNEW_SETTINGS().

◆ Contains()

◆ fetchOrDefault()

template<typename ResultType >
template KICOMMON_API bool JSON_SETTINGS::fetchOrDefault ( const nlohmann::json &  aJson,
const std::string &  aKey,
ResultType  aDefault = ResultType() 
)
staticprotectedinherited

Helper to retrieve a value from a JSON object (dictionary) as a certain result type.

Template Parameters
ResultTypeis the type of the retrieved value.
Parameters
aJsonis the object to act on .
aKeyis the object key to retrieve the value for.
Returns
the result, or aDefault if aKey is not found.

Definition at line 916 of file json_settings.cpp.

◆ FormatAsString()

const std::string JSON_SETTINGS::FormatAsString ( )
inherited

◆ fromLegacy()

template<typename ValueType >
template KICOMMON_API bool JSON_SETTINGS::fromLegacy< bool > ( wxConfigBase *  aConfig,
const std::string &  aKey,
const std::string &  aDest 
)
protectedinherited

Translates a legacy wxConfig value to a given JSON pointer value.

Template Parameters
ValueTypeis the basic type of the value
Parameters
aConfigis the legacy config to read from
aKeyis the key (within the current path) to read
aDestis a string that will form a JSON pointer (key1.key2.key3) to write to

Definition at line 782 of file json_settings.cpp.

◆ fromLegacyColor()

bool JSON_SETTINGS::fromLegacyColor ( wxConfigBase *  aConfig,
const std::string &  aKey,
const std::string &  aDest 
)
protectedinherited

Translates a legacy COLOR4D stored in a wxConfig string to a given JSON pointer value.

Parameters
aConfigis the legacy config to read from
aKeyis the key (within the current path) to read
aDestis a string that will form a JSON pointer (key1.key2.key3) to write to

Definition at line 842 of file json_settings.cpp.

References color.

Referenced by APP_SETTINGS_BASE::migrateWindowConfig().

◆ fromLegacyString()

bool JSON_SETTINGS::fromLegacyString ( wxConfigBase *  aConfig,
const std::string &  aKey,
const std::string &  aDest 
)
protectedinherited

Translates a legacy wxConfig string value to a given JSON pointer value.

Parameters
aConfigis the legacy config to read from
aKeyis the key (within the current path) to read
aDestis a string that will form a JSON pointer (key1.key2.key3) to write to

Definition at line 818 of file json_settings.cpp.

Referenced by PROJECT_FILE::MigrateFromLegacy(), APP_SETTINGS_BASE::MigrateFromLegacy(), BITMAP2CMP_SETTINGS::MigrateFromLegacy(), EESCHEMA_SETTINGS::MigrateFromLegacy(), SYMBOL_EDITOR_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy(), COMMON_SETTINGS::MigrateFromLegacy(), PCB_CALCULATOR_SETTINGS::MigrateFromLegacy(), PCBNEW_SETTINGS::MigrateFromLegacy(), and APP_SETTINGS_BASE::migrateWindowConfig().

◆ Get() [1/2]

template<>
template std::optional< wxAuiPaneInfo > JSON_SETTINGS::Get< wxAuiPaneInfo > ( const std::string &  aPath) const
inherited

Definition at line 900 of file json_settings.cpp.

References JSON_SETTINGS::GetJson().

◆ Get() [2/2]

template<typename ValueType >
template KICOMMON_API std::optional< wxAuiPaneInfo > JSON_SETTINGS::Get< wxAuiPaneInfo > ( const std::string &  aPath) const
inherited

Fetches a value from within the JSON document.

Will return an empty optional if the value is not found or a mismatching type.

Template Parameters
ValueTypeis the type to cast to
Parameters
aPathis the path within the document to retrieve
Returns
a value from within this document

Definition at line 580 of file json_settings.cpp.

References JSON_SETTINGS::GetJson().

Referenced by COLOR_MAP_PARAM::Load(), PARAM< ValueType >::Load(), PARAM_ENUM< EnumType >::Load(), PARAM_LAMBDA< ValueType >::Load(), PARAM_SCALED< ValueType >::Load(), COLOR_MAP_PARAM::MatchesFile(), PARAM< ValueType >::MatchesFile(), PARAM_PATH::MatchesFile(), PARAM_ENUM< EnumType >::MatchesFile(), PARAM_LAMBDA< ValueType >::MatchesFile(), and PARAM_SCALED< ValueType >::MatchesFile().

◆ GetAuxOrigin()

◆ GetBiggestClearanceValue()

int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue ( ) const

◆ GetBoardThickness()

◆ GetCopperLayerCount()

◆ GetCurrentDiffPairGap()

int BOARD_DESIGN_SETTINGS::GetCurrentDiffPairGap ( ) const
Returns
the current diff pair gap, according to the selected options ( using the default netclass value or a preset/custom value )

Definition at line 1381 of file board_design_settings.cpp.

References m_customDiffPair, m_DiffPairDimensionsList, m_diffPairIndex, DIFF_PAIR_DIMENSION::m_Gap, m_NetSettings, and m_useCustomDiffPair.

Referenced by GetCurrentDiffPairViaGap(), and PNS_KICAD_IFACE_BASE::ImportSizes().

◆ GetCurrentDiffPairViaGap()

int BOARD_DESIGN_SETTINGS::GetCurrentDiffPairViaGap ( ) const
Returns
the current diff pair via gap, according to the selected options ( using the default netclass value or a preset/custom value ) the default netclass is always in m_DiffPairDimensionsList[0].

Definition at line 1401 of file board_design_settings.cpp.

References GetCurrentDiffPairGap(), m_customDiffPair, m_DiffPairDimensionsList, m_diffPairIndex, m_NetSettings, m_useCustomDiffPair, and DIFF_PAIR_DIMENSION::m_ViaGap.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ GetCurrentDiffPairWidth()

int BOARD_DESIGN_SETTINGS::GetCurrentDiffPairWidth ( ) const
Returns
the current diff pair track width, according to the selected options ( using the default netclass value or a preset/custom value )

Definition at line 1361 of file board_design_settings.cpp.

References m_customDiffPair, m_DiffPairDimensionsList, m_diffPairIndex, m_NetSettings, m_useCustomDiffPair, and DIFF_PAIR_DIMENSION::m_Width.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ GetCurrentNetClassName()

const wxString & BOARD_DESIGN_SETTINGS::GetCurrentNetClassName ( ) const
inline

◆ GetCurrentTrackWidth()

int BOARD_DESIGN_SETTINGS::GetCurrentTrackWidth ( ) const
Returns
the current track width according to the selected options ( using the default netclass value or a preset/custom value ) the default netclass is always in m_TrackWidthList[0]

Definition at line 1338 of file board_design_settings.cpp.

References m_customTrackWidth, m_NetSettings, m_trackWidthIndex, m_TrackWidthList, and m_useCustomTrackVia.

Referenced by EDIT_TOOL::ChangeTrackWidth(), MICROWAVE_TOOL::createBaseFootprint(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createInductorBetween(), PNS_KICAD_IFACE_BASE::ImportSizes(), and PCB_EDIT_FRAME::SetTrackSegmentWidth().

◆ GetCurrentViaDrill()

int BOARD_DESIGN_SETTINGS::GetCurrentViaDrill ( ) const
Returns
the current via size, according to the selected options ( using the default netclass value or a preset/custom value ) the default netclass is always in m_TrackWidthList[0].

Definition at line 1316 of file board_design_settings.cpp.

References m_customViaSize, VIA_DIMENSION::m_Drill, m_NetSettings, m_useCustomTrackVia, m_ViasDimensionsList, and m_viaSizeIndex.

Referenced by EDIT_TOOL::ChangeTrackWidth(), DRAWING_TOOL::DrawVia(), ROUTER_TOOL::handleLayerSwitch(), PNS_KICAD_IFACE_BASE::ImportSizes(), and PCB_EDIT_FRAME::SetTrackSegmentWidth().

◆ GetCurrentViaSize()

int BOARD_DESIGN_SETTINGS::GetCurrentViaSize ( ) const
Returns
the current via size, according to the selected options ( using the default netclass value or a preset/custom value ) the default netclass is always in m_TrackWidthList[0]

Definition at line 1305 of file board_design_settings.cpp.

References m_customViaSize, VIA_DIMENSION::m_Diameter, m_NetSettings, m_useCustomTrackVia, m_ViasDimensionsList, and m_viaSizeIndex.

Referenced by EDIT_TOOL::ChangeTrackWidth(), DRAWING_TOOL::DrawVia(), ROUTER_TOOL::handleLayerSwitch(), PNS_KICAD_IFACE_BASE::ImportSizes(), and PCB_EDIT_FRAME::SetTrackSegmentWidth().

◆ GetCustomDiffPairGap()

int BOARD_DESIGN_SETTINGS::GetCustomDiffPairGap ( )
inline

Function GetCustomDiffPairGap.

Returns
Current custom gap width for differential pairs.

Definition at line 508 of file board_design_settings.h.

References m_customDiffPair, and DIFF_PAIR_DIMENSION::m_Gap.

◆ GetCustomDiffPairViaGap()

int BOARD_DESIGN_SETTINGS::GetCustomDiffPairViaGap ( )
inline
Returns
Current custom via gap width for differential pairs.

Definition at line 527 of file board_design_settings.h.

References m_customDiffPair, DIFF_PAIR_DIMENSION::m_Gap, and DIFF_PAIR_DIMENSION::m_ViaGap.

◆ GetCustomDiffPairWidth()

int BOARD_DESIGN_SETTINGS::GetCustomDiffPairWidth ( )
inline
Returns
Current custom track width for differential pairs.

Definition at line 489 of file board_design_settings.h.

References m_customDiffPair, and DIFF_PAIR_DIMENSION::m_Width.

◆ GetCustomTrackWidth()

int BOARD_DESIGN_SETTINGS::GetCustomTrackWidth ( ) const
inline
Returns
Current custom width for a track.

Definition at line 368 of file board_design_settings.h.

References m_customTrackWidth.

Referenced by DIALOG_TRACK_VIA_SIZE::TransferDataToWindow().

◆ GetCustomViaDrill()

int BOARD_DESIGN_SETTINGS::GetCustomViaDrill ( ) const
inline
Returns
Current custom size for the via drill.

Definition at line 439 of file board_design_settings.h.

References m_customViaSize, and VIA_DIMENSION::m_Drill.

Referenced by DIALOG_TRACK_VIA_SIZE::TransferDataToWindow().

◆ GetCustomViaSize()

int BOARD_DESIGN_SETTINGS::GetCustomViaSize ( ) const
inline
Returns
Current custom size for the via diameter.

Definition at line 411 of file board_design_settings.h.

References m_customViaSize, and VIA_DIMENSION::m_Diameter.

Referenced by DIALOG_TRACK_VIA_SIZE::TransferDataToWindow().

◆ GetDefaultZoneSettings()

◆ GetDiffPairIndex()

unsigned BOARD_DESIGN_SETTINGS::GetDiffPairIndex ( ) const
inline
Returns
the current diff pair dimension list index.

Definition at line 468 of file board_design_settings.h.

References m_diffPairIndex.

Referenced by BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), and DIFF_PAIR_MENU::update().

◆ GetDRCEpsilon()

◆ GetEnabledLayers()

LSET BOARD_DESIGN_SETTINGS::GetEnabledLayers ( ) const
inline

◆ getFileExt()

virtual wxString JSON_SETTINGS::getFileExt ( ) const
inlineprotectedvirtualinherited

◆ GetFilename()

◆ GetFullFilename()

◆ GetGridOrigin()

◆ GetHolePlatingThickness()

int BOARD_DESIGN_SETTINGS::GetHolePlatingThickness ( ) const

Pad & via drills are finish size.

Adding the hole plating thickness gives you the actual hole size.

Definition at line 1473 of file board_design_settings.cpp.

References ADVANCED_CFG::GetCfg(), EDA_IU_SCALE::mmToIU(), and pcbIUScale.

Referenced by KIGFX::PCB_PAINTER::Draw(), and BOARD_ADAPTER::GetHolePlatingThickness().

◆ GetJson()

std::optional< nlohmann::json > JSON_SETTINGS::GetJson ( const std::string &  aPath) const
inherited

Fetches a JSON object that is a subset of this JSON_SETTINGS object, using a path of the form "key1.key2.key3" to refer to nested objects.

Parameters
aPathis a string containing one or more keys separated by '.'
Returns
a JSON object from within this one

Definition at line 560 of file json_settings.cpp.

References JSON_SETTINGS::m_internals.

Referenced by JSON_SETTINGS::Get(), PARAM_LAMBDA< ValueType >::Load(), PARAM_LIST< Type >::Load(), PARAM_SET< Type >::Load(), PARAM_MAP< Value >::Load(), PARAM_WXSTRING_MAP::Load(), PARAM_LAMBDA< ValueType >::MatchesFile(), PARAM_LIST< Type >::MatchesFile(), PARAM_SET< Type >::MatchesFile(), PARAM_PATH_LIST::MatchesFile(), PARAM_MAP< Value >::MatchesFile(), PARAM_WXSTRING_MAP::MatchesFile(), SETTINGS_MANAGER::SaveColorSettings(), and NESTED_SETTINGS::SaveToFile().

◆ GetLayerClass()

◆ getLegacyFileExt()

virtual wxString JSON_SETTINGS::getLegacyFileExt ( ) const
inlineprotectedvirtualinherited

Reimplemented in PROJECT_FILE, and PROJECT_LOCAL_SETTINGS.

Definition at line 287 of file json_settings.h.

Referenced by JSON_SETTINGS::LoadFromFile().

◆ GetLineThickness()

◆ GetLocation()

SETTINGS_LOC JSON_SETTINGS::GetLocation ( ) const
inlineinherited

◆ GetParent()

JSON_SETTINGS * NESTED_SETTINGS::GetParent ( )
inlineinherited

Definition at line 54 of file nested_settings.h.

Referenced by LoadFromFile().

◆ GetSeverity()

◆ GetSmallestClearanceValue()

int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue ( ) const
Returns
the smallest clearance value found in NetClasses list.

Definition at line 1287 of file board_design_settings.cpp.

References m_NetSettings, and name.

Referenced by DIALOG_PLOT::init_Dialog().

◆ GetStackupDescriptor() [1/2]

BOARD_STACKUP & BOARD_DESIGN_SETTINGS::GetStackupDescriptor ( )
inline

◆ GetStackupDescriptor() [2/2]

const BOARD_STACKUP & BOARD_DESIGN_SETTINGS::GetStackupDescriptor ( ) const
inline

Definition at line 267 of file board_design_settings.h.

References m_stackup.

◆ GetTeadropParamsList()

◆ GetTextItalic()

◆ GetTextSize()

◆ GetTextThickness()

◆ GetTextUpright()

◆ GetTrackWidthIndex()

unsigned BOARD_DESIGN_SETTINGS::GetTrackWidthIndex ( ) const
inline

◆ GetViaSizeIndex()

unsigned BOARD_DESIGN_SETTINGS::GetViaSizeIndex ( ) const
inline

◆ Ignore()

bool BOARD_DESIGN_SETTINGS::Ignore ( int  aDRCErrorCode)

Return true if the DRC error code's severity is SEVERITY_IGNORE.

Definition at line 1251 of file board_design_settings.cpp.

References m_DRCSeverities, and RPT_SEVERITY_IGNORE.

Referenced by DRC_ENGINE::RunTests().

◆ initFromOther()

void BOARD_DESIGN_SETTINGS::initFromOther ( const BOARD_DESIGN_SETTINGS aOther)
private

Definition at line 932 of file board_design_settings.cpp.

References m_AllowSoldermaskBridgesInFPs, m_auxOrigin, m_boardThickness, m_CopperEdgeClearance, m_copperLayerCount, m_currentNetClassName, m_CurrentViaType, m_customDiffPair, m_customTrackWidth, m_customViaSize, m_DefaultFPTextItems, m_defaultZoneSettings, m_DiffPairDimensionsList, m_diffPairIndex, m_DimensionArrowLength, m_DimensionExtensionOffset, m_DimensionKeepTextAligned, m_DimensionPrecision, m_DimensionSuppressZeroes, m_DimensionTextPosition, m_DimensionUnitsFormat, m_DimensionUnitsMode, m_DrcExclusionComments, m_DrcExclusions, m_DRCSeverities, m_enabledLayers, m_gridOrigin, m_HasStackup, m_HoleClearance, m_HoleToHoleMin, m_LineThickness, m_MaxError, m_MicroViasMinDrill, m_MicroViasMinSize, m_MinClearance, m_MinConn, m_MinGrooveWidth, m_MinResolvedSpokes, m_MinSilkTextHeight, m_MinSilkTextThickness, m_MinThroughDrill, m_NetSettings, m_Pad_Master, m_SilkClearance, m_SolderMaskExpansion, m_SolderMaskMinWidth, m_SolderMaskToCopperClearance, m_SolderPasteMargin, m_SolderPasteMarginRatio, m_stackup, m_StyleFPFields, m_StyleFPShapes, m_StyleFPText, m_TempOverrideTrackWidth, m_TentViasBack, m_TentViasFront, m_TextItalic, m_TextSize, m_TextThickness, m_TextUpright, m_TrackMinWidth, m_trackWidthIndex, m_TrackWidthList, m_UseConnectedTrackWidth, m_useCustomDiffPair, m_useCustomTrackVia, m_UseHeightForLengthCalcs, m_ViasDimensionsList, m_viaSizeIndex, m_ViasMinAnnularWidth, m_ViasMinSize, and m_ZoneKeepExternalFillets.

Referenced by BOARD_DESIGN_SETTINGS(), and operator=().

◆ Internals()

JSON_SETTINGS_INTERNALS * JSON_SETTINGS::Internals ( )
inherited

◆ IsLayerEnabled()

bool BOARD_DESIGN_SETTINGS::IsLayerEnabled ( PCB_LAYER_ID  aLayerId) const
inline

Test whether a given layer aLayerId is enabled.

Parameters
aLayerIdThe layer to be tested.
Returns
true if the layer is enabled.

Definition at line 592 of file board_design_settings.h.

References m_enabledLayers, and PCB_LAYER_ID_COUNT.

Referenced by BOARD::IsLayerEnabled(), and BOARD::IsLayerVisible().

◆ IsReadOnly()

◆ Load()

◆ LoadFromFile()

bool BOARD_DESIGN_SETTINGS::LoadFromFile ( const wxString &  aDirectory = "")
overridevirtual

Loads the backing file from disk and then calls Load()

Parameters
aDirectoryis the path to the file
Returns
true if the file was found on disk and loaded or migrated

Reimplemented from JSON_SETTINGS.

Definition at line 1171 of file board_design_settings.cpp.

References JSON_SETTINGS::Contains(), DRC_ITEM::Create(), DRCE_MISSING_COURTYARD, DRCE_OVERLAPPING_FOOTPRINTS, NESTED_SETTINGS::GetParent(), JSON_SETTINGS::Load(), NESTED_SETTINGS::LoadFromFile(), m_ZoneKeepExternalFillets, name, project, and JSON_SETTINGS::Set().

◆ LoadFromRawFile()

bool JSON_SETTINGS::LoadFromRawFile ( const wxString &  aPath)
inherited

◆ Migrate()

bool JSON_SETTINGS::Migrate ( )
inherited

Migrates the schema of this settings from the version in the file to the latest version.

Schema migration doesn't need to be used every time a setting is added! This is intended to be more of an "escape hatch" in the event that we decide to move settings around or make other changes to a settings file format that can't simply be handled by loading a new default

Returns
true if migration was successful

Definition at line 677 of file json_settings.cpp.

References JSON_SETTINGS::m_internals, JSON_SETTINGS::m_migrators, JSON_SETTINGS::m_schemaVersion, and traceSettings.

Referenced by JSON_SETTINGS::LoadFromFile(), and NESTED_SETTINGS::LoadFromFile().

◆ MigrateFromLegacy()

bool JSON_SETTINGS::MigrateFromLegacy ( wxConfigBase *  aLegacyConfig)
virtualinherited

Migrates from wxConfig to JSON-based configuration.

Should be implemented by any subclasses of JSON_SETTINGS that map to a legacy (wxConfig-based) config file.

Parameters
aLegacyConfigis a wxConfigBase holding a loaded configuration to migrate
Returns
true if migration was successful

Reimplemented in PROJECT_FILE, APP_SETTINGS_BASE, COLOR_SETTINGS, EDA_3D_VIEWER_SETTINGS, BITMAP2CMP_SETTINGS, EESCHEMA_SETTINGS, SYMBOL_EDITOR_SETTINGS, GERBVIEW_SETTINGS, FOOTPRINT_EDITOR_SETTINGS, PROJECT_LOCAL_SETTINGS, COMMON_SETTINGS, CVPCB_SETTINGS, KICAD_SETTINGS, PL_EDITOR_SETTINGS, PCB_CALCULATOR_SETTINGS, and PCBNEW_SETTINGS.

Definition at line 713 of file json_settings.cpp.

References traceSettings.

Referenced by JSON_SETTINGS::LoadFromFile().

◆ migrateSchema0to1()

bool BOARD_DESIGN_SETTINGS::migrateSchema0to1 ( )
private

Schema 0 to 1: default dimension precision changed in meaning. Previously it was an enum with the following meaning:

0: 0.01mm / 1 mil / 0.001 in 1: 0.001mm / 0.1 mil / 0.0001 in 2: 0.0001mm / 0.01 mil / 0.00001 in

Now it is independent of display units and is an integer meaning the number of digits displayed after the decimal point, so we have to migrate based on the default units.

The units is an integer with the following mapping:

0: Inches 1: Mils 2: Millimeters

Definition at line 1120 of file board_design_settings.cpp.

References JSON_SETTINGS::At(), JSON_SETTINGS::Contains(), and JSON_SETTINGS::Set().

Referenced by BOARD_DESIGN_SETTINGS().

◆ operator!=()

bool BOARD_DESIGN_SETTINGS::operator!= ( const BOARD_DESIGN_SETTINGS aOther) const
inline

Definition at line 255 of file board_design_settings.h.

References operator==().

◆ operator=()

BOARD_DESIGN_SETTINGS & BOARD_DESIGN_SETTINGS::operator= ( const BOARD_DESIGN_SETTINGS aOther)

Definition at line 925 of file board_design_settings.cpp.

References initFromOther().

◆ operator==()

bool BOARD_DESIGN_SETTINGS::operator== ( const BOARD_DESIGN_SETTINGS aOther) const

Definition at line 1024 of file board_design_settings.cpp.

References m_AllowSoldermaskBridgesInFPs, m_auxOrigin, m_boardThickness, m_CopperEdgeClearance, m_copperLayerCount, m_currentNetClassName, m_CurrentViaType, m_customDiffPair, m_customTrackWidth, m_customViaSize, m_DefaultFPTextItems, m_defaultZoneSettings, m_DiffPairDimensionsList, m_diffPairIndex, m_DimensionArrowLength, m_DimensionExtensionOffset, m_DimensionKeepTextAligned, m_DimensionPrecision, m_DimensionSuppressZeroes, m_DimensionTextPosition, m_DimensionUnitsFormat, m_DimensionUnitsMode, m_DrcExclusionComments, m_DrcExclusions, m_DRCSeverities, m_enabledLayers, m_gridOrigin, m_HasStackup, m_HoleClearance, m_HoleToHoleMin, m_LineThickness, m_MaxError, m_MicroViasMinDrill, m_MicroViasMinSize, m_MinClearance, m_MinConn, m_MinGrooveWidth, m_MinResolvedSpokes, m_MinSilkTextHeight, m_MinSilkTextThickness, m_MinThroughDrill, m_NetSettings, m_Pad_Master, m_SilkClearance, m_SolderMaskExpansion, m_SolderMaskMinWidth, m_SolderMaskToCopperClearance, m_SolderPasteMargin, m_SolderPasteMarginRatio, m_stackup, m_StyleFPFields, m_StyleFPShapes, m_StyleFPText, m_TempOverrideTrackWidth, m_TentViasBack, m_TentViasFront, m_TextItalic, m_TextSize, m_TextThickness, m_TextUpright, m_TrackMinWidth, m_trackWidthIndex, m_TrackWidthList, m_UseConnectedTrackWidth, m_useCustomDiffPair, m_useCustomTrackVia, m_UseHeightForLengthCalcs, m_ViasDimensionsList, m_viaSizeIndex, m_ViasMinAnnularWidth, m_ViasMinSize, and m_ZoneKeepExternalFillets.

Referenced by operator!=().

◆ registerMigration()

void JSON_SETTINGS::registerMigration ( int  aOldSchemaVersion,
int  aNewSchemaVersion,
std::function< bool(void)>  aMigrator 
)
protectedinherited

Registers a migration from one schema version to another.

If the schema version in the file loaded from disk is less than the schema version of the JSON_SETTINGS class, migration functions will be called one after the other until the data is up-to-date.

Parameters
aOldSchemaVersionis the starting schema version for this migration
aNewSchemaVersionis the ending schema version for this migration
aMigratoris a function that performs the migration and returns true if successful

Definition at line 668 of file json_settings.cpp.

References JSON_SETTINGS::m_migrators, and JSON_SETTINGS::m_schemaVersion.

Referenced by BOARD_DESIGN_SETTINGS(), COLOR_SETTINGS::COLOR_SETTINGS(), EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS(), EESCHEMA_SETTINGS::EESCHEMA_SETTINGS(), FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS(), PCBNEW_SETTINGS::PCBNEW_SETTINGS(), PROJECT_FILE::PROJECT_FILE(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), and SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS().

◆ ReleaseNestedSettings()

void JSON_SETTINGS::ReleaseNestedSettings ( NESTED_SETTINGS aSettings)
inherited

Saves and frees a nested settings object, if it exists within this one.

Parameters
aSettingsis a pointer to a NESTED_SETTINGS that has already been added to this one

Definition at line 877 of file json_settings.cpp.

References JSON_SETTINGS::m_manager, JSON_SETTINGS::m_modified, JSON_SETTINGS::m_nested_settings, NESTED_SETTINGS::SetParent(), and traceSettings.

Referenced by ~BOARD_DESIGN_SETTINGS(), ERC_SETTINGS::~ERC_SETTINGS(), NESTED_SETTINGS::~NESTED_SETTINGS(), NET_SETTINGS::~NET_SETTINGS(), and SCHEMATIC_SETTINGS::~SCHEMATIC_SETTINGS().

◆ ResetToDefaults()

void JSON_SETTINGS::ResetToDefaults ( )
inherited

Resets all parameters to default values.

Does NOT write to file or update underlying JSON.

Definition at line 387 of file json_settings.cpp.

References JSON_SETTINGS::m_params.

Referenced by EDA_3D_VIEWER_FRAME::Process_Special_Functions(), PANEL_COMMON_SETTINGS::ResetPanel(), and PANEL_MOUSE_SETTINGS::ResetPanel().

◆ SaveToFile()

bool NESTED_SETTINGS::SaveToFile ( const wxString &  aDirectory = "",
bool  aForce = false 
)
overridevirtualinherited

Calls Store() and then saves the JSON document contents into the parent JSON_SETTINGS.

Parameters
aDirectoryis ignored
Returns
true if the document contents were updated

Reimplemented from JSON_SETTINGS.

Definition at line 128 of file nested_settings.cpp.

References dummy, JSON_SETTINGS::GetFilename(), JSON_SETTINGS::GetJson(), JSON_SETTINGS::m_filename, JSON_SETTINGS::m_internals, NESTED_SETTINGS::m_parent, NESTED_SETTINGS::m_path, JSON_SETTINGS::m_schemaVersion, JSON_SETTINGS::Store(), and traceSettings.

◆ Set() [1/3]

template<typename ValueType >
template KICOMMON_API void JSON_SETTINGS::Set< wxAuiPaneInfo > ( const std::string &  aPath,
ValueType  aVal 
)
inherited

Stores a value into the JSON document Will throw an exception if ValueType isn't something that the library can handle.

Template Parameters
ValueTypeis the type to store
Parameters
aPathis a path to store in the form "key1.key2.key3"
aValis the value to store

Definition at line 631 of file json_settings.cpp.

References JSON_SETTINGS::m_internals.

Referenced by COLOR_SETTINGS::COLOR_SETTINGS(), EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS(), EESCHEMA_SETTINGS::EESCHEMA_SETTINGS(), LoadFromFile(), APP_SETTINGS_BASE::migrateFindReplace(), PROJECT_FILE::MigrateFromLegacy(), APP_SETTINGS_BASE::MigrateFromLegacy(), EDA_3D_VIEWER_SETTINGS::MigrateFromLegacy(), EESCHEMA_SETTINGS::MigrateFromLegacy(), SYMBOL_EDITOR_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy(), COMMON_SETTINGS::MigrateFromLegacy(), KICAD_SETTINGS::MigrateFromLegacy(), PCBNEW_SETTINGS::MigrateFromLegacy(), migrateSchema0to1(), FOOTPRINT_EDITOR_SETTINGS::migrateSchema0to1(), COLOR_SETTINGS::migrateSchema0to1(), PCBNEW_SETTINGS::PCBNEW_SETTINGS(), PROJECT_FILE::SaveAs(), PROJECT_LOCAL_SETTINGS::SaveAs(), PROJECT_FILE::SaveToFile(), PROJECT_LOCAL_SETTINGS::SaveToFile(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), COLOR_MAP_PARAM::Store(), PARAM< ValueType >::Store(), PARAM_PATH::Store(), PARAM_ENUM< EnumType >::Store(), PARAM_LAMBDA< ValueType >::Store(), PARAM_SCALED< ValueType >::Store(), PARAM_LIST< Type >::Store(), PARAM_SET< Type >::Store(), PARAM_PATH_LIST::Store(), PARAM_MAP< Value >::Store(), and PARAM_WXSTRING_MAP::Store().

◆ Set() [2/3]

template<>
void JSON_SETTINGS::Set ( const std::string &  aPath,
wxString  aVal 
)
inherited

Definition at line 909 of file json_settings.cpp.

◆ Set() [3/3]

template<>
KICOMMON_API void JSON_SETTINGS::Set ( const std::string &  aPath,
wxString  aVal 
)
inherited

◆ SetAuxOrigin()

◆ SetBoardThickness()

◆ SetCopperLayerCount()

void BOARD_DESIGN_SETTINGS::SetCopperLayerCount ( int  aNewLayerCount)

Set the copper layer count to aNewLayerCount.

Parameters
aNewLayerCountThe new number of enabled copper layers.

Definition at line 1421 of file board_design_settings.cpp.

References LSET::AllCuMask(), m_copperLayerCount, and m_enabledLayers.

Referenced by BOARD_DESIGN_SETTINGS(), and BOARD::SetCopperLayerCount().

◆ SetCustomDiffPairGap()

void BOARD_DESIGN_SETTINGS::SetCustomDiffPairGap ( int  aGap)
inline

Sets custom gap for differential pairs (i.e.

not available in netclasses or preset list).

Parameters
aGapis the new gap.

Definition at line 499 of file board_design_settings.h.

References m_customDiffPair, and DIFF_PAIR_DIMENSION::m_Gap.

Referenced by ROUTER_TOOL::DpDimensionsDialog(), and BOARD::SynchronizeNetsAndNetClasses().

◆ SetCustomDiffPairViaGap()

void BOARD_DESIGN_SETTINGS::SetCustomDiffPairViaGap ( int  aGap)
inline

Sets custom via gap for differential pairs (i.e.

not available in netclasses or preset list).

Parameters
aGapis the new gap. Specify 0 to use the DiffPairGap for vias as well.

Definition at line 519 of file board_design_settings.h.

References m_customDiffPair, and DIFF_PAIR_DIMENSION::m_ViaGap.

Referenced by ROUTER_TOOL::DpDimensionsDialog(), and BOARD::SynchronizeNetsAndNetClasses().

◆ SetCustomDiffPairWidth()

void BOARD_DESIGN_SETTINGS::SetCustomDiffPairWidth ( int  aWidth)
inline

Sets custom track width for differential pairs (i.e.

not available in netclasses or preset list).

Parameters
aDrillis the new track wdith.

Definition at line 481 of file board_design_settings.h.

References m_customDiffPair, and DIFF_PAIR_DIMENSION::m_Width.

Referenced by ROUTER_TOOL::DpDimensionsDialog(), and BOARD::SynchronizeNetsAndNetClasses().

◆ SetCustomTrackWidth()

void BOARD_DESIGN_SETTINGS::SetCustomTrackWidth ( int  aWidth)
inline

Sets custom width for track (i.e.

not available in netclasses or preset list).

To have it returned with GetCurrentTrackWidth() you need to enable custom track & via sizes with UseCustomTrackViaSize().

Parameters
aWidthis the new track width.

Definition at line 360 of file board_design_settings.h.

References m_customTrackWidth.

Referenced by BOARD::SynchronizeNetsAndNetClasses(), and DIALOG_TRACK_VIA_SIZE::TransferDataFromWindow().

◆ SetCustomViaDrill()

void BOARD_DESIGN_SETTINGS::SetCustomViaDrill ( int  aDrill)
inline

Sets custom size for via drill (i.e.

not available in netclasses or preset list).

To have it returned with GetCurrentViaDrill() you need to enable custom track & via sizes with UseCustomTrackViaSize().

Parameters
aDrillis the new drill size.

Definition at line 431 of file board_design_settings.h.

References m_customViaSize, and VIA_DIMENSION::m_Drill.

Referenced by BOARD::SynchronizeNetsAndNetClasses(), and DIALOG_TRACK_VIA_SIZE::TransferDataFromWindow().

◆ SetCustomViaSize()

void BOARD_DESIGN_SETTINGS::SetCustomViaSize ( int  aSize)
inline

Set custom size for via diameter (i.e.

not available in netclasses or preset list).

To have it returned with GetCurrentViaSize() you need to enable custom track & via sizes with UseCustomTrackViaSize().

Parameters
aSizeis the new drill diameter.

Definition at line 403 of file board_design_settings.h.

References m_customViaSize, and VIA_DIMENSION::m_Diameter.

Referenced by BOARD::SynchronizeNetsAndNetClasses(), and DIALOG_TRACK_VIA_SIZE::TransferDataFromWindow().

◆ SetDefaultMasterPad()

◆ SetDefaultZoneSettings()

void BOARD_DESIGN_SETTINGS::SetDefaultZoneSettings ( const ZONE_SETTINGS aSettings)
inline

◆ SetDiffPairIndex()

void BOARD_DESIGN_SETTINGS::SetDiffPairIndex ( unsigned  aIndex)
Parameters
aIndexis the diff pair dimensions list index to set.

Definition at line 1349 of file board_design_settings.cpp.

References m_DiffPairDimensionsList, m_diffPairIndex, and m_useCustomDiffPair.

Referenced by DIFF_PAIR_MENU::eventHandler(), BOARD_EDITOR_CONTROL::TrackWidthDec(), and BOARD_EDITOR_CONTROL::TrackWidthInc().

◆ SetEnabledLayers()

void BOARD_DESIGN_SETTINGS::SetEnabledLayers ( LSET  aMask)

Change the bit-mask of enabled layers to aMask.

Parameters
aMask= The new bit-mask of enabled layers.

Definition at line 1433 of file board_design_settings.cpp.

References LSET::AllCuMask(), B_CrtYd, B_Cu, Edge_Cuts, F_CrtYd, F_Cu, m_copperLayerCount, m_enabledLayers, Margin, and BASE_SET::set().

Referenced by DIALOG_FOOTPRINT_CHOOSER::build3DCanvas(), FOOTPRINT_CHOOSER_FRAME::build3DCanvas(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), and BOARD::SetEnabledLayers().

◆ SetFilename()

void JSON_SETTINGS::SetFilename ( const wxString &  aFilename)
inlineinherited

◆ SetGridOrigin()

◆ SetIfPresent() [1/4]

bool JSON_SETTINGS::SetIfPresent ( const nlohmann::json &  aObj,
const std::string &  aPath,
bool &  aTarget 
)
staticinherited

Sets the given bool if the given key/path is present.

Parameters
aObjis the source object
aTargetis the storage destination
Returns
True if set, false if not

Definition at line 736 of file json_settings.cpp.

References JSON_SETTINGS_INTERNALS::PointerFromString().

◆ SetIfPresent() [2/4]

bool JSON_SETTINGS::SetIfPresent ( const nlohmann::json &  aObj,
const std::string &  aPath,
int &  aTarget 
)
staticinherited

Sets the given int if the given key/path is present.

Parameters
aObjis the source object
aTargetis the storage destination
Returns
True if set, false if not

Definition at line 751 of file json_settings.cpp.

References JSON_SETTINGS_INTERNALS::PointerFromString().

◆ SetIfPresent() [3/4]

bool JSON_SETTINGS::SetIfPresent ( const nlohmann::json &  aObj,
const std::string &  aPath,
unsigned int &  aTarget 
)
staticinherited

Sets the given unsigned int if the given key/path is present.

Parameters
aObjis the source object
aTargetis the storage destination
Returns
True if set, false if not

Definition at line 766 of file json_settings.cpp.

References JSON_SETTINGS_INTERNALS::PointerFromString().

◆ SetIfPresent() [4/4]

bool JSON_SETTINGS::SetIfPresent ( const nlohmann::json &  aObj,
const std::string &  aPath,
wxString &  aTarget 
)
staticinherited

Sets the given string if the given key/path is present.

Parameters
aObjis the source object
aTargetis the storage destination
Returns
True if set, false if not

Definition at line 721 of file json_settings.cpp.

References JSON_SETTINGS_INTERNALS::PointerFromString().

Referenced by FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS(), PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS(), and SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS().

◆ SetLegacyFilename()

void JSON_SETTINGS::SetLegacyFilename ( const wxString &  aFilename)
inlineinherited

Definition at line 89 of file json_settings.h.

Referenced by SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS().

◆ SetLocation()

void JSON_SETTINGS::SetLocation ( SETTINGS_LOC  aLocation)
inlineinherited

◆ SetManager()

void JSON_SETTINGS::SetManager ( SETTINGS_MANAGER aManager)
inlineinherited

Definition at line 198 of file json_settings.h.

◆ SetParent()

void NESTED_SETTINGS::SetParent ( JSON_SETTINGS aParent,
bool  aLoadFromFile = true 
)
inherited

◆ SetReadOnly()

void JSON_SETTINGS::SetReadOnly ( bool  aReadOnly)
inlineinherited

◆ SetTrackWidthIndex()

void BOARD_DESIGN_SETTINGS::SetTrackWidthIndex ( unsigned  aIndex)

◆ SetViaSizeIndex()

void BOARD_DESIGN_SETTINGS::SetViaSizeIndex ( unsigned  aIndex)

◆ Store()

bool JSON_SETTINGS::Store ( )
virtualinherited

Stores the current parameters into the JSON document represented by this object Note: this doesn't do any writing to disk; that's handled by SETTINGS_MANAGER.

Returns
true if any part of the JSON document has been updated since the last save to disk

Definition at line 375 of file json_settings.cpp.

References JSON_SETTINGS::m_modified, and JSON_SETTINGS::m_params.

Referenced by JSON_SETTINGS::FormatAsString(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), SETTINGS_MANAGER::SaveColorSettings(), JSON_SETTINGS::SaveToFile(), and NESTED_SETTINGS::SaveToFile().

◆ UseCustomDiffPairDimensions() [1/2]

bool BOARD_DESIGN_SETTINGS::UseCustomDiffPairDimensions ( ) const
inline
Returns
True if custom sizes of diff pairs are enabled, false otherwise.

Definition at line 545 of file board_design_settings.h.

References m_useCustomDiffPair.

◆ UseCustomDiffPairDimensions() [2/2]

void BOARD_DESIGN_SETTINGS::UseCustomDiffPairDimensions ( bool  aEnabled)
inline

Enables/disables custom differential pair dimensions.

Parameters
aEnableddecides if custom settings should be used for new differential pairs.

Definition at line 537 of file board_design_settings.h.

References m_useCustomDiffPair.

Referenced by DIFF_PAIR_MENU::eventHandler(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), and DIFF_PAIR_MENU::update().

◆ UseCustomTrackViaSize() [1/2]

bool BOARD_DESIGN_SETTINGS::UseCustomTrackViaSize ( ) const
inline
Returns
True if custom sizes of tracks & vias are enabled, false otherwise.

Definition at line 460 of file board_design_settings.h.

References m_useCustomTrackVia.

◆ UseCustomTrackViaSize() [2/2]

◆ UseNetClassDiffPair()

bool BOARD_DESIGN_SETTINGS::UseNetClassDiffPair ( ) const
inline

Return true if netclass values should be used to obtain appropriate diff pair dimensions.

Definition at line 318 of file board_design_settings.h.

References m_diffPairIndex, and m_useCustomDiffPair.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes(), and ROUTER_TOOL::updateSizesAfterRouterEvent().

◆ UseNetClassTrack()

bool BOARD_DESIGN_SETTINGS::UseNetClassTrack ( ) const
inline

Return true if netclass values should be used to obtain appropriate track width.

Definition at line 302 of file board_design_settings.h.

References m_trackWidthIndex, and m_useCustomTrackVia.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes(), and ROUTER_TOOL::updateSizesAfterRouterEvent().

◆ UseNetClassVia()

bool BOARD_DESIGN_SETTINGS::UseNetClassVia ( ) const
inline

Return true if netclass values should be used to obtain appropriate via size.

Definition at line 310 of file board_design_settings.h.

References m_useCustomTrackVia, and m_viaSizeIndex.

Referenced by ROUTER_TOOL::handleLayerSwitch(), and PNS_KICAD_IFACE_BASE::ImportSizes().

Member Data Documentation

◆ m_AllowSoldermaskBridgesInFPs

◆ m_auxOrigin

VECTOR2I BOARD_DESIGN_SETTINGS::m_auxOrigin
private

origin for plot exports

Definition at line 774 of file board_design_settings.h.

Referenced by GetAuxOrigin(), initFromOther(), operator==(), and SetAuxOrigin().

◆ m_boardThickness

int BOARD_DESIGN_SETTINGS::m_boardThickness
private

Board thickness for 3D viewer.

Definition at line 796 of file board_design_settings.h.

Referenced by BOARD_DESIGN_SETTINGS(), GetBoardThickness(), initFromOther(), operator==(), and SetBoardThickness().

◆ m_CopperEdgeClearance

◆ m_copperLayerCount

int BOARD_DESIGN_SETTINGS::m_copperLayerCount
private

Number of copper layers for this design.

Definition at line 792 of file board_design_settings.h.

Referenced by GetCopperLayerCount(), initFromOther(), operator==(), SetCopperLayerCount(), and SetEnabledLayers().

◆ m_createIfDefault

bool JSON_SETTINGS::m_createIfDefault
protectedinherited

Whether or not the backing store file should be created if all parameters are still at their default values.

Ignored if m_createIfMissing is false or m_writeFile is false.

Definition at line 325 of file json_settings.h.

Referenced by JSON_SETTINGS::SaveToFile().

◆ m_createIfMissing

bool JSON_SETTINGS::m_createIfMissing
protectedinherited

Whether or not the backing store file should be created it if doesn't exist.

Definition at line 319 of file json_settings.h.

Referenced by JSON_SETTINGS::SaveToFile().

◆ m_currentNetClassName

wxString BOARD_DESIGN_SETTINGS::m_currentNetClassName
private

Current net class name used to display netclass info.

This is also the last used netclass after starting a track.

Definition at line 800 of file board_design_settings.h.

Referenced by GetCurrentNetClassName(), initFromOther(), and operator==().

◆ m_CurrentViaType

VIATYPE BOARD_DESIGN_SETTINGS::m_CurrentViaType

(VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)

Definition at line 685 of file board_design_settings.h.

Referenced by BOARD_DESIGN_SETTINGS(), DRAWING_TOOL::DrawVia(), initFromOther(), and operator==().

◆ m_customDiffPair

◆ m_customTrackWidth

int BOARD_DESIGN_SETTINGS::m_customTrackWidth
private

◆ m_customViaSize

◆ m_DefaultFPTextItems

◆ m_defaultZoneSettings

ZONE_SETTINGS BOARD_DESIGN_SETTINGS::m_defaultZoneSettings
private

The default settings that will be used for new zones.

Definition at line 809 of file board_design_settings.h.

Referenced by BOARD_DESIGN_SETTINGS(), GetDefaultZoneSettings(), initFromOther(), operator==(), and SetDefaultZoneSettings().

◆ m_deleteLegacyAfterMigration

bool JSON_SETTINGS::m_deleteLegacyAfterMigration
protectedinherited

Whether or not to delete legacy file after migration.

Definition at line 334 of file json_settings.h.

Referenced by JSON_SETTINGS::LoadFromFile(), PROJECT_FILE::PROJECT_FILE(), and PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS().

◆ m_DiffPairDimensionsList

◆ m_diffPairIndex

◆ m_DiffPairMeanderSettings

◆ m_DimensionArrowLength

◆ m_DimensionExtensionOffset

◆ m_DimensionKeepTextAligned

◆ m_DimensionPrecision

◆ m_DimensionSuppressZeroes

◆ m_DimensionTextPosition

◆ m_DimensionUnitsFormat

◆ m_DimensionUnitsMode

◆ m_DRCEngine

◆ m_DrcExclusionComments

std::map<wxString, wxString> BOARD_DESIGN_SETTINGS::m_DrcExclusionComments

◆ m_DrcExclusions

std::set<wxString> BOARD_DESIGN_SETTINGS::m_DrcExclusions

◆ m_DRCSeverities

◆ m_enabledLayers

LSET BOARD_DESIGN_SETTINGS::m_enabledLayers
private

◆ m_filename

◆ m_gridOrigin

VECTOR2I BOARD_DESIGN_SETTINGS::m_gridOrigin
private

origin for grid offsets

Definition at line 775 of file board_design_settings.h.

Referenced by GetGridOrigin(), initFromOther(), operator==(), and SetGridOrigin().

◆ m_HasStackup

◆ m_HoleClearance

◆ m_HoleToHoleMin

◆ m_internals

◆ m_legacy_filename

wxString JSON_SETTINGS::m_legacy_filename
protectedinherited

The filename of the wxConfig legacy file (if different from m_filename)

Definition at line 307 of file json_settings.h.

Referenced by JSON_SETTINGS::LoadFromFile().

◆ m_LineThickness

◆ m_location

SETTINGS_LOC JSON_SETTINGS::m_location
protectedinherited

The location of this settings file (.

See also
SETTINGS_LOC)

Definition at line 310 of file json_settings.h.

◆ m_manager

SETTINGS_MANAGER* JSON_SETTINGS::m_manager
protectedinherited

A pointer to the settings manager managing this file (may be null)

Definition at line 343 of file json_settings.h.

Referenced by FOOTPRINT_EDITOR_SETTINGS::migrateSchema0to1(), COLOR_SETTINGS::migrateSchema0to1(), and JSON_SETTINGS::ReleaseNestedSettings().

◆ m_MaxError

int BOARD_DESIGN_SETTINGS::m_MaxError

Definition at line 719 of file board_design_settings.h.

Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), FEATURES_MANAGER::AddPadShape(), FEATURES_MANAGER::AddShape(), PCB_IO_IPC2581::addShape(), BOARD_ADAPTER::addText(), BOARD_DESIGN_SETTINGS(), EXPORTER_STEP::buildBoard3DShapes(), PAD::BuildEffectivePolygon(), PAD::buildEffectiveShape(), EXPORTER_STEP::buildFootprint3DShapes(), EXPORTER_STEP::buildGraphic3DShape(), ZONE::BuildSmoothedPoly(), ZONE_FILLER::buildThermalSpokes(), EXPORTER_STEP::buildTrack3DShape(), GRAPHICS_CLEANER::CleanupBoard(), BOARD::ConvertBrdLayerToPolygonalContours(), BOARD_ADAPTER::createBoardPolygon(), BOARD_ADAPTER::createLayers(), GENCAD_EXPORTER::CreatePadsShapesSection(), BOARD_ADAPTER::createPadWithMargin(), CONVERT_TOOL::CreatePolys(), PAD::doCheckPad(), KIGFX::PCB_PAINTER::Draw(), enclosedByAreaFunc(), ZONE_FILLER::fillCopperZone(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), FEATURES_MANAGER::InitFeatureList(), initFromOther(), DSN::SPECCTRA_DB::makePADSTACK(), CONVERT_TOOL::makePolysFromChainedSegs(), CONVERT_TOOL::makePolysFromClosedGraphics(), CONVERT_TOOL::makePolysFromOpenGraphics(), PAD::MergePrimitivesAsPolygon(), operator==(), PCB_IO_KICAD_SEXPR_PARSER::parseSetup(), BRDITEMS_PLOTTER::PlotShape(), PlotSolderMaskLayer(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), PAD_TOOL::RecombinePad(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), PNS_KICAD_IFACE_BASE::syncTextItem(), DRC_TEST_PROVIDER_MISC::testOutline(), PANEL_SETUP_CONSTRAINTS::TransferDataFromWindow(), PANEL_SETUP_CONSTRAINTS::TransferDataToWindow(), and ZONE::TransformSmoothedOutlineToPolygon().

◆ m_MicroViasMinDrill

◆ m_MicroViasMinSize

◆ m_migrators

std::map<int, std::pair<int, std::function<bool()> > > JSON_SETTINGS::m_migrators
protectedinherited

A map of starting schema version to a pair of <ending version, migrator function>

Definition at line 346 of file json_settings.h.

Referenced by JSON_SETTINGS::Migrate(), and JSON_SETTINGS::registerMigration().

◆ m_MinClearance

◆ m_MinConn

◆ m_MinGrooveWidth

◆ m_MinResolvedSpokes

◆ m_MinSilkTextHeight

◆ m_MinSilkTextThickness

◆ m_MinThroughDrill

◆ m_modified

bool JSON_SETTINGS::m_modified
protectedinherited

True if the JSON data store has been written to since the last file write.

Definition at line 331 of file json_settings.h.

Referenced by JSON_SETTINGS::LoadFromFile(), JSON_SETTINGS::ReleaseNestedSettings(), JSON_SETTINGS::SaveToFile(), and JSON_SETTINGS::Store().

◆ m_nested_settings

std::vector<NESTED_SETTINGS*> JSON_SETTINGS::m_nested_settings
protectedinherited

Nested settings files that live inside this one, if any.

Definition at line 316 of file json_settings.h.

Referenced by JSON_SETTINGS::AddNestedSettings(), JSON_SETTINGS::LoadFromFile(), JSON_SETTINGS::ReleaseNestedSettings(), and JSON_SETTINGS::SaveToFile().

◆ m_NetSettings

std::shared_ptr<NET_SETTINGS> BOARD_DESIGN_SETTINGS::m_NetSettings

Definition at line 735 of file board_design_settings.h.

Referenced by GERBER_JOBFILE_WRITER::addJSONDesignRules(), PCB_CONTROL::AppendBoard(), BOARD::BOARD(), BOARD_DESIGN_SETTINGS(), CONNECTIVITY_DATA::Build(), DIALOG_CLEANUP_TRACKS_AND_VIAS::buildFilterLists(), DIALOG_GLOBAL_EDIT_TEARDROPS::buildFilterLists(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::buildFilterLists(), APPEARANCE_CONTROLS::buildNetClassMenu(), NETINFO_ITEM::Clear(), BOARD::ClearProject(), PNS_KICAD_IFACE::createBoardItem(), EVT_GRID_CMD_CELL_CHANGED(), FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME(), DSN::SPECCTRA_DB::FromBOARD(), DSN::SPECCTRA_DB::FromSESSION(), GetCurrentDiffPairGap(), GetCurrentDiffPairViaGap(), GetCurrentDiffPairWidth(), GetCurrentTrackWidth(), GetCurrentViaDrill(), GetCurrentViaSize(), BOARD_CONNECTED_ITEM::GetEffectiveNetClass(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet(), GetSmallestClearanceValue(), initFromOther(), PCB_IO_EAGLE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), PCB_IO_EAGLE::loadClasses(), CADSTAR_PCB_ARCHIVE_LOADER::loadDesignRules(), DRC_ENGINE::loadImplicitRules(), PCB_IO_KICAD_LEGACY::loadNETCLASS(), PCB_IO_KICAD_LEGACY::loadSETUP(), NETINFO_ITEM::NETINFO_ITEM(), APPEARANCE_CONTROLS::onNetclassColorChanged(), APPEARANCE_CONTROLS::onNetclassContextMenu(), PANEL_SETUP_RULES::onScintillaCharAdded(), operator==(), ALTIUM_PCB::ParseClasses6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseNETCLASS(), PCB_IO_KICAD_SEXPR_PARSER::parseSetup(), APPEARANCE_CONTROLS::rebuildNets(), NETINFO_ITEM::SetNetClass(), BOARD::SetProject(), BOARD::SynchronizeNetsAndNetClasses(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), BOARD_EDITOR_CONTROL::ViaSizeDec(), and BOARD_EDITOR_CONTROL::ViaSizeInc().

◆ m_Pad_Master

◆ m_params

◆ m_parent

◆ m_path

std::string NESTED_SETTINGS::m_path
protectedinherited

The path (in pointer format) of where to store this document in the parent.

Definition at line 65 of file nested_settings.h.

Referenced by NESTED_SETTINGS::LoadFromFile(), and NESTED_SETTINGS::SaveToFile().

◆ m_resetParamsIfMissing

bool JSON_SETTINGS::m_resetParamsIfMissing
protectedinherited

Whether or not to set parameters to their default value if missing from JSON on Load()

Definition at line 337 of file json_settings.h.

Referenced by BOARD_DESIGN_SETTINGS(), and JSON_SETTINGS::Load().

◆ m_schemaVersion

int JSON_SETTINGS::m_schemaVersion
protectedinherited

◆ m_SilkClearance

◆ m_SingleTrackMeanderSettings

◆ m_SkewMeanderSettings

◆ m_SolderMaskExpansion

◆ m_SolderMaskMinWidth

◆ m_SolderMaskToCopperClearance

◆ m_SolderPasteMargin

◆ m_SolderPasteMarginRatio

◆ m_stackup

BOARD_STACKUP BOARD_DESIGN_SETTINGS::m_stackup
private

the description of layers stackup, for board fabrication only physical layers are in layers stackup.

It includes not only layers enabled for the board edition, but also dielectric layers

Definition at line 806 of file board_design_settings.h.

Referenced by GetStackupDescriptor(), initFromOther(), and operator==().

◆ m_StyleFPFields

◆ m_StyleFPShapes

◆ m_StyleFPText

◆ m_TeardropParamsList

TEARDROP_PARAMETERS_LIST BOARD_DESIGN_SETTINGS::m_TeardropParamsList

The parameters of teardrops for the different teardrop targets (via/pad, track end) 3 set of parameters always exist: for round shapes, for rect shapes, for track ends.

Definition at line 679 of file board_design_settings.h.

Referenced by BOARD_DESIGN_SETTINGS(), GetTeadropParamsList(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow(), and DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow().

◆ m_TempOverrideTrackWidth

◆ m_TentViasBack

◆ m_TentViasFront

◆ m_TextItalic

◆ m_TextSize

◆ m_TextThickness

◆ m_TextUpright

◆ m_TrackMinWidth

◆ m_trackWidthIndex

unsigned BOARD_DESIGN_SETTINGS::m_trackWidthIndex
private

◆ m_TrackWidthList

◆ m_UseConnectedTrackWidth

◆ m_useCustomDiffPair

◆ m_useCustomTrackVia

◆ m_UseHeightForLengthCalcs

bool BOARD_DESIGN_SETTINGS::m_UseHeightForLengthCalcs

◆ m_ViasDimensionsList

◆ m_viaSizeIndex

unsigned BOARD_DESIGN_SETTINGS::m_viaSizeIndex
private

◆ m_ViasMinAnnularWidth

◆ m_ViasMinSize

◆ m_writeFile

bool JSON_SETTINGS::m_writeFile
protectedinherited

Whether or not the backing store file should be written.

Definition at line 328 of file json_settings.h.

Referenced by COLOR_SETTINGS::CreateBuiltinColorSettings(), COLOR_SETTINGS::initFromOther(), JSON_SETTINGS::LoadFromFile(), and JSON_SETTINGS::SaveToFile().

◆ m_ZoneKeepExternalFillets


The documentation for this class was generated from the following files: