KiCad PCB EDA Suite
pcbnew_settings.h
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 Jon Evans <jon@craftyjon.com>
5  * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef PCBNEW_SETTINGS_H_
22 #define PCBNEW_SETTINGS_H_
23 
24 #include <settings/app_settings.h>
25 #include <pcb_display_options.h>
26 
27 namespace PNS
28 {
29  class ROUTING_SETTINGS;
30 }
31 
32 enum class MAGNETIC_OPTIONS
33 {
34  NO_EFFECT,
37 };
38 
40 {
43  bool graphics;
44 
48  graphics( false )
49  {
50  }
51 };
52 
54 {
55  MOVE,
56  DRAG,
58 };
59 
60 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
61 typedef std::vector<std::pair<wxString, bool>> ACTION_PLUGIN_SETTINGS_LIST;
62 #endif
63 
64 
66 {
67 public:
68  struct AUI_PANELS
69  {
73  };
74 
76  {
83  };
84 
85  struct DIALOG_DRC
86  {
91  };
92 
94  {
96  int ref_units;
97  double ref_x;
98  double ref_y;
99  bool units_mils;
100  };
101 
103  {
106  double origin_x;
107  double origin_y;
109  };
110 
112  {
114  bool mirror;
115  bool one_file;
118  wxString output_dir;
119  std::vector<int> layers;
120  };
121 
123  {
124  int units;
129  double ref_x;
130  double ref_y;
131  };
132 
134  {
135  int width;
136  int height;
137  };
138 
140  {
143  bool mirror;
149  };
150 
152  {
153  int layer;
155  wxString last_file;
156  double line_width;
159  double origin_x;
160  double origin_y;
162  };
163 
165  {
172  };
173 
175  {
176  int units;
180  };
181 
182  struct DIALOG_PLOT
183  {
186  double fine_scale_x;
187  double fine_scale_y;
190  bool mirror;
191  };
192 
194  {
206  wxString front_prefix;
207  wxString back_prefix;
208  wxString exclude_list;
210  };
211 
213  {
214  int width;
215  int height;
216  int sash_h;
217  int sash_v;
218  };
219 
220  struct ZONES
221  {
223  wxString net_filter;
225  double clearance;
229  };
230 
231  PCBNEW_SETTINGS();
232 
233  virtual ~PCBNEW_SETTINGS();
234 
235  virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
236 
238 
240 
242 
244 
246 
248 
250 
252 
254 
256 
258 
260 
262 
264 
266 
268 
270 
272 
274 
276 
278 
279  bool m_Use45DegreeGraphicSegments; // True to constraint graphic lines to horizontal,
280  // vertical and 45ยบ
281  bool m_FlipLeftRight; // True: Flip footprints across Y axis
282  // False: Flip footprints across X axis
283 
285 
287 
289 
291 
293 
294  std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
295 
297 
299 
301 
303 
304 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
305  ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins;
306 #endif
307 
308 protected:
309 
310  virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
311 
312 };
313 
314 #endif
DIALOG_GENERATE_DRILL m_GenDrill
DIALOG_EXPORT_STEP m_ExportStep
DIALOG_CLEANUP m_Cleanup
DIALOG_EXPORT_IDF m_ExportIdf
double m_FootprintViewerZoom
The last zoom level in the footprint viewer.
wxString m_FootprintTextShownColumns
DIALOG_EXPORT_VRML m_ExportVrml
FOOTPRINT_CHOOSER m_FootprintChooser
TRACK_DRAG_ACTION
DIALOG_FOOTPRINT_WIZARD_LIST m_FootprintWizardList
MAGNETIC_OPTIONS
bool m_Use45DegreeGraphicSegments
wxString m_lastFootprint3dDir
WINDOW_SETTINGS m_FootprintWizard
Stores the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:81
PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings.
DIALOG_EXPORT_SVG m_ExportSvg
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
TRACK_DRAG_ACTION m_TrackDragAction
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
DIALOG_NETLIST m_NetlistDialog
WINDOW_SETTINGS m_FootprintViewer
std::unique_ptr< PNS::ROUTING_SETTINGS > m_PnsSettings
virtual std::string getLegacyFrameName() const override
DIALOG_PLACE_FILE m_PlaceFile
virtual ~PCBNEW_SETTINGS()
MAGNETIC_OPTIONS pads
AUI_PANELS m_AuiPanels
DIALOG_PLOT m_Plot
DIALOG_REANNOTATE m_Reannotate
DIALOG_IMPORT_GRAPHICS m_ImportGraphics
DIALOG_DRC m_DrcDialog
MAGNETIC_SETTINGS m_MagneticItems
wxString m_lastFootprintLibDir
bool m_FootprintViewerAutoZoom
Should the footprint viewer auto zoom on select.
Push and Shove diff pair dimensions (gap) settings dialog.
PCB_DISPLAY_OPTIONS m_Display
Definition of PCB_DISPLAY_OPTIONS class.
MAGNETIC_OPTIONS tracks