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 The 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 <core/mirror.h> // for FLIP_DIRECTION
25#include <geometry/eda_angle.h>
27#include <pcb_display_options.h>
28
29namespace PNS
30{
31 class ROUTING_SETTINGS;
32}
33
34
35// Settings for the CONVERT_TOOL.
37{
41};
42
43
45{
47 int m_Gap;
50};
51
52
53
55{
56 NO_EFFECT = 0,
59};
60
61
63{
68
72 graphics( false ),
73 allLayers( false )
74 { }
75};
76
77
79{
80 MOVE,
81 DRAG,
83};
84
85
87{
93};
94
95
97{
101};
102
103
104typedef std::vector<std::pair<wxString, bool>> ACTION_PLUGIN_SETTINGS_LIST;
105
106
107// base class to handle Pcbnew SETTINGS also used in Cvpcb
109{
110public:
112 {
117 };
118
121
123
124 PCB_VIEWERS_SETTINGS_BASE( const std::string& aFilename, int aSchemaVersion ):
125 APP_SETTINGS_BASE( aFilename, aSchemaVersion ),
128 {
133 }
134
136};
137
138
140{
141public:
143 {
158 };
159
161 {
169 };
170
172 {
177 };
178
180 {
183 double ref_x;
184 double ref_y;
187 bool no_dnp;
188 };
189
191 {
194 double origin_x;
195 double origin_y;
197 bool no_dnp;
200 };
201
203 {
205 int units;
208 };
209
211 {
213 int units;
215 };
216
218 {
219 int units;
221 bool no_dnp;
225 double ref_x;
226 double ref_y;
228 };
229
231 {
232 int width;
234 };
235
237 {
240 bool mirror;
248 };
249
251 {
252 int layer;
257 double tolerance;
258 wxString last_file;
262 double origin_x;
263 double origin_y;
265 };
266
268 {
274 };
275
277 {
278 wxString output_directory; // only used at run-time; actual data in project settings
279 int units;
287 };
288
290 {
298 bool mirror;
300 };
301
303 {
314 wxString front_prefix;
315 wxString back_prefix;
316 wxString exclude_list;
318 };
319
321 {
322 int width;
329 };
330
331 struct ZONES
332 {
334 };
335
337 {
338 // Note: Display options common to Cvpcb and Pcbnew are stored in
339 // VIEWERS_DISPLAY_OPTIONS m_ViewersDisplay, because the section DISPLAY_OPTIONS
340 // exists only for Pcbnew
343
346
348
350
356
360
363 };
364
366 {
367 // Skip lock prompts for the current session
369 };
370
372
374
375 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
376
378
380
382
384
386
388
390
392
394
396
398
400
402
404
406
408
410
412
414
416
418
420
422
424
425 bool m_Use45DegreeLimit; // True to constrain tool actions to horizontal,
426 // vertical and 45deg
428
430
432
434
436
438
440 bool m_AutoRefillZones; // Fill zones after editing the zone using the Zone Properties dialog
441
442 bool m_AllowFreePads; // True: unlocked pads can be moved freely with respect to the footprint.
443 // False (default): all pads are treated as locked for the purposes of
444 // movement and any attempt to move them will move the footprint instead.
445
447
448 std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
449
452
454
456
458
460
461protected:
462
463 virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
464
465};
466
467#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
DISPLAY_OPTIONS m_Display
DIALOG_NETLIST m_NetlistDialog
DIALOG_CLEANUP m_Cleanup
EDA_ANGLE m_RotationAngle
DIALOG_PLACE_FILE m_PlaceFile
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
LOCKING_OPTIONS m_LockingOptions
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
FLIP_DIRECTION m_FlipDirection
DIALOG_REANNOTATE m_Reannotate
int m_FootprintViewerFPListWidth
DIALOG_EXPORT_ODBPP m_ExportODBPP
std::unique_ptr< PNS::ROUTING_SETTINGS > m_PnsSettings
wxString m_FootprintTextShownColumns
int m_FootprintViewerLibListWidth
bool m_FootprintViewerAutoZoomOnSelect
true to use automatic zoom on fp selection
PCB_VIEWERS_SETTINGS_BASE(const std::string &aFilename, int aSchemaVersion)
VIEWERS_DISPLAY_OPTIONS m_ViewersDisplay
double m_FootprintViewerZoom
The last zoom level used (0 for auto)
FLIP_DIRECTION
Definition: mirror.h:27
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
Store the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:74