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
 
int GetTrackWidthIndex () const
 
void SetTrackWidthIndex (int 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
 
int GetViaSizeIndex () const
 
void SetViaSizeIndex (int 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
 
int GetDiffPairIndex () const
 
void SetDiffPairIndex (int 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
 
const LSETGetEnabledLayers () const
 Return a bit-mask of all the layers that are enabled.
 
void SetEnabledLayers (const 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 GetUserDefinedLayerCount () const
 
void SetUserDefinedLayerCount (int aNewLayerCount)
 Set the number of user defined layers to aNewLayerCount.
 
int GetBoardThickness () const
 The full thickness of the board including copper and masks.
 
void SetBoardThickness (int aThickness)
 
int GetDRCEpsilon () const
 Return an epsilon which accounts for rounding errors, etc.
 
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 () const
 
void SetGridOrigin (const VECTOR2I &aOrigin)
 
const VECTOR2IGetGridOrigin () const
 
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<>
KICOMMON_API 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)
 
virtual std::map< std::string, nlohmann::json > GetFileHistories ()
 
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).
 
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
 
bool m_CoverViasFront
 
bool m_CoverViasBack
 
bool m_PlugViasFront
 
bool m_PlugViasBack
 
bool m_CapVias
 
bool m_FillVias
 
std::shared_ptr< NET_SETTINGSm_NetSettings
 
std::vector< TEXT_ITEM_INFOm_DefaultFPTextItems
 
std::map< std::string, wxString > m_UserLayerNames
 
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.
 
bool m_isFutureFormat
 Set to true if this settings is loaded from a file with a newer schema version than is known.
 
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
 
int m_trackWidthIndex
 
int m_viaSizeIndex
 
int 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.
 
int m_userDefinedLayerCount
 Number of user defined 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 249 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, JSON_SETTINGS::At(), AUTOMATIC, bdsSchemaVersion, 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_MIRRORED_TEXT_ON_FRONT_LAYER, DRCE_MISSING_COURTYARD, DRCE_MISSING_FOOTPRINT, DRCE_NET_CONFLICT, DRCE_NONMIRRORED_TEXT_ON_BACK_LAYER, DRCE_NPTH_IN_COURTYARD, DRCE_OVERLAPPING_SILK, DRCE_PADSTACK, DRCE_PTH_IN_COURTYARD, DRCE_SCHEMATIC_PARITY, DRCE_SILK_EDGE_CLEARANCE, DRCE_SILK_MASK_CLEARANCE, DRCE_TEXT_HEIGHT, DRCE_TEXT_THICKNESS, F_Fab, F_SilkS, JSON_SETTINGS::Get(), DRC_ITEM::GetItemsWithSeverities(), GetTeardropTargetCanonicalName(), GetTeardropTargetTypeFromCanonicalName(), INCH, INLINE, JSON_SETTINGS::JSON_SETTINGS(), 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_CapVias, m_CopperEdgeClearance, PNS::MEANDER_SETTINGS::m_cornerRadiusPercentage, PNS::MEANDER_SETTINGS::m_cornerStyle, m_CoverViasBack, m_CoverViasFront, m_CurrentViaType, TEARDROP_PARAMETERS::m_CurvedEdges, m_customDiffPair, m_customTrackWidth, m_customViaSize, m_DefaultFPTextItems, m_defaultZoneSettings, 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, m_enabledLayers, m_FillVias, 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, m_PlugViasBack, m_PlugViasFront, 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::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, m_ViasDimensionsList, m_viaSizeIndex, m_ViasMinAnnularWidth, m_ViasMinSize, TEARDROP_PARAMETERS::m_WidthtoSizeFilterRatio, m_ZoneKeepExternalFillets, PNS::MEANDER_STYLE_CHAMFER, PNS::MEANDER_STYLE_ROUND, migrateSchema0to1(), name, NESTED_SETTINGS::NESTED_SETTINGS(), NO_SUFFIX, OUTSIDE, PAREN_SUFFIX, pcbIUScale, JSON_SETTINGS::registerMigration(), RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, BASE_SET::set(), SetCopperLayerCount(), SetDefaultMasterPad(), SetUserDefinedLayerCount(), SeverityFromString(), SeverityToString(), TEXT_MAX_SIZE_MM, TEXT_MIN_SIZE_MM, THROUGH, V_VVVVV, via, X, VECTOR2< T >::x, X_XXXX, VECTOR2< T >::y, and ZONE_CLEARANCE_MM.

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

◆ ~BOARD_DESIGN_SETTINGS()

BOARD_DESIGN_SETTINGS::~BOARD_DESIGN_SETTINGS ( )
virtual

Definition at line 939 of file board_design_settings.cpp.

References NESTED_SETTINGS::m_parent.

◆ BOARD_DESIGN_SETTINGS() [2/2]

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 907 of file json_settings.cpp.

References GetFilename(), m_nested_settings, NESTED_SETTINGS, and traceSettings.

◆ At()

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

◆ 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 955 of file json_settings.cpp.

◆ FormatAsString()

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

Definition at line 538 of file json_settings.cpp.

References dummy, m_internals, and Store().

◆ fromLegacy()

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

◆ 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 879 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 855 of file json_settings.cpp.

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

◆ Get() [1/3]

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

Definition at line 938 of file json_settings.cpp.

References GetJson().

◆ Get() [2/3]

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

◆ Get() [3/3]

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

References KICOMMON_API.

◆ GetAuxOrigin()

◆ GetBiggestClearanceValue()

◆ GetBoardThickness()

int BOARD_DESIGN_SETTINGS::GetBoardThickness ( ) const
inline

◆ GetCopperLayerCount()

int BOARD_DESIGN_SETTINGS::GetCopperLayerCount ( ) const
inline

◆ 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 1428 of file board_design_settings.cpp.

References m_customDiffPair, m_DiffPairDimensionsList, m_diffPairIndex, 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 1448 of file board_design_settings.cpp.

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

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 1408 of file board_design_settings.cpp.

References m_customDiffPair, m_DiffPairDimensionsList, m_diffPairIndex, m_NetSettings, and m_useCustomDiffPair.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ GetCurrentNetClassName()

const wxString & BOARD_DESIGN_SETTINGS::GetCurrentNetClassName ( ) const
inline
Returns
the current net class name.

Definition at line 296 of file board_design_settings.h.

References m_currentNetClassName.

◆ 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 1388 of file board_design_settings.cpp.

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

Referenced by 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 1366 of file board_design_settings.cpp.

References m_customViaSize, m_NetSettings, m_useCustomTrackVia, m_ViasDimensionsList, and m_viaSizeIndex.

Referenced by 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 1355 of file board_design_settings.cpp.

References m_customViaSize, m_NetSettings, m_useCustomTrackVia, m_ViasDimensionsList, and m_viaSizeIndex.

Referenced by 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 497 of file board_design_settings.h.

References m_customDiffPair.

◆ GetCustomDiffPairViaGap()

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

Definition at line 516 of file board_design_settings.h.

References m_customDiffPair.

◆ GetCustomDiffPairWidth()

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

Definition at line 478 of file board_design_settings.h.

References m_customDiffPair.

◆ GetCustomTrackWidth()

int BOARD_DESIGN_SETTINGS::GetCustomTrackWidth ( ) const
inline

Definition at line 363 of file board_design_settings.h.

References m_customTrackWidth.

◆ GetCustomViaDrill()

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

Definition at line 428 of file board_design_settings.h.

References m_customViaSize.

◆ GetCustomViaSize()

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

Definition at line 400 of file board_design_settings.h.

References m_customViaSize.

◆ GetDefaultZoneSettings()

◆ GetDiffPairIndex()

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

Definition at line 457 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()

int BOARD_DESIGN_SETTINGS::GetDRCEpsilon ( ) const

Return an epsilon which accounts for rounding errors, etc.

While currently an advanced cfg, going through this API allows us to easily change it to board-specific if so desired.

Definition at line 1532 of file board_design_settings.cpp.

References ADVANCED_CFG::GetCfg(), and pcbIUScale.

Referenced by collidesWithArea(), DRAWING_TOOL::DrawVia(), PCB_TUNING_PATTERN::EditFinish(), DRC_ENGINE::IsNetTieExclusion(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), and DRC_TEST_PROVIDER_DISALLOW::Run().

◆ GetEnabledLayers()

const LSET & BOARD_DESIGN_SETTINGS::GetEnabledLayers ( ) const
inline

Return a bit-mask of all the layers that are enabled.

Returns
the enabled layers in bit-mapped form.

Definition at line 563 of file board_design_settings.h.

References m_enabledLayers.

Referenced by BOARD_STACKUP::BuildDefaultStackupList(), LENGTH_DELAY_CALCULATION_ITEM::CalculateViaLayers(), and BOARD::GetEnabledLayers().

◆ getFileExt()

virtual wxString JSON_SETTINGS::getFileExt ( ) const
inlineprotectedvirtualinherited

◆ GetFileHistories()

std::map< std::string, nlohmann::json > JSON_SETTINGS::GetFileHistories ( )
virtualinherited

Reimplemented in GERBVIEW_SETTINGS.

Definition at line 400 of file json_settings.cpp.

References Contains(), and GetJson().

Referenced by GERBVIEW_SETTINGS::GetFileHistories().

◆ GetFilename()

◆ GetFullFilename()

wxString JSON_SETTINGS::GetFullFilename ( ) const
inherited

Definition at line 110 of file json_settings.cpp.

References getFileExt(), and m_filename.

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

◆ 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 1538 of file board_design_settings.cpp.

References ADVANCED_CFG::GetCfg(), and pcbIUScale.

Referenced by KIGFX::PCB_PAINTER::Draw().

◆ 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 583 of file json_settings.cpp.

References m_internals.

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

◆ GetLayerClass()

◆ getLegacyFileExt()

virtual wxString JSON_SETTINGS::getLegacyFileExt ( ) const
inlineprotectedvirtualinherited

Reimplemented in PROJECT_FILE, and PROJECT_LOCAL_SETTINGS.

Definition at line 296 of file json_settings.h.

Referenced by 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.

References JSON_SETTINGS::JSON_SETTINGS(), and m_parent.

Referenced by BOARD_DESIGN_SETTINGS::LoadFromFile().

◆ GetSeverity()

◆ GetSmallestClearanceValue()

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

Definition at line 1337 of file board_design_settings.cpp.

References clearance, m_NetSettings, and name.

Referenced by DIALOG_PLOT::TransferDataToWindow().

◆ GetStackupDescriptor() [1/2]

◆ GetStackupDescriptor() [2/2]

const BOARD_STACKUP & BOARD_DESIGN_SETTINGS::GetStackupDescriptor ( ) const
inline

Definition at line 269 of file board_design_settings.h.

References m_stackup.

◆ GetTeadropParamsList()

TEARDROP_PARAMETERS_LIST * BOARD_DESIGN_SETTINGS::GetTeadropParamsList ( )
inline

Definition at line 271 of file board_design_settings.h.

References m_TeardropParamsList.

Referenced by DIALOG_GLOBAL_EDIT_TEARDROPS::processItem().

◆ GetTextItalic()

◆ GetTextSize()

◆ GetTextThickness()

int BOARD_DESIGN_SETTINGS::GetTextThickness ( PCB_LAYER_ID aLayer) const

◆ GetTextUpright()

◆ GetTrackWidthIndex()

int BOARD_DESIGN_SETTINGS::GetTrackWidthIndex ( ) const
inline

◆ GetUserDefinedLayerCount()

int BOARD_DESIGN_SETTINGS::GetUserDefinedLayerCount ( ) const
inline
Returns
the number of enabled user defined layers.

Definition at line 607 of file board_design_settings.h.

References m_userDefinedLayerCount.

Referenced by BOARD::GetUserDefinedLayerCount().

◆ GetViaSizeIndex()

int 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 1300 of file board_design_settings.cpp.

References m_DRCSeverities, and RPT_SEVERITY_IGNORE.

◆ initFromOther()

void BOARD_DESIGN_SETTINGS::initFromOther ( const BOARD_DESIGN_SETTINGS & aOther)
private

Definition at line 965 of file board_design_settings.cpp.

References BOARD_DESIGN_SETTINGS(), m_AllowSoldermaskBridgesInFPs, m_auxOrigin, m_boardThickness, m_CapVias, m_CopperEdgeClearance, m_copperLayerCount, m_CoverViasBack, m_CoverViasFront, 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_FillVias, 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_PlugViasBack, m_PlugViasFront, 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_userDefinedLayerCount, m_UserLayerNames, 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 581 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 1221 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, project, and JSON_SETTINGS::Set().

◆ LoadFromRawFile()

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

Definition at line 551 of file json_settings.cpp.

References Load(), m_internals, and traceSettings.

◆ 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 706 of file json_settings.cpp.

References m_internals, m_migrators, m_schemaVersion, and traceSettings.

Referenced by 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 APP_SETTINGS_BASE, BITMAP2CMP_SETTINGS, COLOR_SETTINGS, COMMON_SETTINGS, CVPCB_SETTINGS, EDA_3D_VIEWER_SETTINGS, EESCHEMA_SETTINGS, FOOTPRINT_EDITOR_SETTINGS, GERBVIEW_SETTINGS, KICAD_SETTINGS, PCB_CALCULATOR_SETTINGS, PCBNEW_SETTINGS, PL_EDITOR_SETTINGS, PROJECT_FILE, PROJECT_LOCAL_SETTINGS, and SYMBOL_EDITOR_SETTINGS.

Definition at line 747 of file json_settings.cpp.

References traceSettings.

Referenced by 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 1169 of file board_design_settings.cpp.

References JSON_SETTINGS::At(), JSON_SETTINGS::Contains(), JSON_SETTINGS::Get(), 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 257 of file board_design_settings.h.

References BOARD_DESIGN_SETTINGS(), and operator==().

◆ operator=()

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

Definition at line 958 of file board_design_settings.cpp.

References BOARD_DESIGN_SETTINGS(), and initFromOther().

◆ operator==()

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

Definition at line 1065 of file board_design_settings.cpp.

References BOARD_DESIGN_SETTINGS(), m_AllowSoldermaskBridgesInFPs, m_auxOrigin, m_boardThickness, m_CapVias, m_CopperEdgeClearance, m_copperLayerCount, m_CoverViasBack, m_CoverViasFront, 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_FillVias, 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_PlugViasBack, m_PlugViasFront, 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_userDefinedLayerCount, m_UserLayerNames, 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 697 of file json_settings.cpp.

References m_migrators, and m_schemaVersion.

Referenced by BITMAP2CMP_SETTINGS::BITMAP2CMP_SETTINGS(), BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), COLOR_SETTINGS::COLOR_SETTINGS(), EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS(), EESCHEMA_SETTINGS::EESCHEMA_SETTINGS(), NET_SETTINGS::NET_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 914 of file json_settings.cpp.

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

Referenced by 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 393 of file json_settings.cpp.

References m_params.

Referenced by PANEL_COMMON_SETTINGS::ResetPanel(), PANEL_MAINTENANCE::ResetPanel(), PANEL_MOUSE_SETTINGS::ResetPanel(), and PANEL_SPACEMOUSE::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::m_filename, JSON_SETTINGS::m_internals, m_parent, m_path, JSON_SETTINGS::m_schemaVersion, JSON_SETTINGS::Store(), and traceSettings.

Referenced by SCH_EDIT_FRAME::saveProjectSettings(), and SIMULATOR_FRAME::SaveSettings().

◆ 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 658 of file json_settings.cpp.

References m_internals.

Referenced by BITMAP2CMP_SETTINGS::BITMAP2CMP_SETTINGS(), COLOR_SETTINGS::COLOR_SETTINGS(), EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS(), EESCHEMA_SETTINGS::EESCHEMA_SETTINGS(), JSON_SETTINGS::Set< KIGFX::COLOR4D >(), JSON_SETTINGS::Set< KIGFX::CROSS_HAIR_MODE >(), JSON_SETTINGS::Set< nlohmann::json >(), JSON_SETTINGS::Set< std::string >(), BOARD_DESIGN_SETTINGS::LoadFromFile(), APP_SETTINGS_BASE::migrateFindReplace(), APP_SETTINGS_BASE::MigrateFromLegacy(), COMMON_SETTINGS::MigrateFromLegacy(), EDA_3D_VIEWER_SETTINGS::MigrateFromLegacy(), EESCHEMA_SETTINGS::MigrateFromLegacy(), FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), KICAD_SETTINGS::MigrateFromLegacy(), PCBNEW_SETTINGS::MigrateFromLegacy(), PROJECT_FILE::MigrateFromLegacy(), SYMBOL_EDITOR_SETTINGS::MigrateFromLegacy(), BOARD_DESIGN_SETTINGS::migrateSchema0to1(), COLOR_SETTINGS::migrateSchema0to1(), FOOTPRINT_EDITOR_SETTINGS::migrateSchema0to1(), 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_ENUM< EnumType >::Store(), PARAM_LAMBDA< ValueType >::Store(), PARAM_LIST< Type >::Store(), PARAM_MAP< Value >::Store(), PARAM_PATH::Store(), PARAM_PATH_LIST::Store(), PARAM_SCALED< ValueType >::Store(), PARAM_SET< Type >::Store(), and PARAM_WXSTRING_MAP::Store().

◆ Set() [2/3]

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

Definition at line 948 of file json_settings.cpp.

◆ Set() [3/3]

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

References KICOMMON_API.

◆ 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 1468 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 488 of file board_design_settings.h.

References m_customDiffPair.

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 508 of file board_design_settings.h.

References m_customDiffPair.

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 width.

Definition at line 470 of file board_design_settings.h.

References m_customDiffPair.

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 362 of file board_design_settings.h.

References m_customTrackWidth.

Referenced by BOARD::SynchronizeNetsAndNetClasses().

◆ 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 420 of file board_design_settings.h.

References m_customViaSize.

Referenced by BOARD::SynchronizeNetsAndNetClasses().

◆ 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 392 of file board_design_settings.h.

References m_customViaSize.

Referenced by BOARD::SynchronizeNetsAndNetClasses().

◆ SetDefaultMasterPad()

◆ SetDefaultZoneSettings()

void BOARD_DESIGN_SETTINGS::SetDefaultZoneSettings ( const ZONE_SETTINGS & aSettings)
inline

Definition at line 288 of file board_design_settings.h.

References m_defaultZoneSettings.

Referenced by PCB_IO_KICAD_LEGACY::loadSETUP().

◆ SetDiffPairIndex()

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

Definition at line 1399 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 ( const LSET & aMask)

◆ SetFilename()

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

◆ SetGridOrigin()

void BOARD_DESIGN_SETTINGS::SetGridOrigin ( const VECTOR2I & aOrigin)
inline

◆ 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 770 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 785 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 800 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 755 of file json_settings.cpp.

References JSON_SETTINGS_INTERNALS::PointerFromString().

Referenced by 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 96 of file json_settings.h.

References m_legacy_filename.

Referenced by SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS().

◆ SetLocation()

void JSON_SETTINGS::SetLocation ( SETTINGS_LOC aLocation)
inlineinherited

Definition at line 93 of file json_settings.h.

References m_location.

Referenced by COLOR_SETTINGS::COLOR_SETTINGS(), and COLOR_SETTINGS::migrateSchema0to1().

◆ SetManager()

void JSON_SETTINGS::SetManager ( SETTINGS_MANAGER * aManager)
inlineinherited

Definition at line 207 of file json_settings.h.

References m_manager.

◆ 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 ( int aIndex)

◆ SetUserDefinedLayerCount()

void BOARD_DESIGN_SETTINGS::SetUserDefinedLayerCount ( int aNewLayerCount)

Set the number of user defined layers to aNewLayerCount.

Parameters
aNewLayerCountThe new number of enabled user defined layers.

Definition at line 1480 of file board_design_settings.cpp.

References m_enabledLayers, m_userDefinedLayerCount, and LSET::UserDefinedLayersMask().

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

◆ SetViaSizeIndex()

void BOARD_DESIGN_SETTINGS::SetViaSizeIndex ( int 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 381 of file json_settings.cpp.

References m_modified, and m_params.

Referenced by FormatAsString(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), SETTINGS_MANAGER::SaveColorSettings(), 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 534 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 526 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 449 of file board_design_settings.h.

References m_useCustomTrackVia.

◆ UseCustomTrackViaSize() [2/2]

void BOARD_DESIGN_SETTINGS::UseCustomTrackViaSize ( bool aEnabled)
inline

◆ 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 320 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 304 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 312 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

bool BOARD_DESIGN_SETTINGS::m_AllowSoldermaskBridgesInFPs

◆ m_auxOrigin

VECTOR2I BOARD_DESIGN_SETTINGS::m_auxOrigin
private

origin for plot exports

Definition at line 796 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 820 of file board_design_settings.h.

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

◆ m_CapVias

◆ m_CopperEdgeClearance

◆ m_copperLayerCount

int BOARD_DESIGN_SETTINGS::m_copperLayerCount
private

Number of copper layers for this design.

Definition at line 814 of file board_design_settings.h.

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

◆ m_CoverViasBack

bool BOARD_DESIGN_SETTINGS::m_CoverViasBack

◆ m_CoverViasFront

bool BOARD_DESIGN_SETTINGS::m_CoverViasFront

◆ 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 334 of file json_settings.h.

Referenced by JSON_SETTINGS(), and 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 328 of file json_settings.h.

Referenced by JSON_SETTINGS(), and 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 824 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 691 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 835 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 343 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

int BOARD_DESIGN_SETTINGS::m_DimensionArrowLength

◆ m_DimensionExtensionOffset

int BOARD_DESIGN_SETTINGS::m_DimensionExtensionOffset

◆ m_DimensionKeepTextAligned

bool BOARD_DESIGN_SETTINGS::m_DimensionKeepTextAligned

◆ m_DimensionPrecision

DIM_PRECISION BOARD_DESIGN_SETTINGS::m_DimensionPrecision

◆ m_DimensionSuppressZeroes

bool BOARD_DESIGN_SETTINGS::m_DimensionSuppressZeroes

◆ m_DimensionTextPosition

◆ m_DimensionUnitsFormat

◆ m_DimensionUnitsMode

◆ m_DRCEngine

std::shared_ptr<DRC_ENGINE> BOARD_DESIGN_SETTINGS::m_DRCEngine

Definition at line 714 of file board_design_settings.h.

Referenced by BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), ZONE_FILLER::buildCopperItemClearances(), ZONE_FILLER::buildThermalSpokes(), PCB_TUNING_PATTERN::CreateNew(), DRAWING_TOOL::DrawVia(), GetBiggestClearanceValue(), PCB_VIA::GetDrillConstraint(), PCB_VIA::GetMinAnnulus(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), BOARD_CONNECTED_ITEM::GetOwnClearance(), PAD::GetOwnClearance(), PAD::GetSolderMaskExpansion(), PCB_SHAPE::GetSolderMaskExpansion(), PCB_TRACK::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), PCB_TRACK::GetWidthConstraint(), PCB_VIA::GetWidthConstraint(), ROUTER_TOOL::handleLayerSwitch(), PCBNEW_JOBS_HANDLER::JobExportDrc(), ZONE_FILLER::knockoutThermalReliefs(), PNS_LOG_FILE::Load(), LoadBoard(), NewBoard(), DRAWING_TOOL::PlaceTuningPattern(), DRC_BASE_FIXTURE::runDrcOnBoard(), PCB_BASE_EDIT_FRAME::SetBoard(), PCB_TUNING_PATTERN::ShowPropertiesDialog(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), ROUTER_TOOL::updateSizesAfterRouterEvent(), and WriteDRCReport().

◆ m_DrcExclusionComments

◆ m_DrcExclusions

◆ m_DRCSeverities

◆ m_enabledLayers

LSET BOARD_DESIGN_SETTINGS::m_enabledLayers
private

◆ m_filename

◆ m_FillVias

◆ m_gridOrigin

VECTOR2I BOARD_DESIGN_SETTINGS::m_gridOrigin
private

origin for grid offsets

Definition at line 797 of file board_design_settings.h.

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

◆ m_HasStackup

◆ m_HoleClearance

◆ m_HoleToHoleMin

◆ m_internals

◆ m_isFutureFormat

bool JSON_SETTINGS::m_isFutureFormat
protectedinherited

Set to true if this settings is loaded from a file with a newer schema version than is known.

Definition at line 352 of file json_settings.h.

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

◆ 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 316 of file json_settings.h.

Referenced by JSON_SETTINGS(), LoadFromFile(), and SetLegacyFilename().

◆ m_LineThickness

◆ m_location

SETTINGS_LOC JSON_SETTINGS::m_location
protectedinherited

The location of this settings file (.

See also
SETTINGS_LOC)

Definition at line 319 of file json_settings.h.

Referenced by GetLocation(), JSON_SETTINGS(), and SetLocation().

◆ m_manager

SETTINGS_MANAGER* JSON_SETTINGS::m_manager
protectedinherited

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

Definition at line 355 of file json_settings.h.

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

◆ m_MaxError

◆ 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 358 of file json_settings.h.

Referenced by Migrate(), and registerMigration().

◆ m_MinClearance

◆ m_MinConn

int BOARD_DESIGN_SETTINGS::m_MinConn

◆ m_MinGrooveWidth

int BOARD_DESIGN_SETTINGS::m_MinGrooveWidth

Definition at line 698 of file board_design_settings.h.

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

◆ m_MinResolvedSpokes

int BOARD_DESIGN_SETTINGS::m_MinResolvedSpokes

◆ m_MinSilkTextHeight

int BOARD_DESIGN_SETTINGS::m_MinSilkTextHeight

◆ m_MinSilkTextThickness

int BOARD_DESIGN_SETTINGS::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 340 of file json_settings.h.

Referenced by JSON_SETTINGS(), LoadFromFile(), ReleaseNestedSettings(), SaveToFile(), and 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 325 of file json_settings.h.

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

◆ m_NetSettings

◆ m_Pad_Master

◆ m_params

std::vector<PARAM_BASE*> JSON_SETTINGS::m_params
protectedinherited

The list of parameters (owned by this object)

Definition at line 322 of file json_settings.h.

Referenced by APP_SETTINGS_BASE::addParamsForWindow(), APP_SETTINGS_BASE::APP_SETTINGS_BASE(), BITMAP2CMP_SETTINGS::BITMAP2CMP_SETTINGS(), BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), COLOR_SETTINGS::COLOR_SETTINGS(), COMMON_SETTINGS::COMMON_SETTINGS(), COMPONENT_CLASS_SETTINGS::COMPONENT_CLASS_SETTINGS(), COLOR_SETTINGS::CreateBuiltinColorSettings(), CVPCB_SETTINGS::CVPCB_SETTINGS(), DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS(), EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS(), EESCHEMA_SETTINGS::EESCHEMA_SETTINGS(), ERC_SETTINGS::ERC_SETTINGS(), FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS(), GERBVIEW_SETTINGS::GERBVIEW_SETTINGS(), COLOR_SETTINGS::GetDefaultColor(), HTTP_LIB_SETTINGS::HTTP_LIB_SETTINGS(), COLOR_SETTINGS::initFromOther(), JOBSET::JOBSET(), JSON_SETTINGS(), KICAD_SETTINGS::KICAD_SETTINGS(), Load(), NET_SETTINGS::NET_SETTINGS(), NGSPICE_SETTINGS::NGSPICE_SETTINGS(), PCB_CALCULATOR_SETTINGS::PCB_CALCULATOR_SETTINGS(), PCBNEW_SETTINGS::PCBNEW_SETTINGS(), PL_EDITOR_SETTINGS::PL_EDITOR_SETTINGS(), PROJECT_FILE::PROJECT_FILE(), PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS(), ResetToDefaults(), PNS::ROUTING_SETTINGS::ROUTING_SETTINGS(), SaveToFile(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), SPICE_SETTINGS::SPICE_SETTINGS(), Store(), SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS(), TIME_DOMAIN_PARAMETERS::TIME_DOMAIN_PARAMETERS(), TOOLBAR_SETTINGS::TOOLBAR_SETTINGS(), and ~JSON_SETTINGS().

◆ 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 BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), LoadFromFile(), NESTED_SETTINGS(), and SaveToFile().

◆ m_PlugViasBack

bool BOARD_DESIGN_SETTINGS::m_PlugViasBack

◆ m_PlugViasFront

bool BOARD_DESIGN_SETTINGS::m_PlugViasFront

◆ 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 346 of file json_settings.h.

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

◆ m_schemaVersion

int JSON_SETTINGS::m_schemaVersion
protectedinherited

Version of this settings schema.

Definition at line 349 of file json_settings.h.

Referenced by JSON_SETTINGS(), LoadFromFile(), NESTED_SETTINGS::LoadFromFile(), Migrate(), registerMigration(), and NESTED_SETTINGS::SaveToFile().

◆ m_SilkClearance

int BOARD_DESIGN_SETTINGS::m_SilkClearance

◆ m_SingleTrackMeanderSettings

◆ m_SkewMeanderSettings

◆ m_SolderMaskExpansion

◆ m_SolderMaskMinWidth

◆ m_SolderMaskToCopperClearance

int BOARD_DESIGN_SETTINGS::m_SolderMaskToCopperClearance

Definition at line 731 of file board_design_settings.h.

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

◆ 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 832 of file board_design_settings.h.

Referenced by GetStackupDescriptor(), 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 685 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

bool BOARD_DESIGN_SETTINGS::m_TentViasBack

◆ m_TentViasFront

bool BOARD_DESIGN_SETTINGS::m_TentViasFront

◆ m_TextItalic

◆ m_TextSize

◆ m_TextThickness

◆ m_TextUpright

◆ m_TrackMinWidth

◆ m_trackWidthIndex

int BOARD_DESIGN_SETTINGS::m_trackWidthIndex
private

◆ m_TrackWidthList

◆ m_UseConnectedTrackWidth

◆ m_useCustomDiffPair

◆ m_useCustomTrackVia

◆ m_UseHeightForLengthCalcs

bool BOARD_DESIGN_SETTINGS::m_UseHeightForLengthCalcs

Enable inclusion of stackup height in track length measurements and length tuning.

Definition at line 793 of file board_design_settings.h.

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

◆ m_userDefinedLayerCount

int BOARD_DESIGN_SETTINGS::m_userDefinedLayerCount
private

Number of user defined layers for this design.

Definition at line 816 of file board_design_settings.h.

Referenced by GetUserDefinedLayerCount(), initFromOther(), operator==(), SetEnabledLayers(), and SetUserDefinedLayerCount().

◆ m_UserLayerNames

std::map<std::string, wxString> BOARD_DESIGN_SETTINGS::m_UserLayerNames

◆ m_ViasDimensionsList

◆ m_viaSizeIndex

int 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 337 of file json_settings.h.

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

◆ m_ZoneKeepExternalFillets

bool BOARD_DESIGN_SETTINGS::m_ZoneKeepExternalFillets

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