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 = 0,
37 };
38 
40 {
43  bool graphics;
44 
48  graphics( false )
49  {
50  }
51 };
52 
54 {
55  MOVE,
56  DRAG,
58 };
59 
60 typedef std::vector<std::pair<wxString, bool>> ACTION_PLUGIN_SETTINGS_LIST;
61 
62 
64 {
65 public:
66  struct AUI_PANELS
67  {
71  };
72 
74  {
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;
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;
128  double ref_x;
129  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  {
171  };
172 
174  {
175  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  {
205  wxString front_prefix;
206  wxString back_prefix;
207  wxString exclude_list;
209  };
210 
212  {
213  int width;
214  int height;
215  int sash_h;
216  int sash_v;
217  };
218 
219  struct ZONES
220  {
223  double clearance;
227  };
228 
229  PCBNEW_SETTINGS();
230 
231  virtual ~PCBNEW_SETTINGS();
232 
233  virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
234 
236 
238 
240 
242 
244 
246 
248 
250 
252 
254 
256 
258 
260 
262 
264 
266 
268 
270 
272 
274 
276 
277  bool m_PcbUse45DegreeLimit; // True to constrain tool actions to horizontal,
278  // vertical and 45deg in board editor
279  bool m_FpeditUse45DegreeLimit; // True to constrain tool actions to horizontal,
280  // vertical and 45deg in footprint editor
281  bool m_FlipLeftRight; // True: Flip footprints across Y axis
282  // False: Flip footprints across X axis
283 
285 
287 
289 
291  bool m_AutoRefillZones; // Fill zones after editing the zone using the Zone Properties dialog
292 
293  bool m_AllowFreePads; // True: unlocked pads can be moved freely with respect to the footprint.
294  // False (default): all pads are treated as locked for the purposes of
295  // movement and any attempt to move them will move the footprint instead.
296 
298 
299  std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
300 
302 
304 
306 
308 
309 protected:
310 
311  virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
312 
313 };
314 
315 #endif
DIALOG_GENERATE_DRILL m_GenDrill
DIALOG_EXPORT_STEP m_ExportStep
DIALOG_CLEANUP m_Cleanup
DIALOG_EXPORT_IDF m_ExportIdf
std::vector< std::pair< wxString, bool > > ACTION_PLUGIN_SETTINGS_LIST
double m_FootprintViewerZoom
The last zoom level used (0 for auto)
wxString m_FootprintTextShownColumns
DIALOG_EXPORT_VRML m_ExportVrml
FOOTPRINT_CHOOSER m_FootprintChooser
TRACK_DRAG_ACTION
DIALOG_FOOTPRINT_WIZARD_LIST m_FootprintWizardList
MAGNETIC_OPTIONS
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
Container for 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
ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins
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
Push and Shove diff pair dimensions (gap) settings dialog.
PCB_DISPLAY_OPTIONS m_Display
Definition of PCB_DISPLAY_OPTIONS class.
MAGNETIC_OPTIONS tracks