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  {
72  };
73 
75  {
81  };
82 
83  struct DIALOG_DRC
84  {
89  };
90 
92  {
94  int ref_units;
95  double ref_x;
96  double ref_y;
97  bool units_mils;
98  };
99 
101  {
104  double origin_x;
105  double origin_y;
107  };
108 
110  {
112  bool mirror;
113  bool one_file;
116  wxString output_dir;
117  std::vector<int> layers;
118  };
119 
121  {
122  int units;
127  double ref_x;
128  double ref_y;
129  };
130 
132  {
133  int width;
134  int height;
135  };
136 
138  {
141  bool mirror;
147  };
148 
150  {
151  int layer;
153  wxString last_file;
154  double line_width;
157  double origin_x;
158  double origin_y;
159  };
160 
162  {
169  };
170 
172  {
173  int units;
177  };
178 
179  struct DIALOG_PLOT
180  {
183  double fine_scale_x;
184  double fine_scale_y;
187  };
188 
190  {
191  int width;
192  int height;
193  int sash_h;
194  int sash_v;
195  };
196 
197  struct ZONES
198  {
200  wxString net_filter;
202  double clearance;
206  };
207 
208  PCBNEW_SETTINGS();
209 
210  virtual ~PCBNEW_SETTINGS();
211 
212  virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
213 
215 
217 
219 
221 
223 
225 
227 
229 
231 
233 
235 
237 
239 
241 
243 
245 
247 
249 
251 
253 
254  bool m_Use45DegreeGraphicSegments; // True to constraint graphic lines to horizontal,
255  // vertical and 45ยบ
256  bool m_FlipLeftRight; // True: Flip footprints across Y axis
257  // False: Flip footprints across X axis
258 
260 
262 
264 
266 
268 
269  std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
270 
272 
274 
275 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
276  ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins;
277 #endif
278 
279 protected:
280 
281  virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
282 
283 };
284 
285 #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
WINDOW_SETTINGS m_FootprintWizard
Stores the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:68
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:91
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_IMPORT_GRAPHICS m_ImportGraphics
DIALOG_DRC m_DrcDialog
MAGNETIC_SETTINGS m_MagneticItems
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