KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 <[email protected]>
5 * Copyright (C) 2020-2023 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 <geometry/eda_angle.h>
26#include <pcb_display_options.h>
27
28namespace PNS
29{
30 class ROUTING_SETTINGS;
31}
32
33
34// Settings for the CONVERT_TOOL.
36{
40};
41
42
44{
46 int m_Gap;
49};
50
51
52
54{
55 NO_EFFECT = 0,
58};
59
60
62{
67
71 graphics( false ),
72 allLayers( false )
73 { }
74};
75
76
78{
79 MOVE,
80 DRAG,
82};
83
84
86{
92};
93
94
96{
100};
101
102
103typedef std::vector<std::pair<wxString, bool>> ACTION_PLUGIN_SETTINGS_LIST;
104
105
106// base class to handle Pcbnew SETTINGS also used in Cvpcb
108{
109public:
111 {
116 };
117
119
120 PCB_VIEWERS_SETTINGS_BASE( const std::string& aFilename, int aSchemaVersion ):
121 APP_SETTINGS_BASE( aFilename, aSchemaVersion )
122 {
127 }
128
130};
131
132
134{
135public:
137 {
152 };
153
155 {
163 };
164
166 {
171 };
172
174 {
177 double ref_x;
178 double ref_y;
181 bool no_dnp;
182 };
183
185 {
188 double origin_x;
189 double origin_y;
191 bool no_dnp;
194 };
195
197 {
199 int units;
202 };
203
205 {
207 bool mirror;
211 wxString output_dir; // legacy; now in project settings
212 std::vector<int> layers;
213 bool use_selected_theme;// color theme option to use for export
214 // false = board theme, true = selected theme
215 wxString color_theme; // color theme used for export
216 };
217
219 {
220 int units;
222 bool no_dnp;
226 double ref_x;
227 double ref_y;
229 };
230
232 {
233 int width;
235 };
236
238 {
241 bool mirror;
247 };
248
250 {
251 int layer;
256 double tolerance;
257 wxString last_file;
261 double origin_x;
262 double origin_y;
264 };
265
267 {
273 };
274
276 {
277 wxString output_directory; // only used at run-time; actual data in project settings
278 int units;
286 };
287
289 {
297 bool mirror;
299 };
300
302 {
313 wxString front_prefix;
314 wxString back_prefix;
315 wxString exclude_list;
317 };
318
320 {
321 int width;
328 };
329
330 struct ZONES
331 {
333 };
334
336 {
337 // Note: Display options common to Cvpcb and Pcbnew are stored in
338 // VIEWERS_DISPLAY_OPTIONS m_ViewersDisplay, because the section DISPLAY_OPTIONS
339 // exists only for Pcbnew
342
345
347
349
355
359
362 };
363
365
367
368 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
369
371
373
375
377
379
381
383
385
387
389
391
393
395
397
399
401
403
405
407
409
411
413
415
417
418 bool m_Use45DegreeLimit; // True to constrain tool actions to horizontal,
419 // vertical and 45deg
420 bool m_FlipLeftRight; // True: Flip footprints across Y axis
421
423
425
427
429
431
433 bool m_AutoRefillZones; // Fill zones after editing the zone using the Zone Properties dialog
434
435 bool m_AllowFreePads; // True: unlocked pads can be moved freely with respect to the footprint.
436 // False (default): all pads are treated as locked for the purposes of
437 // movement and any attempt to move them will move the footprint instead.
438
440
441 std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
442
447
449
451
453
454protected:
455
456 virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
457
458};
459
460#endif
ARC_EDIT_MODE
Settings for arc editing.
Definition: app_settings.h:52
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
DIALOG_EXPORT_2581 m_Export2581
double m_FootprintViewerZoom
The last zoom level used (0 for auto)
DISPLAY_OPTIONS m_Display
DIALOG_NETLIST m_NetlistDialog
DIALOG_CLEANUP m_Cleanup
EDA_ANGLE m_RotationAngle
DIALOG_PLACE_FILE m_PlaceFile
bool m_FootprintViewerAutoZoomOnSelect
true to use automatic zoom on fp selection
DIALOG_FOOTPRINT_WIZARD_LIST m_FootprintWizardList
ARC_EDIT_MODE m_ArcEditMode
FOOTPRINT_CHOOSER m_FootprintChooser
virtual ~PCBNEW_SETTINGS()
DIALOG_EXPORT_VRML m_ExportVrml
DIALOG_EXPORT_IDF m_ExportIdf
TRACK_DRAG_ACTION m_TrackDragAction
wxString m_lastFootprintLibDir
virtual std::string getLegacyFrameName() const override
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
DIALOG_PLOT m_Plot
WINDOW_SETTINGS m_FootprintWizard
ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins
DIALOG_IMPORT_GRAPHICS m_ImportGraphics
DIALOG_DRC m_DrcDialog
AUI_PANELS m_AuiPanels
DIALOG_EXPORT_STEP m_ExportStep
WINDOW_SETTINGS m_FootprintViewer
wxString m_lastFootprint3dDir
bool m_ShowCourtyardCollisions
DIALOG_GENERATE_DRILL m_GenDrill
MAGNETIC_SETTINGS m_MagneticItems
DIALOG_REANNOTATE m_Reannotate
int m_FootprintViewerFPListWidth
std::unique_ptr< PNS::ROUTING_SETTINGS > m_PnsSettings
DIALOG_EXPORT_SVG m_ExportSvg
wxString m_FootprintTextShownColumns
int m_FootprintViewerLibListWidth
PCB_VIEWERS_SETTINGS_BASE(const std::string &aFilename, int aSchemaVersion)
VIEWERS_DISPLAY_OPTIONS m_ViewersDisplay
Push and Shove diff pair dimensions (gap) settings dialog.
MAGNETIC_OPTIONS
TRACK_CLEARANCE_MODE
@ SHOW_WITH_VIA_WHILE_ROUTING_OR_DRAGGING
@ DO_NOT_SHOW_CLEARANCE
@ SHOW_WHILE_ROUTING
@ SHOW_WITH_VIA_ALWAYS
@ SHOW_WITH_VIA_WHILE_ROUTING
PCB_DISPLAY_ORIGIN
@ PCB_ORIGIN_AUX
@ PCB_ORIGIN_GRID
@ PCB_ORIGIN_PAGE
CONVERT_STRATEGY
@ COPY_LINEWIDTH
@ CENTERLINE
@ BOUNDING_HULL
TRACK_DRAG_ACTION
std::vector< std::pair< wxString, bool > > ACTION_PLUGIN_SETTINGS_LIST
CONVERT_STRATEGY m_Strategy
MAGNETIC_OPTIONS tracks
MAGNETIC_OPTIONS pads
TRACK_CLEARANCE_MODE m_TrackClearance
Stores the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:74