![]() |
KiCad PCB EDA Suite
|
Class containing "advanced" configuration options. More...
#include <advanced_config.h>
Static Public Member Functions | |
static const ADVANCED_CFG & | GetCfg () |
Get the singleton instance's config, which is shared by all consumers. More... | |
Public Attributes | |
double | m_DrawArcAccuracy |
Distance from an arc end point and the estimated end point, when rotating from the start point to the end point. More... | |
double | m_DrawArcCenterMaxAngle |
When drawing an arc, the angle ( center - start ) - ( start - end ) can be limited to avoid extremely high radii. More... | |
double | m_MaxTangentAngleDeviation |
Maximum angle between the tangent line of an arc track and a connected straight track in order to commence arc dragging. More... | |
double | m_MaxTrackLengthToKeep |
Maximum track length to keep after doing an arc track resizing operation. More... | |
double | m_ExtraClearance |
Extra fill clearance for zone fills. More... | |
double | m_DRCEpsilon |
Epsilon for DRC tests. More... | |
double | m_HoleWallThickness |
Hole wall plating thickness. More... | |
bool | m_RealTimeConnectivity |
Do real-time connectivity. More... | |
int | m_CoroutineStackSize |
Set the stack size for coroutines. More... | |
bool | m_ShowRouterDebugGraphics |
Show PNS router debug graphics. More... | |
bool | m_CompactSave |
Save files in compact display mode When is is not specified, points are written one per line. More... | |
bool | m_DrawTriangulationOutlines |
When true, strokes the triangulations with visible color. More... | |
bool | m_ExtraZoneDisplayModes |
When true, adds zone-diaplay-modes for stroking the zone fracture boundaries and the zone triangulation. More... | |
double | m_MinPlotPenWidth |
Sets an absolute minimum pen width for plotting. More... | |
bool | m_DebugZoneFiller |
A mode that dumps the various stages of a F_Cu fill into In1_Cu through In9_Cu. More... | |
bool | m_DebugPDFWriter |
A mode that writes PDFs without compression. More... | |
double | m_SmallDrillMarkSize |
The diameter of the drill marks on print and plot outputs (in mm), when the "Drill marks" option is set to "Small mark". More... | |
bool | m_HotkeysDumper |
Enable the hotkeys dumper feature, used for generating documentation. More... | |
bool | m_DrawBoundingBoxes |
Draw GAL bounding boxes in painters. More... | |
bool | m_ShowPcbnewExportNetlist |
Enable exporting board editor netlist to a file for troubleshooting purposes. More... | |
bool | m_Skip3DModelFileCache |
Skip reading/writing 3d model file caches This does not prevent the models from being cached in memory meaning reopening the 3d viewer in the same project session will not reload model data from disk again. More... | |
bool | m_Skip3DModelMemoryCache |
Skip reading/writing 3d model memory caches This ensures 3d models are always reloaded from disk even if we previously opened the 3d viewer. More... | |
bool | m_HideVersionFromTitle |
Hides the build version from the KiCad manager frame title. More... | |
bool | m_ShowRepairSchematic |
bool | m_ShowEventCounters |
Shows debugging event counters in various places. More... | |
bool | m_AllowManualCanvasScale |
Private Member Functions | |
ADVANCED_CFG () | |
void | loadFromConfigFile () |
Load the config from the normal config file. More... | |
void | loadSettings (wxConfigBase &aCfg) |
Class containing "advanced" configuration options.
Options set here are for developer or advanced users only. If a general user needs to set one of these for normal KiCad use, either:
Options in this class are, in general, preferable to #defines, as they allow more flexible configuration by developers, and don't hide code from the compiler on other configurations, which can result in broken builds.
Never use advanced configs in an untestable way. If a function depends on advanced config such that you cannot test it without changing the config, "lift" the config to a higher level and make pass it as parameter of the code under test. The tests can pass their own values as needed.
This also applies to code that does not depend on "common" - it cannot use this class, so you must pass configuration in as proper parameters.
Sometimes you can just use values directly, and sometimes helper functions might be provided to allow extra logic (for example when a advanced config applies only on certain platforms).
For more information on what config keys set these parameters in the config files, and why you might want to set them, see AC_KEYS
Definition at line 58 of file advanced_config.h.
|
private |
Definition at line 257 of file advanced_config.cpp.
References AdvancedConfigMask, AC_STACK::default_stack, loadFromConfigFile(), m_AllowManualCanvasScale, m_CoroutineStackSize, m_DebugPDFWriter, m_DebugZoneFiller, m_DrawArcAccuracy, m_DrawArcCenterMaxAngle, m_DrawBoundingBoxes, m_DrawTriangulationOutlines, m_DRCEpsilon, m_ExtraClearance, m_ExtraZoneDisplayModes, m_HideVersionFromTitle, m_HoleWallThickness, m_HotkeysDumper, m_MaxTangentAngleDeviation, m_MaxTrackLengthToKeep, m_MinPlotPenWidth, m_RealTimeConnectivity, m_ShowEventCounters, m_ShowPcbnewExportNetlist, m_ShowRouterDebugGraphics, m_Skip3DModelFileCache, m_Skip3DModelMemoryCache, and m_SmallDrillMarkSize.
|
static |
Get the singleton instance's config, which is shared by all consumers.
This configuration is read-only - to set options, users should add the parameters to their config files at ~/.config/kicad/advanced, or the platform equivalent.
Definition at line 299 of file advanced_config.cpp.
Referenced by SCH_CONNECTION::AppendInfoToMsgPanel(), SCH_EDITOR_CONTROL::AssignNetclass(), ZONE_FILLER::buildCopperItemClearances(), S3D_CACHE::checkCache(), PDF_PLOTTER::closePdfStream(), COROUTINE< int, const TOOL_EVENT & >::COROUTINE(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), EDIT_TOOL::DragArcTrack(), KIGFX::SCH_PAINTER::Draw(), KIGFX::PCB_PAINTER::Draw(), SCH_EDITOR_CONTROL::DrawSheetOnClipboard(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), EVT_MENU_RANGE(), EVT_UPDATE_UI_RANGE(), PCB_PLUGIN::format(), formatPoly(), BOARD_DESIGN_SETTINGS::GetDRCEpsilon(), ZONE::GetFilledPolysUseThickness(), BOARD_DESIGN_SETTINGS::GetHolePlatingThickness(), ROUTER_TOOL::handleCommonEvents(), SCH_EDITOR_CONTROL::HighlightNetCursor(), HOTKEY_STORE::Init(), PANEL_HOTKEYS_EDITOR::installButtons(), SCH_EDIT_FRAME::KiwayMailIn(), S3D_CACHE::load(), SCH_EDIT_FRAME::OnModify(), PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS(), SCH_EDITOR_CONTROL::Plot(), BRDITEMS_PLOTTER::PlotDrillMarks(), PlotLayerOutlines(), SCH_EDITOR_CONTROL::Print(), KICAD_MANAGER_FRAME::ProjectChanged(), CONNECTION_GRAPH::Recalculate(), SCH_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateOptToolbar(), KIGFX::SCH_RENDER_SETTINGS::SCH_RENDER_SETTINGS(), BOARD_EDITOR_CONTROL::setTransitions(), PCBNEW_PRINTOUT::setupPainter(), PNS_KICAD_IFACE::SetView(), PDF_PLOTTER::startPdfStream(), BUS_UNFOLD_MENU::update(), ZONE_FILLER::ZONE_FILLER(), and PCB_EDIT_FRAME::~PCB_EDIT_FRAME().
|
private |
Load the config from the normal config file.
Definition at line 306 of file advanced_config.cpp.
References AdvancedConfigMask, getAdvancedCfgFilename(), and loadSettings().
Referenced by ADVANCED_CFG().
|
private |
Definition at line 332 of file advanced_config.cpp.
References AC_KEYS::AllowManualCanvasScale, AC_KEYS::CompactFileSave, AC_KEYS::CoroutineStackSize, AC_KEYS::DebugPDFWriter, AC_KEYS::DebugZoneFiller, AC_STACK::default_stack, AC_KEYS::DrawArcAccuracy, AC_KEYS::DrawArcCenterStartEndMaxAngle, AC_KEYS::DrawBoundingBoxes, AC_KEYS::DRCEpsilon, dumpCfg(), AC_KEYS::ExtraFillMargin, AC_KEYS::ExtraZoneDisplayModes, AC_KEYS::HideVersionFromTitle, AC_KEYS::HoleWallThickness, AC_KEYS::HotkeysDumper, m_AllowManualCanvasScale, m_CompactSave, m_CoroutineStackSize, m_DebugPDFWriter, m_DebugZoneFiller, m_DrawArcAccuracy, m_DrawArcCenterMaxAngle, m_DrawBoundingBoxes, m_DrawTriangulationOutlines, m_DRCEpsilon, m_ExtraClearance, m_ExtraZoneDisplayModes, m_HideVersionFromTitle, m_HoleWallThickness, m_HotkeysDumper, m_MaxTangentAngleDeviation, m_MaxTrackLengthToKeep, m_MinPlotPenWidth, m_RealTimeConnectivity, m_ShowEventCounters, m_ShowPcbnewExportNetlist, m_ShowRepairSchematic, m_ShowRouterDebugGraphics, m_Skip3DModelFileCache, m_Skip3DModelMemoryCache, m_SmallDrillMarkSize, AC_STACK::max_stack, AC_KEYS::MaxTangentTrackAngleDeviation, AC_KEYS::MaxTrackLengthToKeep, AC_STACK::min_stack, AC_KEYS::MinPlotPenWidth, AC_KEYS::RealtimeConnectivity, AC_KEYS::ShowEventCounters, AC_KEYS::ShowPcbnewExportNetlist, AC_KEYS::ShowRepairSchematic, AC_KEYS::ShowRouterDebugGraphics, AC_KEYS::Skip3DModelFileCache, AC_KEYS::Skip3DModelMemoryCache, AC_KEYS::SmallDrillMarkSize, AC_KEYS::StrokeTriangulation, AC_KEYS::TraceMasks, and wxConfigLoadSetups().
Referenced by loadFromConfigFile().
bool ADVANCED_CFG::m_AllowManualCanvasScale |
Definition at line 205 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
bool ADVANCED_CFG::m_CompactSave |
Save files in compact display mode When is is not specified, points are written one per line.
Definition at line 129 of file advanced_config.h.
Referenced by PCB_PLUGIN::format(), formatPoly(), and loadSettings().
int ADVANCED_CFG::m_CoroutineStackSize |
Set the stack size for coroutines.
Definition at line 118 of file advanced_config.h.
Referenced by ADVANCED_CFG(), COROUTINE< int, const TOOL_EVENT & >::COROUTINE(), and loadSettings().
bool ADVANCED_CFG::m_DebugPDFWriter |
A mode that writes PDFs without compression.
Definition at line 156 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
bool ADVANCED_CFG::m_DebugZoneFiller |
A mode that dumps the various stages of a F_Cu fill into In1_Cu through In9_Cu.
Definition at line 151 of file advanced_config.h.
Referenced by ADVANCED_CFG(), loadSettings(), and ZONE_FILLER::ZONE_FILLER().
double ADVANCED_CFG::m_DrawArcAccuracy |
Distance from an arc end point and the estimated end point, when rotating from the start point to the end point.
Definition at line 73 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
double ADVANCED_CFG::m_DrawArcCenterMaxAngle |
When drawing an arc, the angle ( center - start ) - ( start - end ) can be limited to avoid extremely high radii.
Definition at line 79 of file advanced_config.h.
Referenced by ADVANCED_CFG(), PCB_POINT_EDITOR::editArcEndpointKeepTangent(), and loadSettings().
bool ADVANCED_CFG::m_DrawBoundingBoxes |
Draw GAL bounding boxes in painters.
Definition at line 172 of file advanced_config.h.
Referenced by ADVANCED_CFG(), KIGFX::SCH_PAINTER::Draw(), and loadSettings().
bool ADVANCED_CFG::m_DrawTriangulationOutlines |
When true, strokes the triangulations with visible color.
Definition at line 134 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
double ADVANCED_CFG::m_DRCEpsilon |
Epsilon for DRC tests.
Note that for zone tests this is essentially additive with m_ExtraClearance. Units are mm.
Definition at line 102 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
double ADVANCED_CFG::m_ExtraClearance |
Extra fill clearance for zone fills.
Note that for zone tests this is essentially additive with m_DRCEpsilon. Units are mm.
Definition at line 96 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
bool ADVANCED_CFG::m_ExtraZoneDisplayModes |
When true, adds zone-diaplay-modes for stroking the zone fracture boundaries and the zone triangulation.
Definition at line 140 of file advanced_config.h.
Referenced by ADVANCED_CFG(), HOTKEY_STORE::Init(), and loadSettings().
bool ADVANCED_CFG::m_HideVersionFromTitle |
Hides the build version from the KiCad manager frame title.
Useful for making screenshots/videos of KiCad without pinning to a specific version.
Definition at line 196 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
double ADVANCED_CFG::m_HoleWallThickness |
Hole wall plating thickness.
Used to determine actual hole size from finish hole size. Units are mm.
Definition at line 108 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
bool ADVANCED_CFG::m_HotkeysDumper |
Enable the hotkeys dumper feature, used for generating documentation.
Definition at line 167 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
double ADVANCED_CFG::m_MaxTangentAngleDeviation |
Maximum angle between the tangent line of an arc track and a connected straight track in order to commence arc dragging.
Units are degrees.
Definition at line 85 of file advanced_config.h.
Referenced by ADVANCED_CFG(), EDIT_TOOL::DragArcTrack(), and loadSettings().
double ADVANCED_CFG::m_MaxTrackLengthToKeep |
Maximum track length to keep after doing an arc track resizing operation.
Units are mm.
Definition at line 90 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
double ADVANCED_CFG::m_MinPlotPenWidth |
Sets an absolute minimum pen width for plotting.
Some formats (PDF, for example) don't like ultra-thin lines. Units are mm.
Definition at line 146 of file advanced_config.h.
Referenced by ADVANCED_CFG(), loadSettings(), and KIGFX::SCH_RENDER_SETTINGS::SCH_RENDER_SETTINGS().
bool ADVANCED_CFG::m_RealTimeConnectivity |
Do real-time connectivity.
Definition at line 113 of file advanced_config.h.
Referenced by ADVANCED_CFG(), SCH_EDITOR_CONTROL::AssignNetclass(), and loadSettings().
bool ADVANCED_CFG::m_ShowEventCounters |
Shows debugging event counters in various places.
Definition at line 203 of file advanced_config.h.
Referenced by ADVANCED_CFG(), EVT_UPDATE_UI_RANGE(), and loadSettings().
bool ADVANCED_CFG::m_ShowPcbnewExportNetlist |
Enable exporting board editor netlist to a file for troubleshooting purposes.
Definition at line 177 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
bool ADVANCED_CFG::m_ShowRepairSchematic |
Definition at line 198 of file advanced_config.h.
Referenced by loadSettings().
bool ADVANCED_CFG::m_ShowRouterDebugGraphics |
Show PNS router debug graphics.
Definition at line 123 of file advanced_config.h.
Referenced by ADVANCED_CFG(), ROUTER_TOOL::handleCommonEvents(), and loadSettings().
bool ADVANCED_CFG::m_Skip3DModelFileCache |
Skip reading/writing 3d model file caches This does not prevent the models from being cached in memory meaning reopening the 3d viewer in the same project session will not reload model data from disk again.
Definition at line 184 of file advanced_config.h.
Referenced by ADVANCED_CFG(), and loadSettings().
bool ADVANCED_CFG::m_Skip3DModelMemoryCache |
Skip reading/writing 3d model memory caches This ensures 3d models are always reloaded from disk even if we previously opened the 3d viewer.
Definition at line 190 of file advanced_config.h.
Referenced by ADVANCED_CFG(), S3D_CACHE::load(), and loadSettings().
double ADVANCED_CFG::m_SmallDrillMarkSize |
The diameter of the drill marks on print and plot outputs (in mm), when the "Drill marks" option is set to "Small mark".
Definition at line 162 of file advanced_config.h.
Referenced by ADVANCED_CFG(), loadSettings(), and PlotLayerOutlines().