31#include <wx/filename.h>
33#include <wx/tokenzr.h>
215 wxString s = aParam.
m_Ident + wxS(
": " );
226 s << *static_cast<const PARAM_CFG_INT&>( aParam ).m_Pt_param;
229 s << *static_cast<const PARAM_CFG_DOUBLE&>( aParam ).m_Pt_param;
232 s << *static_cast<const PARAM_CFG_WXSTRING&>( aParam ).m_Pt_param;
235 s << *static_cast<const PARAM_CFG_FILENAME&>( aParam ).m_Pt_param;
238 s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? wxS(
"true" ) : wxS(
"false" ) );
240 default: s << wxS(
"Unsupported PARAM_CFG variant: " ) << aParam.
m_Type;
250static void dumpCfg(
const std::vector<PARAM_CFG*>& aArray )
270 const static wxString cfg_filename{ wxS(
"kicad_advanced" ) };
343 if( !k_advanced.FileExists() )
345 wxLogTrace(
AdvancedConfigMask, wxS(
"File does not exist %s" ), k_advanced.GetFullPath() );
348 wxConfig emptyConfig;
354 wxLogTrace(
AdvancedConfigMask, wxS(
"Loading advanced config from: %s" ), k_advanced.GetFullPath() );
356 wxFileConfig file_cfg( wxS(
"" ), wxS(
"" ), k_advanced.GetFullPath() );
363 std::vector<PARAM_CFG*> configParams;
455 0, std::numeric_limits<int>::max(),
480 wxStringTokenizer traceMaskTokenizer( traceMasks, wxS(
"," ) );
482 while( traceMaskTokenizer.HasMoreTokens() )
484 wxString mask = traceMaskTokenizer.GetNextToken();
485 wxLog::AddTraceMask( mask );
static void dumpCfg(const std::vector< PARAM_CFG * > &aArray)
Dump the configs in the given array to trace.
wxString dumpParamCfg(const PARAM_CFG &aParam)
static const wxChar AdvancedConfigMask[]
static wxFileName getAdvancedCfgFilename()
Get the filename for the advanced config file.
Class containing "advanced" configuration options.
bool m_Skip3DModelFileCache
Skip reading/writing 3d model file caches This does not prevent the models from being cached in memor...
bool m_ShowRepairSchematic
double m_DrawArcCenterMaxAngle
When drawing an arc, the angle ( center - start ) - ( start - end ) can be limited to avoid extremely...
double m_MaxTangentAngleDeviation
Maximum angle between the tangent line of an arc track and a connected straight track in order to com...
bool m_ShowRouterDebugGraphics
Show PNS router debug graphics.
bool m_Skip3DModelMemoryCache
Skip reading/writing 3d model memory caches This ensures 3d models are always reloaded from disk even...
void loadFromConfigFile()
Load the config from the normal config file.
double m_HoleWallThickness
Hole wall plating thickness.
int m_CoroutineStackSize
Set the stack size for coroutines.
bool m_UseClipper2
User Clipper2 instead of Clipper1.
double m_SmallDrillMarkSize
The diameter of the drill marks on print and plot outputs (in mm), when the "Drill marks" option is s...
bool m_ShowPropertiesPanel
Show the properties panel in applications that it hasn't been fully released for.
double m_ExtraClearance
Extra fill clearance for zone fills.
bool m_DrawBoundingBoxes
Draw GAL bounding boxes in painters.
double m_DRCEpsilon
Epsilon for DRC tests.
double m_SliverAngleTolerance
bool m_AllowManualCanvasScale
double m_SliverWidthTolerance
Sliver tolerances for DRC.
bool m_ExtraZoneDisplayModes
When true, adds zone-diaplay-modes for stroking the zone fracture boundaries and the zone triangulati...
double m_MinPlotPenWidth
Sets an absolute minimum pen width for plotting.
double m_SliverMinimumLength
double m_MaxTrackLengthToKeep
Maximum track length to keep after doing an arc track resizing operation.
double m_DrawArcAccuracy
Distance from an arc end point and the estimated end point, when rotating from the start point to the...
bool m_HotkeysDumper
Enable the hotkeys dumper feature, used for generating documentation.
int m_UpdateUIEventInterval
The update interval the wxWidgets sends wxUpdateUIEvents to windows.
void loadSettings(wxConfigBase &aCfg)
double m_3DRT_BevelExtentFactor
3D-Viewer, Raytracing Factor applied to Extent.z of the item layer, used on calculation of the bevel'...
bool m_ShowPcbnewExportNetlist
Enable exporting board editor netlist to a file for troubleshooting purposes.
bool m_DebugPDFWriter
A mode that writes PDFs without compression.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
bool m_ShowEventCounters
Shows debugging event counters in various places.
bool m_DrawTriangulationOutlines
When true, strokes the triangulations with visible color.
int m_3DRT_BevelHeight_um
3D-Viewer, Raytracing Bevel height of layer items.
bool m_CompactSave
Save files in compact display mode When is is not specified, points are written one per line.
bool m_HideVersionFromTitle
Hides the build version from the KiCad manager frame title.
bool m_DebugZoneFiller
A mode that dumps the various stages of a F_Cu fill into In1_Cu through In9_Cu.
Configuration object for booleans.
Configuration object for double precision floating point numbers.
Configuration object for integers.
Configuration object for wxString objects.
A base class which establishes the interface functions ReadParam and SaveParam, which are implemented...
paramcfg_id m_Type
Type of parameter.
wxString m_Ident
Keyword in config data.
static wxString GetUserSettingsPath()
Return the user configuration path used to store KiCad's configuration files.
void wxConfigLoadSetups(wxConfigBase *aCfg, const std::vector< PARAM_CFG * > &aList)
Use aList of PARAM_CFG object to load configuration values from aCfg.
List of known groups for advanced configuration options.
static const wxChar V3D_RayTracing[]
List of known keys for advanced configuration options.
static const wxChar DebugPDFWriter[]
static const wxChar HotkeysDumper[]
static const wxChar ShowRepairSchematic[]
static const wxChar HideVersionFromTitle[]
static const wxChar ShowPropertiesPanel[]
static const wxChar AllowManualCanvasScale[]
static const wxChar MaxTangentTrackAngleDeviation[]
For arc track interactive drag-resizing Maximum angle between the tangent line of an arc track and a ...
static const wxChar MaxTrackLengthToKeep[]
For arc track interactive drag-resizing Maximum track length to keep after doing an arc track resizin...
static const wxChar ShowPcbnewExportNetlist[]
static const wxChar UseClipper2[]
static const wxChar DrawBoundingBoxes[]
static const wxChar MinPlotPenWidth[]
Absolute minimum pen width to send to the plotter.
static const wxChar CoroutineStackSize[]
Configure the coroutine stack size in bytes.
static const wxChar HoleWallThickness[]
Used to calculate the actual hole size from the finish hole size.
static const wxChar DRCSliverWidthTolerance[]
Angle and width tolerances for copper and solder mask sliver detection.
static const wxChar DebugZoneFiller[]
static const wxChar StrokeTriangulation[]
When true, GAL will stroke the triangulations (only used in OpenGL) with a visible color.
static const wxChar CompactFileSave[]
When set to true, this will wrap polygon point sets at 4 points per line rather than a single point p...
static const wxChar DRCSliverAngleTolerance[]
static const wxChar UpdateUIEventInterval[]
static const wxChar V3DRT_BevelHeight_um[]
static const wxChar ShowRouterDebugGraphics[]
Show PNS router debug graphics while routing.
static const wxChar DRCEpsilon[]
A fudge factor for DRC.
static const wxChar V3DRT_BevelExtentFactor[]
static const wxChar DrawArcAccuracy[]
For drawsegments - arcs.
static const wxChar Skip3DModelMemoryCache[]
static const wxChar ExtraZoneDisplayModes[]
When true, a third zone-display-mode is included which strokes the filled areas and fracture boundari...
static const wxChar Skip3DModelFileCache[]
static const wxChar SmallDrillMarkSize[]
The diameter of the drill marks on print and plot outputs (in mm), when the "Drill marks" option is s...
static const wxChar DrawArcCenterStartEndMaxAngle[]
For drawsegments - arcs.
static const wxChar ExtraFillMargin[]
When filling zones, we add an extra amount of clearance to each zone to ensure that rounding errors d...
static const wxChar DRCSliverMinimumLength[]
static const wxChar ShowEventCounters[]
static const wxChar TraceMasks[]
Limits and default settings for the coroutine stack size allowed.
static constexpr int min_stack
static constexpr int max_stack
static constexpr int default_stack