KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema_settings.cpp
Go to the documentation of this file.
1/*
2* This program source code file is part of KiCad, a free EDA CAD application.
3*
4* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software; you can redistribute it and/or
7* modify it under the terms of the GNU General Public License
8* as published by the Free Software Foundation; either version 2
9* of the License, or (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, you may find one here:
18* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19* or you may search the http://www.gnu.org website for the version 2 license,
20* or you may write to the Free Software Foundation, Inc.,
21* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22*/
23
24#include <functional>
25
26#include <dialogs/dialog_bom_cfg_lexer.h>
27#include <eda_draw_frame.h>
28#include <eeschema_settings.h>
29#include <layer_ids.h>
31#include <string_utils.h>
32#include <pgm_base.h>
35#include <settings/parameters.h>
38#include <wx/config.h>
39#include <widgets/ui_common.h>
40#include <default_values.h> // For some default values
41
42using namespace T_BOMCFG_T; // for the BOM_CFG_PARSER parser and its keywords
43
46
48const nlohmann::json defaultBomPlugins =
49 {
50 {
51 { "name", "bom_csv_grouped_extra" },
52 { "path", "bom_csv_grouped_extra.py" }
53 },
54 {
55 { "name", "bom_csv_grouped_by_value" },
56 { "path", "bom_csv_grouped_by_value.py" }
57 },
58 {
59 { "name", "bom_csv_grouped_by_value_with_fp" },
60 { "path", "bom_csv_grouped_by_value_with_fp.py" }
61 },
62 };
63
64
65const wxAuiPaneInfo& defaultNetNavigatorPaneInfo()
66{
67 static wxAuiPaneInfo paneInfo;
68
69 paneInfo.Name( wxS( "NetNavigator" ) )
70 .Caption( _( "Net Navigator" ) )
71 .CaptionVisible( true )
72 .PaneBorder( true )
73 .Left().Layer( 3 )
74 .TopDockable( false )
75 .BottomDockable( false )
76 .CloseButton( true )
77 .MinSize( 120, 60 )
78 .BestSize( 200, 200 )
79 .FloatingSize( 200, 200 )
80 .FloatingPosition( 50, 200 )
81 .Show( false );
82
83 return paneInfo;
84}
85
86
87const wxAuiPaneInfo& defaultPropertiesPaneInfo()
88{
89 static wxAuiPaneInfo paneInfo;
90
91 paneInfo.Name( EDA_DRAW_FRAME::PropertiesPaneName() )
92 .Caption( _( "Properties" ) )
93 .CaptionVisible( true )
94 .PaneBorder( true )
95 .Left().Layer( 3 )
96 .TopDockable( false )
97 .BottomDockable( false )
98 .CloseButton( true )
99 .MinSize( 240, 60 )
100 .BestSize( 200, 200 )
101 .FloatingSize( 200, 400 )
102 .FloatingPosition( 50, 200 )
103 .Show( true );
104
105 return paneInfo;
106}
107
108
111 m_Appearance(),
112 m_AutoplaceFields(),
113 m_Drawing(),
114 m_FindReplaceExtra(),
115 m_Input(),
116 m_PageSettings(),
117 m_AnnotatePanel(),
118 m_BomPanel(),
119 m_FieldEditorPanel(),
120 m_LibViewPanel(),
121 m_NetlistPanel(),
122 m_PlotPanel(),
123 m_SymChooserPanel(),
124 m_Selection(),
125 m_Simulator(),
126 m_RescueNeverShow( false )
127{
128 m_params.emplace_back( new PARAM<wxString>( "appearance.edit_symbol_visible_columns",
129 &m_Appearance.edit_symbol_visible_columns, "0 1 2 3 4 5 6 7" ) );
130
131 m_params.emplace_back( new PARAM<int>( "appearance.edit_symbol_width",
133
134 m_params.emplace_back( new PARAM<int>( "appearance.edit_symbol_height",
136
137 m_params.emplace_back( new PARAM<wxString>( "appearance.edit_sheet_visible_columns",
138 &m_Appearance.edit_sheet_visible_columns, "0 1 2 3 4 5 6 7" ) );
139
140 m_params.emplace_back( new PARAM<int>( "appearance.edit_sheet_width",
142
143 m_params.emplace_back( new PARAM<int>( "appearance.edit_sheet_height",
145
146 m_params.emplace_back( new PARAM<wxString>( "appearance.edit_label_visible_columns",
147 &m_Appearance.edit_label_visible_columns, "0 1 2 3 4 5 6 7" ) );
148
149 m_params.emplace_back( new PARAM<int>( "appearance.edit_label_width",
151
152 m_params.emplace_back( new PARAM<int>( "appearance.edit_label_height",
154
155 m_params.emplace_back( new PARAM<int>( "appearance.erc_severities",
157
158 m_params.emplace_back( new PARAM<bool>( "appearance.footprint_preview",
160
161 m_params.emplace_back( new PARAM<bool>( "appearance.print_sheet_reference",
163
164 m_params.emplace_back( new PARAM<wxString>( "appearance.default_font",
165 &m_Appearance.default_font, "KiCad Font" ) );
166
167 m_params.emplace_back( new PARAM<bool>( "appearance.show_hidden_pins",
168 &m_Appearance.show_hidden_pins, false ) );
169
170 m_params.emplace_back( new PARAM<bool>( "appearance.show_hidden_fields",
172
173 m_params.emplace_back( new PARAM<bool>( "appearance.show_directive_labels",
175
176 m_params.emplace_back( new PARAM<bool>( "appearance.show_erc_warnings",
178
179 m_params.emplace_back( new PARAM<bool>( "appearance.show_erc_errors",
180 &m_Appearance.show_erc_errors, true ) );
181
182 m_params.emplace_back( new PARAM<bool>( "appearance.show_erc_exclusions",
184
185 m_params.emplace_back( new PARAM<bool>( "appearance.show_op_voltages",
187
188 m_params.emplace_back( new PARAM<bool>( "appearance.show_op_currents",
190
191 m_params.emplace_back( new PARAM<bool>( "appearance.show_illegal_symbol_lib_dialog",
193
194 m_params.emplace_back( new PARAM<bool>( "appearance.show_page_limits",
196
197 m_params.emplace_back( new PARAM<bool>( "appearance.show_sexpr_file_convert_warning",
199
200 m_params.emplace_back(
201 new PARAM<bool>( "appearance.show_sheet_filename_case_sensitivity_dialog",
203
204 m_params.emplace_back( new PARAM<bool>( "aui.show_schematic_hierarchy",
206
207 m_params.emplace_back( new PARAM<int>( "aui.hierarchy_panel_docked_width",
209
210 m_params.emplace_back( new PARAM<int>( "aui.hierarchy_panel_docked_height",
212
213 m_params.emplace_back( new PARAM<int>( "aui.hierarchy_panel_float_width",
215
216 m_params.emplace_back( new PARAM<int>( "aui.hierarchy_panel_float_height",
218
219 m_params.emplace_back( new PARAM<bool>( "aui.schematic_hierarchy_float",
221
222 m_params.emplace_back( new PARAM<int>( "aui.search_panel_height",
224
225 m_params.emplace_back( new PARAM<int>( "aui.search_panel_width",
227
228 m_params.emplace_back( new PARAM<int>( "aui.search_panel_dock_direction",
230
231 m_params.emplace_back( new PARAM<bool>( "aui.show_search",
232 &m_AuiPanels.show_search, false ) );
233
234 m_params.emplace_back( new PARAM<bool>( "aui.show_net_nav_panel",
236
237 m_params.emplace_back( new PARAM<bool>( "aui.float_net_nav_panel",
239
240 m_params.emplace_back( new PARAM<wxSize>( "aui.net_nav_panel_docked_size",
241 &m_AuiPanels.net_nav_panel_docked_size, wxSize( 120, -1 ) ) );
242
243 m_params.emplace_back( new PARAM<bool>( "aui.float_net_nav_panel",
245
246 m_params.emplace_back( new PARAM<wxPoint>( "aui.net_nav_panel_float_pos",
247 &m_AuiPanels.net_nav_panel_float_pos, wxPoint( 50, 200 ), false ) );
248
249 m_params.emplace_back( new PARAM<wxSize>( "aui.net_nav_panel_float_size",
250 &m_AuiPanels.net_nav_panel_float_size, wxSize( 200, 200 ) ) );
251
252 m_params.emplace_back( new PARAM<bool>( "aui.show_properties",
253 &m_AuiPanels.show_properties, true ) );
254
255 m_params.emplace_back( new PARAM<int>( "aui.properties_panel_width",
257
258 m_params.emplace_back( new PARAM<float>( "aui.properties_splitter_proportion",
260
261 m_params.emplace_back( new PARAM<bool>( "autoplace_fields.enable",
262 &m_AutoplaceFields.enable, true ) );
263
264 m_params.emplace_back( new PARAM<bool>( "autoplace_fields.allow_rejustify",
266
267 m_params.emplace_back( new PARAM<bool>( "autoplace_fields.align_to_grid",
269
270 m_params.emplace_back( new PARAM<int>( "drawing.default_bus_thickness",
272
273 m_params.emplace_back( new PARAM<int>( "drawing.default_junction_size",
275
276 m_params.emplace_back( new PARAM<int>( "drawing.pin_symbol_size",
278
279 m_params.emplace_back( new PARAM<double>( "drawing.text_offset_ratio",
280 &m_Drawing.text_offset_ratio, 0.08 ) );
281
282 m_params.emplace_back( new PARAM<int>( "drawing.default_line_thickness",
284
285 m_params.emplace_back( new PARAM<int>( "drawing.default_repeat_offset_x",
287
288 m_params.emplace_back( new PARAM<int>( "drawing.default_repeat_offset_y",
290
291 m_params.emplace_back( new PARAM<int>( "drawing.default_wire_thickness",
293
294 m_params.emplace_back( new PARAM<int>( "drawing.default_text_size",
296
297 m_params.emplace_back( new PARAM<wxString>( "drawing.field_names",
298 &m_Drawing.field_names, "" ) );
299
300 m_params.emplace_back( new PARAM<int>( "drawing.line_mode", &m_Drawing.line_mode,
301 LINE_MODE::LINE_MODE_90 ) );
302
303 m_params.emplace_back( new PARAM<bool>( "drawing.auto_start_wires",
304 &m_Drawing.auto_start_wires, true ) );
305
306 m_params.emplace_back( new PARAM<int>( "drawing.repeat_label_increment",
308
309 m_params.emplace_back( new PARAM<COLOR4D>( "drawing.default_sheet_border_color",
310 &m_Drawing.default_sheet_border_color, COLOR4D::UNSPECIFIED ) );
311
312 m_params.emplace_back( new PARAM<COLOR4D>( "drawing.default_sheet_background_color",
313 &m_Drawing.default_sheet_background_color, COLOR4D::UNSPECIFIED ) );
314
315 m_params.emplace_back( new PARAM_LIST<double>( "drawing.junction_size_mult_list",
316 &m_Drawing.junction_size_mult_list, { 0.0, 1.7, 4.0, 6.0, 9.0, 12.0 } ) );
317
318 m_params.emplace_back(new PARAM <int>( "drawing.junction_size_choice",
320
321 m_params.emplace_back( new PARAM<bool>( "find_replace.search_all_fields",
323
324 m_params.emplace_back( new PARAM<bool>( "find_replace.search_all_pins",
326
327 m_params.emplace_back( new PARAM<bool>( "find_replace.search_current_sheet_only",
329 false ) );
330
331 m_params.emplace_back( new PARAM<bool>( "find_replace.replace_references",
333
334 m_params.emplace_back( new PARAM<bool>( "input.drag_is_move",
335 &m_Input.drag_is_move, false ) );
336
337 m_params.emplace_back( new PARAM<bool>( "input.esc_clears_net_highlight",
339
340 m_params.emplace_back( new PARAM<int>( "selection.thickness",
342
343 m_params.emplace_back( new PARAM<int>( "selection.highlight_thickness",
345
346 m_params.emplace_back( new PARAM<bool>( "selection.draw_selected_children",
348
349 m_params.emplace_back( new PARAM<bool>( "selection.fill_shapes",
350 &m_Selection.fill_shapes, false ) );
351
352 m_params.emplace_back( new PARAM<bool>( "selection.select_pin_selects_symbol",
354
355 m_params.emplace_back( new PARAM<bool>( "annotation.automatic",
356 &m_AnnotatePanel.automatic, true ) );
357
358 m_params.emplace_back( new PARAM<bool>( "annotation.recursive",
359 &m_AnnotatePanel.recursive, true ) );
360
361 m_params.emplace_back( new PARAM<int>( "annotation.method",
362 &m_AnnotatePanel.method, 0, 0, 2 ) );
363
364 m_params.emplace_back( new PARAM<int>( "annotation.scope",
365 &m_AnnotatePanel.scope, 0, 0, 2 ) );
366
367 m_params.emplace_back( new PARAM<int>( "annotation.options",
368 &m_AnnotatePanel.options, 0, 0, 2 ) );
369
370 m_params.emplace_back( new PARAM<int>( "annotation.messages_filter",
372
373 m_params.emplace_back( new PARAM<int>( "annotation.sort_order",
374 &m_AnnotatePanel.sort_order, 0, 0, 1 ) );
375
376 m_params.emplace_back( new PARAM<wxString>( "bom.selected_plugin",
378
379 m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "bom.plugins",
380 std::bind( &EESCHEMA_SETTINGS::bomSettingsToJson, this ),
381 [&]( const nlohmann::json& aObj )
382 {
383 if( !aObj.is_array() )
384 return;
385
386 const nlohmann::json& list = aObj.empty() ? defaultBomPlugins : aObj;
387
389 },
391
392 m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "netlist.plugins",
394 [&]( const nlohmann::json& aObj )
395 {
396 if( !aObj.is_array() )
397 return;
398
399 if( aObj.empty() )
400 return;
401
402 const nlohmann::json& list = aObj;
403
405 },
406 nullptr ) );
407
408 m_params.emplace_back( new PARAM<bool>( "page_settings.export_paper",
409 &m_PageSettings.export_paper, false ) );
410
411 m_params.emplace_back( new PARAM<bool>( "page_settings.export_revision",
413
414 m_params.emplace_back( new PARAM<bool>( "page_settings.export_date",
415 &m_PageSettings.export_date, false ) );
416
417 m_params.emplace_back( new PARAM<bool>( "page_settings.export_title",
418 &m_PageSettings.export_title, false ) );
419
420 m_params.emplace_back( new PARAM<bool>( "page_settings.export_company",
421 &m_PageSettings.export_company, false ) );
422
423 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment1",
425
426 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment2",
428
429 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment3",
431
432 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment4",
434
435 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment5",
437
438 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment6",
440
441 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment7",
443
444 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment8",
446
447 m_params.emplace_back( new PARAM<bool>( "page_settings.export_comment9",
449
450 m_params.emplace_back( new PARAM_MAP<int>( "field_editor.field_widths",
452
453 m_params.emplace_back( new PARAM<int>( "field_editor.width", &m_FieldEditorPanel.width, 0 ) );
454
455 m_params.emplace_back( new PARAM<int>( "field_editor.height", &m_FieldEditorPanel.height, 0 ) );
456
457 m_params.emplace_back( new PARAM<int>( "field_editor.page", &m_FieldEditorPanel.page, 0 ) );
458
459 m_params.emplace_back( new PARAM<wxString>( "field_editor.export_filename",
460 &m_FieldEditorPanel.export_filename, wxT( "" ) ) );
461
462 m_params.emplace_back( new PARAM<int>( "field_editor.selection_mode",
464
465 m_params.emplace_back( new PARAM<int>( "field_editor.scope", &m_FieldEditorPanel.scope, 0 ) );
466
467 m_params.emplace_back( new PARAM<bool>( "plot.background_color",
468 &m_PlotPanel.background_color, false ) );
469
470 m_params.emplace_back( new PARAM<bool>( "plot.color",
471 &m_PlotPanel.color, true ) );
472
473 m_params.emplace_back( new PARAM<wxString>( "plot.color_theme",
474 &m_PlotPanel.color_theme, wxT( "user" ) ) );
475
476 m_params.emplace_back( new PARAM<int>( "plot.format",
477 &m_PlotPanel.format, 0 ) );
478
479 m_params.emplace_back( new PARAM<bool>( "plot.frame_reference",
480 &m_PlotPanel.frame_reference, true ) );
481
482 m_params.emplace_back( new PARAM<int>( "plot.hpgl_paper_size",
484
485 m_params.emplace_back( new PARAM<double>( "plot.hpgl_pen_size",
486 &m_PlotPanel.hpgl_pen_size, 0.5 ) );
487
488 m_params.emplace_back( new PARAM<int>( "plot.hpgl_origin",
489 &m_PlotPanel.hpgl_origin, 0 ) );
490
491 m_params.emplace_back( new PARAM<bool>( "plot.other_open_file_after_plot",
493
494 m_params.emplace_back( new PARAM<int>( "simulator.window.pos_x",
496
497 m_params.emplace_back( new PARAM<int>( "simulator.window.pos_y",
499
500 m_params.emplace_back( new PARAM<int>( "simulator.window.size_x",
501 &m_Simulator.window.state.size_x, 500 ) );
502
503 m_params.emplace_back( new PARAM<int>( "simulator.window.size_y",
504 &m_Simulator.window.state.size_y, 400 ) );
505
506 m_params.emplace_back( new PARAM<unsigned int>( "simulator.window.display",
508
509 m_params.emplace_back( new PARAM<bool>( "simulator.window.maximized",
510 &m_Simulator.window.state.maximized, false ) );
511
512 m_params.emplace_back( new PARAM<wxString>( "simulator.window.perspective",
514
515 m_params.emplace_back( new PARAM<int>( "simulator.plot_panel_width",
517
518 m_params.emplace_back( new PARAM<int>( "simulator.plot_panel_height",
520
521 m_params.emplace_back( new PARAM<int>( "simulator.signal_panel_height",
523
524 m_params.emplace_back( new PARAM<int>( "simulator.cursors_panel_height",
526
527 m_params.emplace_back( new PARAM<int>( "simulator.measurements_panel_height",
529
530 m_params.emplace_back( new PARAM<bool>( "simulator.white_background",
531 &m_Simulator.white_background, false ) );
532
533 m_params.emplace_back( new PARAM<int>( "symbol_chooser.sash_pos_h",
535
536 m_params.emplace_back( new PARAM<int>( "symbol_chooser.sash_pos_v",
538
539 m_params.emplace_back( new PARAM<int>( "symbol_chooser.width",
540 &m_SymChooserPanel.width, -1 ) );
541
542 m_params.emplace_back( new PARAM<int>( "symbol_chooser.height",
543 &m_SymChooserPanel.height, -1 ) );
544
545 m_params.emplace_back( new PARAM<int>( "symbol_chooser.sort_mode",
547
548 m_params.emplace_back( new PARAM<bool>( "symbol_chooser.keep_symbol",
549 &m_SymChooserPanel.keep_symbol, false ) );
550
551 m_params.emplace_back( new PARAM<bool>( "symbol_chooser.place_all_units",
553
554 m_params.emplace_back( new PARAM<bool>( "system.never_show_rescue_dialog",
555 &m_RescueNeverShow, false ) );
556
557 m_params.emplace_back( new PARAM<int>( "lib_view.window.pos_x",
559
560 m_params.emplace_back( new PARAM<int>( "lib_view.window.pos_y",
562
563 m_params.emplace_back( new PARAM<int>( "lib_view.window.size_x",
565
566 m_params.emplace_back( new PARAM<int>( "lib_view.window.size_y",
568
569 m_params.emplace_back( new PARAM<unsigned int>( "lib_view.window.display",
571
572 m_params.emplace_back( new PARAM<bool>( "lib_view.window.maximized",
574
575 m_params.emplace_back( new PARAM<wxString>( "lib_view.window.perspective",
577
578 m_params.emplace_back( new PARAM<int>( "lib_view.lib_list_width",
580
581 m_params.emplace_back( new PARAM<int>( "lib_view.cmp_list_width",
583
584 m_params.emplace_back( new PARAM<bool>( "lib_view.show_pin_electrical_type",
586
587 m_params.emplace_back( new PARAM<wxString>( "system.last_symbol_lib_dir",
588 &m_lastSymbolLibDir, "" ) );
589
590
591 // Migrations
592
593 registerMigration( 0, 1,
594 [&]() -> bool
595 {
596 // Version 0 to 1: BOM plugin settings moved from sexpr to JSON
597 return migrateBomSettings();
598 } );
599
600
601 registerMigration( 1, 2,
602 [&]() -> bool
603 {
604 // We used to have a bug on GTK which would set the lib tree column width way
605 // too narrow.
606 if( std::optional<int> optval = Get<int>( "lib_tree.column_width" ) )
607 {
608 if( optval < 150 )
609 Set( "lib_tree.column_width", 300 );
610 }
611
612 return true;
613 } );
614
615 registerMigration( 2, 3,
616 [&]() -> bool
617 {
618 // This is actually a migration for APP_SETTINGS_BASE::m_LibTree
619 return migrateLibTreeWidth();
620 } );
621}
622
623
624bool EESCHEMA_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
625{
626 bool ret = APP_SETTINGS_BASE::MigrateFromLegacy( aCfg );
627
628 // Now modify the loaded grid selection, because in earlier versions the grids index was shared
629 // between all applications and started at 1000 mils. There is a 4-position offset between
630 // this index and the possible eeschema grids list that we have to subtract.
631 std::string gridSizePtr = "window.grid.last_size";
632
633 if( std::optional<int> currentSize = Get<int>( gridSizePtr ) )
634 {
635 Set( gridSizePtr, *currentSize - 4 );
636 }
637 else
638 {
639 // Otherwise, default grid size should be 50 mils; index 1
640 Set( gridSizePtr, 1 );
641 }
642
643 ret &= fromLegacy<bool>( aCfg, "FootprintPreview", "appearance.footprint_preview" );
644 ret &= fromLegacy<bool>( aCfg, "NavigatorStaysOpen", "appearance.navigator_stays_open" );
645 ret &= fromLegacy<bool>( aCfg, "PrintSheetReferenceAndTitleBlock",
646 "appearance.print_sheet_reference" );
647 ret &= fromLegacy<bool>( aCfg, "ShowHiddenPins", "appearance.show_hidden_pins" );
648 ret &= fromLegacy<bool>( aCfg, "ShowIllegalSymbolLibDialog",
649 "appearance.show_illegal_symbol_lib_dialog" );
650 ret &= fromLegacy<bool>( aCfg, "ShowPageLimits", "appearance.show_page_limits" );
651 ret &= fromLegacy<bool>( aCfg, "ShowSheetFileNameCaseSensitivityDlg",
652 "appearance.show_sheet_filename_case_sensitivity_dialog" );
653
654 ret &= fromLegacy<bool>( aCfg, "AutoplaceFields", "autoplace_fields.enable" );
655 ret &= fromLegacy<bool>( aCfg, "AutoplaceJustify", "autoplace_fields.allow_rejustify" );
656 ret &= fromLegacy<bool>( aCfg, "AutoplaceAlign", "autoplace_fields.align_to_grid" );
657
658 ret &= fromLegacy<int>( aCfg, "DefaultBusWidth", "drawing.default_bus_thickness" );
659 ret &= fromLegacy<int>( aCfg, "DefaultJunctionSize", "drawing.default_junction_size" );
660 ret &= fromLegacy<int>( aCfg, "DefaultDrawLineWidth", "drawing.default_line_thickness" );
661 ret &= fromLegacy<int>( aCfg, "RepeatStepX", "drawing.default_repeat_offset_x" );
662 ret &= fromLegacy<int>( aCfg, "RepeatStepY", "drawing.default_repeat_offset_y" );
663 ret &= fromLegacy<int>( aCfg, "DefaultWireWidth", "drawing.default_wire_thickness" );
664 ret &= fromLegacyString( aCfg, "FieldNames", "drawing.field_names" );
665 ret &= fromLegacy<bool>( aCfg, "HorizVertLinesOnly", "drawing.line_mode" );
666 ret &= fromLegacy<int>( aCfg, "RepeatLabelIncrement", "drawing.repeat_label_increment" );
667
668 ret &= fromLegacy<bool>( aCfg, "DragActionIsMove", "input.drag_is_move" );
669
670 ret &= fromLegacy<int>( aCfg, "SelectionThickness", "selection.thickness" );
671 ret &= fromLegacy<bool>( aCfg, "SelectionDrawChildItems", "selection.draw_selected_children" );
672 ret &= fromLegacy<bool>( aCfg, "SelectionFillShapes", "selection.fill_shapes" );
673 ret &= fromLegacy<bool>( aCfg, "SelectPinSelectSymbolOpt",
674 "selection.select_pin_selects_symbol" );
675
676 ret &= fromLegacy<int>( aCfg, "AnnotateAlgoOption", "annotation.method" );
677 ret &= fromLegacy<int>( aCfg, "AnnotateFilterMsg", "annotation.messages_filter" );
678 ret &= fromLegacy<int>( aCfg, "AnnotateSortOption", "annotation.sort_order" );
679
680 ret &= fromLegacyString( aCfg, "bom_plugin_selected", "bom.selected_plugin" );
681 ret &= fromLegacyString( aCfg, "bom_plugins", "bom.plugins" );
682
684
685 ret &= fromLegacyString( aCfg, "SymbolFieldsShownColumns",
686 "edit_sch_component.visible_columns" );
687
688 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportRevision", "page_settings.export_revision" );
689 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportDate", "page_settings.export_date" );
690 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportTitle", "page_settings.export_title" );
691 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportCompany", "page_settings.export_company" );
692 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment1", "page_settings.export_comment1" );
693 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment2", "page_settings.export_comment2" );
694 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment3", "page_settings.export_comment3" );
695 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment4", "page_settings.export_comment4" );
696 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment5", "page_settings.export_comment5" );
697 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment6", "page_settings.export_comment6" );
698 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment7", "page_settings.export_comment7" );
699 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment8", "page_settings.export_comment8" );
700 ret &= fromLegacy<bool>( aCfg, "PageSettingsExportComment9", "page_settings.export_comment9" );
701
702 #if 0 // To do: move this code to the new netlist plugin management in settings
703 {
704 constexpr int max_custom_commands = 8; // from DIALOG_NETLIST
705 nlohmann::json js_cmd = nlohmann::json::array();
706 nlohmann::json js_title = nlohmann::json::array();
707 wxString cmd_key, title_key, cmd, title;
708
709 for( int i = 1; i <= max_custom_commands; ++i )
710 {
711 // Only migrate if both title and command are specified
712 cmd_key.Printf( "CustomNetlistCommand%d", i );
713 title_key.Printf( "CustomNetlistTitle%d", i );
714
715 if( aCfg->Read( cmd_key, &cmd ) && aCfg->Read( title_key, &title )
716 && !cmd.IsEmpty() && !title.IsEmpty() )
717 {
718 js_cmd.push_back( cmd.ToUTF8() );
719 js_title.push_back( title.ToUTF8() );
720 }
721 }
722
723 Set( "netlist.custom_command_titles", js_title );
724 Set( "netlist.custom_command_paths", js_cmd );
725 }
726 #endif
727
728 {
729 // NOTE(JE) These parameters should move to project-local storage before V6, but we are
730 // migrating them here in order to preserve data. There is a bug here that is preserved:
731 // keys are taken directly from the (translated) UI and stored in the config, so if the user
732 // changes languages the keys will no longer work.
733 aCfg->SetPath( "SymbolFieldEditor/Show/" );
734
735 nlohmann::json js = nlohmann::json( {} );
736 wxString key;
737 bool value = false;
738 long index = 0;
739
740 while( aCfg->GetNextEntry( key, index ) )
741 {
742 if( aCfg->Read( key, &value ) )
743 {
744 std::string key_utf( key.ToUTF8() );
745
746 try
747 {
748 js[key_utf] = value;
749 }
750 catch(...)
751 {
752 continue;
753 }
754 }
755 }
756
757 Set( "field_editor.fields_show", js );
758
759 aCfg->SetPath( "../GroupBy" );
760
761 while( aCfg->GetNextEntry( key, index ) )
762 {
763 if( aCfg->Read( key, &value ) )
764 {
765 std::string key_utf( key.ToUTF8() );
766
767 try
768 {
769 js[key_utf] = value;
770 }
771 catch(...)
772 {
773 continue;
774 }
775 }
776 }
777
778 Set( "field_editor.fields_group_by", js );
779
780 aCfg->SetPath( "../.." );
781 }
782
783 ret &= fromLegacy<bool>( aCfg, "PlotModeColor", "plot.color" );
784 ret &= fromLegacy<int>( aCfg, "PlotFormat", "plot.format" );
785 ret &= fromLegacy<bool>( aCfg, "PlotFrameRef", "plot.frame_reference" );
786 ret &= fromLegacy<bool>( aCfg, "PlotHPGLOrg", "plot.hpgl_origin" );
787 ret &= fromLegacy<int>( aCfg, "PlotHPGLPaperSize", "plot.hpgl_paper_size" );
788 ret &= fromLegacy<double>( aCfg, "PlotHPGLPenSize", "plot.hpgl_pen_size" );
789
790 ret &= fromLegacy<int>( aCfg, "SIM_PLOT_FRAMEPos_x", "simulator.window.pos_x" );
791 ret &= fromLegacy<int>( aCfg, "SIM_PLOT_FRAMEPos_y", "simulator.window.pos_y" );
792 ret &= fromLegacy<int>( aCfg, "SIM_PLOT_FRAMESize_x", "simulator.window.size_x" );
793 ret &= fromLegacy<int>( aCfg, "SIM_PLOT_FRAMESize_y", "simulator.window.size_y" );
794 ret &= fromLegacy<bool>( aCfg, "SIM_PLOT_FRAMEMaximized", "simulator.window.maximized" );
795 ret &= fromLegacyString( aCfg, "SIM_PLOT_FRAMEPerspective", "simulator.window.perspective" );
796 ret &= fromLegacyString( aCfg, "SIM_PLOT_FRAMEMostRecentlyUsedPath", "simulator.mru_path" );
797 ret &= fromLegacy<int>( aCfg, "SimPlotPanelWidth", "simulator.plot_panel_width" );
798 ret &= fromLegacy<int>( aCfg, "SimPlotPanelHeight", "simulator.plot_panel_height" );
799 ret &= fromLegacy<int>( aCfg, "SimSignalPanelHeight", "simulator.signal_panel_height" );
800 ret &= fromLegacy<int>( aCfg, "SimCursorsPanelHeight", "simulator.cursors_panel_height" );
801 ret &= fromLegacy<bool>( aCfg, "SimPlotWhiteBg", "simulator.white_background" );
802
803 ret &= fromLegacy<int>( aCfg, "SymbolChooserHSashPosition", "symbol_chooser.sash_pos_h" );
804 ret &= fromLegacy<int>( aCfg, "SymbolChooserVSashPosition", "symbol_chooser.sash_pos_v" );
805 ret &= fromLegacy<int>( aCfg, "SymbolChooserWidth", "symbol_chooser.width" );
806 ret &= fromLegacy<int>( aCfg, "SymbolChooserHeight", "symbol_chooser.height" );
807 ret &= fromLegacy<bool>( aCfg, "SymbolChooserKeepSymbol", "symbol_chooser.keep_symbol" );
808 ret &= fromLegacy<bool>( aCfg, "SymbolChooserUseUnits", "symbol_chooser.place_all_units" );
809
810 const std::string vlf = "ViewlibFrame";
811 ret &= fromLegacy<bool>( aCfg, vlf + "Maximized", "lib_view.window.maximized" );
812 ret &= fromLegacyString( aCfg, vlf + "MostRecentlyUsedPath", "lib_view.window.mru_path" );
813 ret &= fromLegacy<int>( aCfg, vlf + "Size_x", "lib_view.window.size_x" );
814 ret &= fromLegacy<int>( aCfg, vlf + "Size_y", "lib_view.window.size_y" );
815 ret &= fromLegacyString( aCfg, vlf + "Perspective", "lib_view.window.perspective" );
816 ret &= fromLegacy<int>( aCfg, vlf + "Pos_x", "lib_view.window.pos_x" );
817 ret &= fromLegacy<int>( aCfg, vlf + "Pos_y", "lib_view.window.pos_y" );
818 ret &= fromLegacy<int>( aCfg, "ViewLiblistWidth", "lib_view.lib_list_width" );
819 ret &= fromLegacy<int>( aCfg, "ViewCmplistWidth", "lib_view.cmp_list_width" );
820 ret &= fromLegacy<bool>( aCfg,
821 "ViewCmpShowPinElectricalType", "lib_view.show_pin_electrical_type" );
822 ret &= fromLegacy<bool>( aCfg, vlf + "ShowGrid", "lib_view.grid.show" );
823 ret &= fromLegacy<int>( aCfg, vlf + "_LastGridSize", "lib_view.grid.last_size" );
824
825 ret &= fromLegacy<bool>( aCfg, "RescueNeverShow", "system.never_show_rescue_dialog" );
826
827 // Legacy version stored this setting in eeschema, so move it to common if it exists
828 bool tmp;
829
830 if( aCfg->Read( "MoveWarpsCursor", &tmp ) )
831 Pgm().GetCommonSettings()->m_Input.warp_mouse_on_move = tmp;
832
833 COLOR_SETTINGS* cs = Pgm().GetSettingsManager().GetMigratedColorSettings();
834
835 auto migrateLegacyColor = [&] ( const std::string& aKey, int aLayerId ) {
836 wxString str;
837
838 if( aCfg->Read( aKey, &str ) )
839 cs->SetColor( aLayerId, COLOR4D( str ) );
840 };
841
842 migrateLegacyColor( "Color4DBgCanvasEx", LAYER_SCHEMATIC_BACKGROUND );
843 migrateLegacyColor( "Color4DBodyBgEx", LAYER_DEVICE_BACKGROUND );
844 migrateLegacyColor( "Color4DBodyEx", LAYER_DEVICE );
845 migrateLegacyColor( "Color4DBrightenedEx", LAYER_BRIGHTENED );
846 migrateLegacyColor( "Color4DBusEx", LAYER_BUS );
847 migrateLegacyColor( "Color4DConnEx", LAYER_JUNCTION );
848 migrateLegacyColor( "Color4DCursorEx", LAYER_SCHEMATIC_CURSOR );
849 migrateLegacyColor( "Color4DErcEEx", LAYER_ERC_ERR );
850 migrateLegacyColor( "Color4DErcWEx", LAYER_ERC_WARN );
851 migrateLegacyColor( "Color4DFieldEx", LAYER_FIELDS );
852 migrateLegacyColor( "Color4DGLabelEx", LAYER_GLOBLABEL );
853 migrateLegacyColor( "Color4DGridEx", LAYER_SCHEMATIC_GRID );
854 migrateLegacyColor( "Color4DHLabelEx", LAYER_HIERLABEL );
855 migrateLegacyColor( "Color4DHiddenEx", LAYER_HIDDEN );
856 migrateLegacyColor( "Color4DLLabelEx", LAYER_LOCLABEL );
857 migrateLegacyColor( "Color4DNoConnectEx", LAYER_NOCONNECT );
858 migrateLegacyColor( "Color4DNoteEx", LAYER_NOTES );
859 migrateLegacyColor( "Color4DPinEx", LAYER_PIN );
860 migrateLegacyColor( "Color4DPinNameEx", LAYER_PINNAM );
861 migrateLegacyColor( "Color4DPinNumEx", LAYER_PINNUM );
862 migrateLegacyColor( "Color4DReferenceEx", LAYER_REFERENCEPART );
863 migrateLegacyColor( "Color4DShadowEx", LAYER_SELECTION_SHADOWS );
864 migrateLegacyColor( "Color4DSheetEx", LAYER_SHEET );
865 migrateLegacyColor( "Color4DSheetFileNameEx", LAYER_SHEETFILENAME );
866 migrateLegacyColor( "Color4DSheetLabelEx", LAYER_SHEETLABEL );
867 migrateLegacyColor( "Color4DSheetNameEx", LAYER_SHEETNAME );
868 migrateLegacyColor( "Color4DValueEx", LAYER_VALUEPART );
869 migrateLegacyColor( "Color4DWireEx", LAYER_WIRE );
870 migrateLegacyColor( "Color4DWorksheetEx", LAYER_SCHEMATIC_DRAWINGSHEET );
871
872 Pgm().GetSettingsManager().SaveColorSettings( cs, "schematic" );
873
874 Set( "appearance.color_theme", cs->GetFilename() );
875
876 // LibEdit settings were stored with eeschema. If eeschema is the first app to run,
877 // we need to migrate the LibEdit settings here
878
879 auto libedit = Pgm().GetSettingsManager().GetAppSettings<SYMBOL_EDITOR_SETTINGS>();
880 libedit->MigrateFromLegacy( aCfg );
881 libedit->Load();
882
883 return ret;
884}
885
886
891class BOM_CFG_PARSER : public DIALOG_BOM_CFG_LEXER
892{
893 std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS>* m_pluginList;
894
895public:
896 BOM_CFG_PARSER( std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS>* aPluginList,
897 const char* aData, const wxString& aSource );
898
899 void Parse();
900
901private:
902 void parseGenerator();
903};
904
905
906std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS> EESCHEMA_SETTINGS::DefaultBomPlugins()
907{
909}
910
911
913{
914 if( !Contains( "bom.plugins" ) )
915 return false;
916
917 wxString list = *Get<wxString>( "bom.plugins" );
918
919 BOM_CFG_PARSER cfg_parser( &m_BomPanel.plugins, TO_UTF8( list ), wxT( "plugins" ) );
920
921 try
922 {
923 cfg_parser.Parse();
924 }
925 catch( const IO_ERROR& )
926 {
927 return false;
928 }
929
930 // Parser will have loaded up our array, let's dump it out to JSON
931 At( "bom.plugins" ) = bomSettingsToJson();
932
933 return true;
934}
935
936
938{
939 nlohmann::json js = nlohmann::json::array();
940
941 for( const BOM_PLUGIN_SETTINGS& plugin : m_BomPanel.plugins )
942 {
943 nlohmann::json pluginJson;
944
945 pluginJson["name"] = plugin.name.ToUTF8();
946 pluginJson["path"] = plugin.path.ToUTF8();
947 pluginJson["command"] = plugin.command.ToUTF8();
948
949 js.push_back( pluginJson );
950 }
951
952 return js;
953}
954
955
956std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS> EESCHEMA_SETTINGS::bomSettingsFromJson(
957 const nlohmann::json& aObj )
958{
959 std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS> ret;
960
961 wxASSERT( aObj.is_array() );
962
963 for( const nlohmann::json& entry : aObj )
964 {
965 if( entry.empty() || !entry.is_object() )
966 continue;
967
968 if( !entry.contains( "name" ) || !entry.contains( "path" ) )
969 continue;
970
971 BOM_PLUGIN_SETTINGS plugin( entry.at( "name" ).get<wxString>(),
972 entry.at( "path" ).get<wxString>() );
973
974 if( entry.contains( "command" ) )
975 plugin.command = entry.at( "command" ).get<wxString>();
976
977 ret.emplace_back( plugin );
978 }
979
980 return ret;
981}
982
983
985{
986 nlohmann::json js = nlohmann::json::array();
987
988 for( const NETLIST_PLUGIN_SETTINGS& plugin : m_NetlistPanel.plugins )
989 {
990 nlohmann::json pluginJson;
991
992 pluginJson["name"] = plugin.name.ToUTF8();
993 pluginJson["path"] = plugin.path.ToUTF8();
994 pluginJson["command"] = plugin.command.ToUTF8();
995
996 js.push_back( pluginJson );
997 }
998
999 return js;
1000}
1001
1002
1003std::vector<EESCHEMA_SETTINGS::NETLIST_PLUGIN_SETTINGS> EESCHEMA_SETTINGS::netlistSettingsFromJson(
1004 const nlohmann::json& aObj )
1005{
1006 std::vector<EESCHEMA_SETTINGS::NETLIST_PLUGIN_SETTINGS> ret;
1007
1008 wxASSERT( aObj.is_array() );
1009
1010 for( const nlohmann::json& entry : aObj )
1011 {
1012 if( entry.empty() || !entry.is_object() )
1013 continue;
1014
1015 if( !entry.contains( "name" ) || !entry.contains( "path" ) )
1016 continue;
1017
1018 NETLIST_PLUGIN_SETTINGS plugin( entry.at( "name" ).get<wxString>(),
1019 entry.at( "path" ).get<wxString>() );
1020
1021 if( entry.contains( "command" ) )
1022 plugin.command = entry.at( "command" ).get<wxString>();
1023
1024 ret.emplace_back( plugin );
1025 }
1026
1027 return ret;
1028}
1029
1030
1031BOM_CFG_PARSER::BOM_CFG_PARSER( std::vector<EESCHEMA_SETTINGS::BOM_PLUGIN_SETTINGS>* aPluginList,
1032 const char* aLine, const wxString& aSource ) :
1033 DIALOG_BOM_CFG_LEXER( aLine, aSource )
1034{
1035 wxASSERT( aPluginList );
1036 m_pluginList = aPluginList;
1037}
1038
1039
1041{
1042 T token;
1043
1044 while( ( token = NextTok() ) != T_RIGHT )
1045 {
1046 if( token == T_EOF)
1047 break;
1048
1049 if( token == T_LEFT )
1050 token = NextTok();
1051
1052 if( token == T_plugins )
1053 continue;
1054
1055 switch( token )
1056 {
1057 case T_plugin: // Defines a new plugin
1059 break;
1060
1061 default:
1062// Unexpected( CurText() );
1063 break;
1064 }
1065 }
1066}
1067
1068
1070{
1071 wxString str;
1073
1074 NeedSYMBOLorNUMBER();
1075 settings.path = FromUTF8();
1076
1077 T token;
1078
1079 while( ( token = NextTok() ) != T_RIGHT )
1080 {
1081 if( token == T_EOF)
1082 break;
1083
1084 switch( token )
1085 {
1086 case T_LEFT:
1087 break;
1088
1089 case T_cmd:
1090 NeedSYMBOLorNUMBER();
1091
1092 settings.command = FromUTF8();
1093
1094 NeedRIGHT();
1095 break;
1096
1097 case T_opts:
1098 {
1099 NeedSYMBOLorNUMBER();
1100
1101 wxString option = FromUTF8();
1102
1103 if( option.StartsWith( wxS( "nickname=" ), &str ) )
1104 settings.name = str;
1105
1106 NeedRIGHT();
1107 break;
1108 }
1109
1110 default:
1111 Unexpected( CurText() );
1112 break;
1113 }
1114 }
1115
1116 m_pluginList->emplace_back( settings );
1117}
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
virtual bool MigrateFromLegacy(wxConfigBase *aCfg) override
Migrates from wxConfig to JSON-based configuration.
bool migrateLibTreeWidth()
Migrates 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
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)
static const wxString PropertiesPaneName()
PANEL_ANNOTATE m_AnnotatePanel
static std::vector< BOM_PLUGIN_SETTINGS > DefaultBomPlugins()
PANEL_NETLIST m_NetlistPanel
nlohmann::json bomSettingsToJson() const
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
nlohmann::json netlistSettingsToJson() const
PANEL_SYM_CHOOSER m_SymChooserPanel
PAGE_SETTINGS m_PageSettings
static std::vector< BOM_PLUGIN_SETTINGS > bomSettingsFromJson(const nlohmann::json &aObj)
FIND_REPLACE_EXTRA m_FindReplaceExtra
PANEL_LIB_VIEW m_LibViewPanel
AUTOPLACE_FIELDS m_AutoplaceFields
static std::vector< NETLIST_PLUGIN_SETTINGS > netlistSettingsFromJson(const nlohmann::json &aObj)
PANEL_FIELD_EDITOR m_FieldEditorPanel
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:76
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 Contains(const std::string &aPath) const
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...
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...
wxString GetFilename() const
Definition: json_settings.h:73
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Like a normal param, but with custom getter and setter functions.
Definition: parameters.h:282
Represents a map of <std::string, Value>.
Definition: parameters.h:548
#define DEFAULT_BUS_WIDTH_MILS
The default noconnect size in mils.
#define DEFAULT_JUNCTION_DIAM
The default bus and wire entry size in mils.
#define DEFAULT_WIRE_WIDTH_MILS
The default bus width in mils. (can be changed in preference menu)
#define DEFAULT_LINE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
#define DEFAULT_TEXT_SIZE
Ratio of the font height to the baseline of the text above the wire.
#define _(s)
const nlohmann::json defaultBomPlugins
Default value for bom.plugins.
const wxAuiPaneInfo & defaultPropertiesPaneInfo()
const wxAuiPaneInfo & defaultNetNavigatorPaneInfo()
const int eeschemaSchemaVersion
! Update the schema version whenever a migration is required
@ LAYER_SHEETNAME
Definition: layer_ids.h:368
@ LAYER_ERC_WARN
Definition: layer_ids.h:375
@ LAYER_SHEETLABEL
Definition: layer_ids.h:371
@ LAYER_PINNUM
Definition: layer_ids.h:355
@ LAYER_DEVICE
Definition: layer_ids.h:362
@ LAYER_BRIGHTENED
Definition: layer_ids.h:385
@ LAYER_HIDDEN
Definition: layer_ids.h:386
@ LAYER_HIERLABEL
Definition: layer_ids.h:354
@ LAYER_PINNAM
Definition: layer_ids.h:356
@ LAYER_GLOBLABEL
Definition: layer_ids.h:353
@ LAYER_WIRE
Definition: layer_ids.h:349
@ LAYER_NOTES
Definition: layer_ids.h:363
@ LAYER_ERC_ERR
Definition: layer_ids.h:376
@ LAYER_PIN
Definition: layer_ids.h:366
@ LAYER_VALUEPART
Definition: layer_ids.h:358
@ LAYER_BUS
Definition: layer_ids.h:350
@ LAYER_SCHEMATIC_CURSOR
Definition: layer_ids.h:383
@ LAYER_FIELDS
Definition: layer_ids.h:359
@ LAYER_DEVICE_BACKGROUND
Definition: layer_ids.h:378
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition: layer_ids.h:388
@ LAYER_LOCLABEL
Definition: layer_ids.h:352
@ LAYER_JUNCTION
Definition: layer_ids.h:351
@ LAYER_REFERENCEPART
Definition: layer_ids.h:357
@ LAYER_SHEET
Definition: layer_ids.h:367
@ LAYER_SELECTION_SHADOWS
Definition: layer_ids.h:387
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:382
@ LAYER_SHEETFILENAME
Definition: layer_ids.h:369
@ LAYER_NOCONNECT
Definition: layer_ids.h:372
@ LAYER_SCHEMATIC_GRID
Definition: layer_ids.h:380
see class PGM_BASE
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_ERROR
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:115
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: string_utils.h:378
std::vector< double > junction_size_mult_list
std::vector< BOM_PLUGIN_SETTINGS > plugins
std::map< std::string, int > field_widths
std::vector< NETLIST_PLUGIN_SETTINGS > plugins
WINDOW_STATE state
Definition: app_settings.h:75
wxString perspective
Definition: app_settings.h:77
unsigned int display
Definition: app_settings.h:67
Functions to provide common constants and other functions to assist in making a consistent UI.