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#pragma once
22
23#include <core/mirror.h> // for FLIP_DIRECTION
24#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.
42
43
51
52
59
60
75
76
83
84
93
94
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:
118
121
123
124 PCB_VIEWERS_SETTINGS_BASE( const std::string& aFilename, int aSchemaVersion ):
125 APP_SETTINGS_BASE( aFilename, aSchemaVersion ),
128 {
129 m_ViewersDisplay.m_AngleSnapMode = LEADER_MODE::DIRECT;
130 m_ViewersDisplay.m_DisplayGraphicsFill = true;
131 m_ViewersDisplay.m_DisplayTextFill = true;
132 m_ViewersDisplay.m_DisplayPadNumbers = true;
133 m_ViewersDisplay.m_DisplayPadFill = true;
134 }
135
137};
138
139
141{
142public:
164
166 {
167 // Export D356 uses wxFileDialog, so there's no DIALOG_SHIM to save/restore control state
169 };
170
177
179 {
180 // Footprint chooser is a FRAME, so there's no DIALOG_SHIM to save/restore control state
181 int width;
188 };
189
190 struct ZONES
191 {
193 };
194
196 {
197 // Note: Display options common to Cvpcb and Pcbnew are stored in
198 // VIEWERS_DISPLAY_OPTIONS m_ViewersDisplay, because the section DISPLAY_OPTIONS
199 // exists only for Pcbnew
202
206
208
210
216
220
223 };
224
227
228 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
229
230protected:
231 virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
232
233public:
235
239
241
244
246
250
252
253 LEADER_MODE m_AngleSnapMode; // Constrain tool actions to horizontal/vertical or 45°/90°
255
257
259
261
264
266 bool m_AutoRefillZones; // Fill zones after editing the zone using the Zone Properties dialog
267
268 bool m_AllowFreePads; // True: unlocked pads can be moved freely with respect to the footprint.
269 // False (default): all pads are treated as locked for the purposes of
270 // movement and any attempt to move them will move the footprint instead.
271
273
274 std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
275
278
281
283};
284
ARC_EDIT_MODE
Settings for arc editing.
APP_SETTINGS_BASE(const std::string &aFilename, int aSchemaVersion)
DIALOG_EXPORT_D356 m_ExportD356
DISPLAY_OPTIONS m_Display
wxString m_LastFootprintLibDir
EDA_ANGLE m_RotationAngle
DIALOG_DRC m_DRCDialog
ARC_EDIT_MODE m_ArcEditMode
FOOTPRINT_CHOOSER m_FootprintChooser
virtual ~PCBNEW_SETTINGS()
TRACK_DRAG_ACTION m_TrackDragAction
LEADER_MODE m_AngleSnapMode
virtual std::string getLegacyFrameName() const override
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
WINDOW_SETTINGS m_FootprintWizard
ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins
AUI_PANELS m_AuiPanels
WINDOW_SETTINGS m_FootprintViewer
wxString m_LastFootprint3dDir
MAGNETIC_SETTINGS m_MagneticItems
FLIP_DIRECTION m_FlipDirection
std::unique_ptr< PNS::ROUTING_SETTINGS > m_PnsSettings
wxString m_FootprintTextShownColumns
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)
Contain all persistent settings of the router, such as the mode, optimization effort,...
a few functions useful in geometry calculations.
LEADER_MODE
The kind of the leader line.
@ DIRECT
Unconstrained point-to-point.
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.