22#include <dialogs/dialog_bom_cfg_lexer.h>
40using namespace T_BOMCFG_T;
50 {
"name",
"bom_csv_grouped_extra" },
51 {
"path",
"bom_csv_grouped_extra.py" }
54 {
"name",
"bom_csv_grouped_by_value" },
55 {
"path",
"bom_csv_grouped_by_value.py" }
58 {
"name",
"bom_csv_grouped_by_value_with_fp" },
59 {
"path",
"bom_csv_grouped_by_value_with_fp.py" }
66 static wxAuiPaneInfo paneInfo;
68 paneInfo.Name( wxS(
"NetNavigator" ) )
69 .Caption(
_(
"Net Navigator" ) )
70 .CaptionVisible(
true )
72 .Left().Layer( 3 ).Position( 0 )
74 .BottomDockable(
false )
78 .FloatingSize( 200, 200 )
79 .FloatingPosition( 50, 200 )
88 static wxAuiPaneInfo paneInfo;
91 .Caption(
_(
"Properties" ) )
92 .CaptionVisible(
true )
94 .Left().Layer( 3 ).Position( 2 )
96 .BottomDockable(
false )
98 .MinSize( aWindow->FromDIP( wxSize( 240, 60 ) ) )
99 .BestSize( aWindow->FromDIP( wxSize( 300, 200 ) ) )
100 .FloatingSize( aWindow->FromDIP( wxSize( 300, 400 ) ) )
101 .FloatingPosition( aWindow->FromDIP( wxPoint( 50, 200 ) ) )
110 static wxAuiPaneInfo paneInfo;
112 paneInfo.Name( wxS(
"SelectionFilter" ) )
113 .Caption(
_(
"Selection Filter" ) )
114 .CaptionVisible(
true )
116 .Left().Layer( 3 ).Position( 4 )
117 .TopDockable(
false )
118 .BottomDockable(
false )
121 .MinSize( aWindow->FromDIP( wxSize( 180, -1 ) ) )
122 .BestSize( aWindow->FromDIP( wxSize( 180, -1 ) ) )
131 static wxAuiPaneInfo paneInfo;
134 .Caption(
_(
"Design Blocks" ) )
135 .CaptionVisible(
true )
137 .Right().Layer( 3 ).Position( 2 )
138 .TopDockable(
false )
139 .BottomDockable(
false )
141 .MinSize( aWindow->FromDIP( wxSize( 240, 60 ) ) )
142 .BestSize( aWindow->FromDIP( wxSize( 300, 200 ) ) )
143 .FloatingSize( aWindow->FromDIP( wxSize( 800, 600 ) ) )
144 .FloatingPosition( aWindow->FromDIP( wxPoint( 50, 200 ) ) )
153 static wxAuiPaneInfo paneInfo;
156 .Caption(
_(
"Remote Symbols" ) )
157 .CaptionVisible(
true )
159 .Right().Layer( 3 ).Position( 3 )
160 .TopDockable(
false )
161 .BottomDockable(
false )
163 .MinSize( aWindow->FromDIP( wxSize( 240, 60 ) ) )
164 .BestSize( aWindow->FromDIP( wxSize( 300, 200 ) ) )
165 .FloatingSize( aWindow->FromDIP( wxSize( 800, 600 ) ) )
166 .FloatingPosition( aWindow->FromDIP( wxPoint( 80, 220 ) ) )
241 &
m_Appearance.show_sexpr_file_convert_warning,
true ) );
243 m_params.emplace_back(
new PARAM<bool>(
"appearance.show_sheet_filename_case_sensitivity_dialog",
244 &
m_Appearance.show_sheet_filename_case_sensitivity_dialog,
true ) );
253 &
m_AuiPanels.hierarchy_panel_docked_height, -1 ) );
265 &
m_AuiPanels.design_blocks_panel_docked_width, -1 ) );
268 &
m_AuiPanels.design_blocks_panel_float_width, -1 ) );
271 &
m_AuiPanels.design_blocks_panel_float_height, -1 ) );
277 &
m_AuiPanels.remote_symbol_panel_docked_width, -1 ) );
280 &
m_AuiPanels.remote_symbol_panel_float_width, -1 ) );
283 &
m_AuiPanels.remote_symbol_panel_float_height, -1 ) );
307 &
m_AuiPanels.net_nav_panel_docked_size, wxSize( 120, -1 ) ) );
310 &
m_AuiPanels.net_nav_panel_float_pos, wxPoint( 50, 200 ),
false ) );
313 &
m_AuiPanels.net_nav_panel_float_size, wxSize( 200, 200 ) ) );
316 &
m_AuiPanels.net_nav_search_mode_wildcard,
true ) );
369 &
m_Drawing.default_repeat_offset_x, 0 ) );
372 &
m_Drawing.default_repeat_offset_y, 100 ) );
384 reinterpret_cast<int*
>( &
m_Drawing.arc_edit_mode ),
393 &
m_Drawing.auto_place_sheet_pins,
true ) );
396 &
m_Drawing.repeat_label_increment, 1 ) );
408 &
m_Drawing.intersheets_ref_show,
false ) );
411 &
m_Drawing.intersheets_ref_own_page,
true ) );
414 &
m_Drawing.intersheets_ref_short,
false ) );
423 &
m_Drawing.junction_size_choice, 3, 0, 5 ) );
426 &
m_Drawing.hop_over_size_choice, 0, 0, 5 ) );
444 &
m_Input.drag_is_move,
false ) );
447 &
m_Input.allow_unconstrained_pin_swaps,
false ) );
450 &
m_Input.esc_clears_net_highlight,
true ) );
470 m_params.emplace_back(
new PARAM<int>(
"selection.highlight_netclass_colors_thickness",
471 &
m_Selection.highlight_netclass_colors_thickness, 15, 0, 50 ) );
474 &
m_Selection.highlight_netclass_colors_alpha, 0.6, 0, 1 ) );
477 &
m_Selection.drag_net_collision_width, 4, 1, 50 ) );
503 [&](
const nlohmann::json& aObj )
505 if( !aObj.is_array() )
508 const nlohmann::json& list = aObj.empty() ? defaultBomPlugins : aObj;
510 m_BomPanel.plugins = bomSettingsFromJson( list );
516 [&](
const nlohmann::json& aObj )
518 if( !aObj.is_array() )
524 const nlohmann::json& list = aObj;
526 m_NetlistPanel.plugins = netlistSettingsFromJson( list );
602 &
m_Simulator.view.measurements_panel_height, 0 ) );
611 &
m_Simulator.preferences.mouse_wheel_actions.vertical_unmodified,
616 &
m_Simulator.preferences.mouse_wheel_actions.vertical_with_ctrl,
621 &
m_Simulator.preferences.mouse_wheel_actions.vertical_with_shift,
626 &
m_Simulator.preferences.mouse_wheel_actions.vertical_with_alt,
698 if( std::optional<int> optval =
Get<int>(
"lib_tree.column_width" ) )
701 Set(
"lib_tree.column_width", 300 );
724 if( std::optional<wxString> fieldNames =
Get<wxString>(
"drawing.field_names" ) )
732 && !fieldNames->IsEmpty() )
735 pgm->GetSettingsManager().SyncGlobalFieldNameTemplatesToProjects();
736 pgm->GetSettingsManager().Save( commonSettings );
741 if(
Contains(
"drawing.field_names" ) )
742 At(
"drawing" ).erase(
"field_names" );
755 std::string gridSizePtr =
"window.grid.last_size";
757 if( std::optional<int> currentSize =
Get<int>( gridSizePtr ) )
759 Set( gridSizePtr, *currentSize - 4 );
764 Set( gridSizePtr, 1 );
767 ret &=
fromLegacy<bool>( aCfg,
"FootprintPreview",
"appearance.footprint_preview" );
768 ret &=
fromLegacy<bool>( aCfg,
"NavigatorStaysOpen",
"appearance.navigator_stays_open" );
769 ret &=
fromLegacy<bool>( aCfg,
"PrintSheetReferenceAndTitleBlock",
"appearance.print_sheet_reference" );
770 ret &=
fromLegacy<bool>( aCfg,
"ShowHiddenPins",
"appearance.show_hidden_pins" );
771 ret &=
fromLegacy<bool>( aCfg,
"ShowIllegalSymbolLibDialog",
"appearance.show_illegal_symbol_lib_dialog" );
772 ret &=
fromLegacy<bool>( aCfg,
"ShowPageLimits",
"appearance.show_page_limits" );
773 ret &=
fromLegacy<bool>( aCfg,
"ShowSheetFileNameCaseSensitivityDlg",
"appearance.show_sheet_filename_case_sensitivity_dialog" );
775 ret &=
fromLegacy<bool>( aCfg,
"AutoplaceFields",
"autoplace_fields.enable" );
776 ret &=
fromLegacy<bool>( aCfg,
"AutoplaceJustify",
"autoplace_fields.allow_rejustify" );
777 ret &=
fromLegacy<bool>( aCfg,
"AutoplaceAlign",
"autoplace_fields.align_to_grid" );
779 ret &=
fromLegacy<int>( aCfg,
"DefaultBusWidth",
"drawing.default_bus_thickness" );
780 ret &=
fromLegacy<int>( aCfg,
"DefaultJunctionSize",
"drawing.default_junction_size" );
781 ret &=
fromLegacy<int>( aCfg,
"DefaultDrawLineWidth",
"drawing.default_line_thickness" );
782 ret &=
fromLegacy<int>( aCfg,
"RepeatStepX",
"drawing.default_repeat_offset_x" );
783 ret &=
fromLegacy<int>( aCfg,
"RepeatStepY",
"drawing.default_repeat_offset_y" );
784 ret &=
fromLegacy<int>( aCfg,
"DefaultWireWidth",
"drawing.default_wire_thickness" );
790 ret &=
fromLegacy<int>( aCfg,
"RepeatLabelIncrement",
"drawing.repeat_label_increment" );
794 ret &=
fromLegacy<int>( aCfg,
"SelectionThickness",
"selection.thickness" );
795 ret &=
fromLegacy<bool>( aCfg,
"SelectionDrawChildItems",
"selection.draw_selected_children" );
796 ret &=
fromLegacy<bool>( aCfg,
"SelectionFillShapes",
"selection.fill_shapes" );
797 ret &=
fromLegacy<bool>( aCfg,
"SelectPinSelectSymbolOpt",
"selection.select_pin_selects_symbol" );
799 ret &=
fromLegacy<int>( aCfg,
"AnnotateFilterMsg",
"annotation.messages_filter" );
801 ret &=
fromLegacyString( aCfg,
"bom_plugin_selected",
"bom.selected_plugin" );
806 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportRevision",
"page_settings.export_revision" );
807 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportDate",
"page_settings.export_date" );
808 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportTitle",
"page_settings.export_title" );
809 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportCompany",
"page_settings.export_company" );
810 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment1",
"page_settings.export_comment1" );
811 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment2",
"page_settings.export_comment2" );
812 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment3",
"page_settings.export_comment3" );
813 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment4",
"page_settings.export_comment4" );
814 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment5",
"page_settings.export_comment5" );
815 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment6",
"page_settings.export_comment6" );
816 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment7",
"page_settings.export_comment7" );
817 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment8",
"page_settings.export_comment8" );
818 ret &=
fromLegacy<bool>( aCfg,
"PageSettingsExportComment9",
"page_settings.export_comment9" );
822 constexpr int max_custom_commands = 8;
823 nlohmann::json js_cmd = nlohmann::json::array();
824 nlohmann::json js_title = nlohmann::json::array();
825 wxString cmd_key, title_key, cmd, title;
827 for(
int i = 1; i <= max_custom_commands; ++i )
830 cmd_key.Printf(
"CustomNetlistCommand%d", i );
831 title_key.Printf(
"CustomNetlistTitle%d", i );
833 if( aCfg->Read( cmd_key, &cmd ) && aCfg->Read( title_key, &title )
834 && !cmd.IsEmpty() && !title.IsEmpty() )
836 js_cmd.push_back( cmd.ToUTF8() );
837 js_title.push_back( title.ToUTF8() );
841 Set(
"netlist.custom_command_titles", js_title );
842 Set(
"netlist.custom_command_paths", js_cmd );
851 aCfg->SetPath(
"SymbolFieldEditor/Show/" );
853 nlohmann::json js = nlohmann::json( {} );
858 while( aCfg->GetNextEntry( key,
index ) )
860 if( aCfg->Read( key, &value ) )
862 std::string key_utf( key.ToUTF8() );
866 js[ std::move( key_utf ) ] = value;
875 Set(
"field_editor.fields_show", js );
877 aCfg->SetPath(
"../GroupBy" );
879 while( aCfg->GetNextEntry( key,
index ) )
881 if( aCfg->Read( key, &value ) )
883 std::string key_utf( key.ToUTF8() );
887 js[ std::move( key_utf ) ] = value;
896 Set(
"field_editor.fields_group_by", js );
898 aCfg->SetPath(
"../.." );
905 ret &=
fromLegacy<int>( aCfg,
"SIM_PLOT_FRAMEPos_x",
"simulator.window.pos_x" );
906 ret &=
fromLegacy<int>( aCfg,
"SIM_PLOT_FRAMEPos_y",
"simulator.window.pos_y" );
907 ret &=
fromLegacy<int>( aCfg,
"SIM_PLOT_FRAMESize_x",
"simulator.window.size_x" );
908 ret &=
fromLegacy<int>( aCfg,
"SIM_PLOT_FRAMESize_y",
"simulator.window.size_y" );
909 ret &=
fromLegacy<bool>( aCfg,
"SIM_PLOT_FRAMEMaximized",
"simulator.window.maximized" );
910 ret &=
fromLegacyString( aCfg,
"SIM_PLOT_FRAMEPerspective",
"simulator.window.perspective" );
911 ret &=
fromLegacyString( aCfg,
"SIM_PLOT_FRAMEMostRecentlyUsedPath",
"simulator.mru_path" );
912 ret &=
fromLegacy<int>( aCfg,
"SimPlotPanelWidth",
"simulator.plot_panel_width" );
913 ret &=
fromLegacy<int>( aCfg,
"SimPlotPanelHeight",
"simulator.plot_panel_height" );
914 ret &=
fromLegacy<int>( aCfg,
"SimSignalPanelHeight",
"simulator.signal_panel_height" );
915 ret &=
fromLegacy<int>( aCfg,
"SimCursorsPanelHeight",
"simulator.cursors_panel_height" );
916 ret &=
fromLegacy<bool>( aCfg,
"SimPlotWhiteBg",
"simulator.white_background" );
918 ret &=
fromLegacy<int>( aCfg,
"SymbolChooserHSashPosition",
"symbol_chooser.sash_pos_h" );
919 ret &=
fromLegacy<int>( aCfg,
"SymbolChooserVSashPosition",
"symbol_chooser.sash_pos_v" );
920 ret &=
fromLegacy<int>( aCfg,
"SymbolChooserWidth",
"symbol_chooser.width" );
921 ret &=
fromLegacy<int>( aCfg,
"SymbolChooserHeight",
"symbol_chooser.height" );
923 const std::string vlf =
"ViewlibFrame";
924 ret &=
fromLegacy<bool>( aCfg, vlf +
"Maximized",
"lib_view.window.maximized" );
925 ret &=
fromLegacyString( aCfg, vlf +
"MostRecentlyUsedPath",
"lib_view.window.mru_path" );
926 ret &=
fromLegacy<int>( aCfg, vlf +
"Size_x",
"lib_view.window.size_x" );
927 ret &=
fromLegacy<int>( aCfg, vlf +
"Size_y",
"lib_view.window.size_y" );
928 ret &=
fromLegacyString( aCfg, vlf +
"Perspective",
"lib_view.window.perspective" );
929 ret &=
fromLegacy<int>( aCfg, vlf +
"Pos_x",
"lib_view.window.pos_x" );
930 ret &=
fromLegacy<int>( aCfg, vlf +
"Pos_y",
"lib_view.window.pos_y" );
931 ret &=
fromLegacy<int>( aCfg,
"ViewLiblistWidth",
"lib_view.lib_list_width" );
932 ret &=
fromLegacy<int>( aCfg,
"ViewCmplistWidth",
"lib_view.cmp_list_width" );
934 "ViewCmpShowPinElectricalType",
"lib_view.show_pin_electrical_type" );
936 ret &=
fromLegacy<int>( aCfg, vlf +
"_LastGridSize",
"lib_view.grid.last_size" );
938 ret &=
fromLegacy<bool>( aCfg,
"RescueNeverShow",
"system.never_show_rescue_dialog" );
943 if( aCfg->Read(
"MoveWarpsCursor", &tmp ) )
949 auto migrateLegacyColor =
950 [&] (
const std::string& aKey,
int aLayerId )
954 if( aCfg->Read( aKey, &str ) )
962 migrateLegacyColor(
"Color4DBusEx",
LAYER_BUS );
974 migrateLegacyColor(
"Color4DNoteEx",
LAYER_NOTES );
975 migrateLegacyColor(
"Color4DPinEx",
LAYER_PIN );
980 migrateLegacyColor(
"Color4DSheetEx",
LAYER_SHEET );
985 migrateLegacyColor(
"Color4DWireEx",
LAYER_WIRE );
997 sym_edit_cfg->MigrateFromLegacy( aCfg );
998 sym_edit_cfg->Load();
1014 BOM_CFG_PARSER( std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS>* aPluginList,
1015 const char* aData,
const wxString& aSource );
1057 nlohmann::json js = nlohmann::json::array();
1061 nlohmann::json pluginJson;
1063 pluginJson[
"name"] = plugin.
name.ToUTF8();
1064 pluginJson[
"path"] = plugin.
path.ToUTF8();
1065 pluginJson[
"command"] = plugin.
command.ToUTF8();
1067 js.push_back( pluginJson );
1075 const nlohmann::json& aObj )
1077 std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS> ret;
1079 wxASSERT( aObj.is_array() );
1081 for(
const nlohmann::json& entry : aObj )
1083 if( entry.empty() || !entry.is_object() )
1086 if( !entry.contains(
"name" ) || !entry.contains(
"path" ) )
1090 entry.at(
"path" ).get<wxString>() );
1092 if( entry.contains(
"command" ) )
1093 plugin.
command = entry.at(
"command" ).get<wxString>();
1095 ret.emplace_back( plugin );
1104 nlohmann::json js = nlohmann::json::array();
1108 nlohmann::json pluginJson;
1110 pluginJson[
"name"] = plugin.
name.ToUTF8();
1111 pluginJson[
"path"] = plugin.
path.ToUTF8();
1112 pluginJson[
"command"] = plugin.
command.ToUTF8();
1114 js.push_back( pluginJson );
1122 const nlohmann::json& aObj )
1124 std::vector<EESCHEMA_SETTINGS::NETLIST_PLUGIN_SETTINGS> ret;
1126 wxASSERT( aObj.is_array() );
1128 for(
const nlohmann::json& entry : aObj )
1130 if( entry.empty() || !entry.is_object() )
1133 if( !entry.contains(
"name" ) || !entry.contains(
"path" ) )
1137 entry.at(
"path" ).get<wxString>() );
1139 if( entry.contains(
"command" ) )
1140 plugin.
command = entry.at(
"command" ).get<wxString>();
1142 ret.emplace_back( plugin );
1150 const char* aLine,
const wxString& aSource ) :
1151 DIALOG_BOM_CFG_LEXER( aLine, aSource )
1153 wxASSERT( aPluginList );
1162 while( ( token = NextTok() ) != T_RIGHT )
1167 if( token == T_LEFT )
1170 if( token == T_plugins )
1192 NeedSYMBOLorNUMBER();
1193 settings.
path = FromUTF8();
1197 while( ( token = NextTok() ) != T_RIGHT )
1208 NeedSYMBOLorNUMBER();
1210 settings.
command = FromUTF8();
1217 NeedSYMBOLorNUMBER();
1219 wxString option = FromUTF8();
1221 if( option.StartsWith( wxS(
"nickname=" ), &str ) )
1222 settings.
name = str;
1229 Unexpected( CurText() );
@ KEEP_CENTER_ADJUST_ANGLE_RADIUS
When editing endpoints, the angle and radius are adjusted.
APP_SETTINGS_BASE(const std::string &aFilename, int aSchemaVersion)
void addParamsForWindow(WINDOW_SETTINGS *aWindow, const std::string &aJsonPath, int aDefaultWidth=0, int aDefaultHeight=0)
Add parameters for the given window object.
virtual bool MigrateFromLegacy(wxConfigBase *aCfg) override
Migrates from wxConfig to JSON-based configuration.
bool migrateLibTreeWidth()
Migrate the library tree width setting from a single column (Item) to multi-column.
Used for parsing legacy-format bom plugin configurations.
BOM_CFG_PARSER(std::vector< EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS > *aPluginList, const char *aData, const wxString &aSource)
std::vector< EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS > * m_pluginList
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Color settings are a bit different than most of the settings objects in that there can be more than o...
void SetColor(int aLayer, const COLOR4D &aColor)
TEMPLATES m_FieldNameTemplates
Global field name templates shared by all project editors.
static const wxString PropertiesPaneName()
static const wxString RemoteSymbolPaneName()
static const wxString DesignBlocksPaneName()
PANEL_ANNOTATE m_AnnotatePanel
static std::vector< BOM_PLUGIN_SETTINGS > DefaultBomPlugins()
bool migrateFieldNameTemplates()
FIELDS_TABLE_SETTINGS m_FieldEditorPanel
bool migrateBomSettings()
PANEL_NETLIST m_NetlistPanel
nlohmann::json bomSettingsToJson() const
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
DIALOG_CHANGE_SYMBOLS m_ChangeSymbols
SNAP_INFERENCE_SETTINGS m_SnapInference
nlohmann::json netlistSettingsToJson() const
PANEL_SYM_CHOOSER m_SymChooserPanel
PAGE_SETTINGS m_PageSettings
static std::vector< BOM_PLUGIN_SETTINGS > bomSettingsFromJson(const nlohmann::json &aObj)
REMOTE_PROVIDER_SETTINGS m_RemoteSymbol
FIND_REPLACE_EXTRA m_FindReplaceExtra
wxString m_lastSymbolLibDir
PANEL_LIB_VIEW m_LibViewPanel
AUTOPLACE_FIELDS m_AutoplaceFields
static std::vector< NETLIST_PLUGIN_SETTINGS > netlistSettingsFromJson(const nlohmann::json &aObj)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
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 fromLegacy(wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
Translates a legacy wxConfig value to a given JSON pointer value.
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 l...
bool Contains(const std::string &aPath) const
std::optional< ValueType > Get(const std::string &aPath) const
Fetches a value from within the JSON document.
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
void registerMigration(int aOldSchemaVersion, int aNewSchemaVersion, std::function< bool(void)> aMigrator)
Registers a migration from one schema version to another.
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 function...
wxString GetFilename() const
A color representation with 4 components: red, green, blue, alpha.
Stores an enum as an integer.
Like a normal param, but with custom getter and setter functions.
Represents a map of <std::string, Value>.
Container for data for KiCad programs.
virtual COMMON_SETTINGS * GetCommonSettings() const
virtual SETTINGS_MANAGER & GetSettingsManager() const
void SaveColorSettings(COLOR_SETTINGS *aSettings, const std::string &aNamespace="")
Safely save a COLOR_SETTINGS to disk, preserving any changes outside the given namespace.
COLOR_SETTINGS * GetMigratedColorSettings()
Return a color theme for storing colors migrated from legacy (5.x and earlier) settings,...
void AddTemplateFieldNames(const wxString &aSerializedFieldNames, SCOPE aScope)
Add a serialized list of template field names.
const std::vector< TEMPLATE_FIELDNAME > & GetTemplateFieldNames(SCOPE aScope)
Return a specific list (global or project) for read only access.
#define DEFAULT_BUS_WIDTH_MILS
The default bus width in mils. (can be changed in preference menu)
#define DEFAULT_IREF_PREFIX
The intersheets references prefix string.
#define DEFAULT_JUNCTION_DIAM
The default junction diameter in mils. (can be changed in preference menu)
#define DEFAULT_WIRE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
#define DEFAULT_LINE_WIDTH_MILS
The default line width in mils. (can be changed in preference menu)
#define DEFAULT_IREF_SUFFIX
The intersheets references suffix string.
#define DEFAULT_TEXT_SIZE
The default text size in mils. (can be changed in preference menu)
const nlohmann::json defaultBomPlugins
Default value for bom.plugins.
const wxAuiPaneInfo & defaultSchSelectionFilterPaneInfo(wxWindow *aWindow)
const wxAuiPaneInfo & defaultPropertiesPaneInfo(wxWindow *aWindow)
const wxAuiPaneInfo & defaultNetNavigatorPaneInfo()
const int eeschemaSchemaVersion
Update the schema version whenever a migration is required.
const wxAuiPaneInfo & defaultDesignBlocksPaneInfo(wxWindow *aWindow)
const wxAuiPaneInfo & defaultRemoteSymbolPaneInfo(wxWindow *aWindow)
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
@ LAYER_DEVICE_BACKGROUND
@ LAYER_SCHEMATIC_DRAWINGSHEET
@ LAYER_SELECTION_SHADOWS
@ LAYER_SCHEMATIC_BACKGROUND
PGM_BASE & Pgm()
The global program "get" accessor.
PGM_BASE * PgmOrNull()
Return a reference that can be nullptr when running a shared lib from a script, not from a kicad app.
T * GetAppSettings(const char *aFilename)
void AddSnapInferenceParams(std::vector< PARAM_BASE * > &aParams, SNAP_INFERENCE_SETTINGS &aSettings)
Register the snap inference parameters.
static wxString DefaultLibraryPrefix()
static wxString DefaultDestinationDir()
Functions to provide common constants and other functions to assist in making a consistent UI.