KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema_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 The KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software; you can redistribute it and/or
7* modify it under the terms of the GNU General Public License
8* as published by the Free Software Foundation; either version 2
9* of the License, or (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, you may find one here:
18* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19* or you may search the http://www.gnu.org website for the version 2 license,
20* or you may write to the Free Software Foundation, Inc.,
21* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22*/
23
24#pragma once
25
26#include <wx/aui/framemanager.h>
27
28#include <map>
29
31#include <sim/sim_preferences.h>
32
33using KIGFX::COLOR4D;
34
35
36extern const wxAuiPaneInfo& defaultNetNavigatorPaneInfo();
37extern const wxAuiPaneInfo& defaultPropertiesPaneInfo( wxWindow* aWindow );
38extern const wxAuiPaneInfo& defaultSchSelectionFilterPaneInfo( wxWindow* aWindow );
39extern const wxAuiPaneInfo& defaultDesignBlocksPaneInfo( wxWindow* aWindow );
40extern const wxAuiPaneInfo& defaultRemoteSymbolPaneInfo( wxWindow* aWindow );
41
42
43
52
53
54enum class POWER_SYMBOLS
55{
59};
60
62{
63public:
84
86 {
87 int hierarchy_panel_docked_width; // width of hierarchy tree panel and pane when docked
88 int hierarchy_panel_docked_height; // height of hierarchy tree panel and pane when docked
89 int hierarchy_panel_float_width; // width of hierarchy tree panel when floating
90 int hierarchy_panel_float_height; // height of hierarchy tree panel when floating
91 int search_panel_height; // height of the search panel
92 int search_panel_width; // width of the search panel
93 int search_panel_dock_direction; // docking direction of the search panel
94 bool schematic_hierarchy_float; // show hierarchy tree panel as floating
95 bool show_schematic_hierarchy; // show hierarchy tree pane
96 bool show_search; // show the search panel
102 bool net_nav_search_mode_wildcard; // true = wildcard search, false = regex search
114 };
115
117 {
122
126 std::map<wxString, wxString> user_ids;
127
128 void ResetToDefaults();
129 static wxString DefaultDestinationDir();
130 static wxString DefaultLibraryPrefix();
131 };
132
139
141 {
143
144 BOM_PLUGIN_SETTINGS( const wxString& aName, const wxString& aPath ) :
145 name( aName ),
146 path( aPath )
147 {}
148
149 wxString name;
150 wxString path;
151 wxString command;
152 };
153
155 {
157
158 NETLIST_PLUGIN_SETTINGS( const wxString& aName, const wxString& aPath ) :
159 name( aName ),
160 path( aPath )
161 {}
162
163 wxString name;
164 wxString path;
165 wxString command;
166 };
167
198
205
217
235
244
246 {
248 std::vector<BOM_PLUGIN_SETTINGS> plugins;
249 };
250
252 {
253 std::map<std::string, int> field_widths;
258 };
259
268
270 {
271 std::vector<NETLIST_PLUGIN_SETTINGS> plugins;
272 };
273
282
289
295
312
323
325
327
328 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
329
330 static std::vector<BOM_PLUGIN_SETTINGS> DefaultBomPlugins();
331
332
333protected:
334 virtual std::string getLegacyFrameName() const override { return "SchematicFrame"; }
335
336private:
337 bool migrateBomSettings();
338
339 nlohmann::json bomSettingsToJson() const;
340
341 static std::vector<BOM_PLUGIN_SETTINGS> bomSettingsFromJson( const nlohmann::json& aObj );
342
343 nlohmann::json netlistSettingsToJson() const;
344 static std::vector<NETLIST_PLUGIN_SETTINGS> netlistSettingsFromJson( const nlohmann::json& aObj );
345
346public:
350
355
359
364
368
370
372
374};
ARC_EDIT_MODE
Settings for arc editing.
APP_SETTINGS_BASE(const std::string &aFilename, int aSchemaVersion)
PANEL_ANNOTATE m_AnnotatePanel
static std::vector< BOM_PLUGIN_SETTINGS > DefaultBomPlugins()
PANEL_NETLIST m_NetlistPanel
nlohmann::json bomSettingsToJson() const
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
DIALOG_CHANGE_SYMBOLS m_ChangeSymbols
nlohmann::json netlistSettingsToJson() const
PANEL_SYM_CHOOSER m_SymChooserPanel
PAGE_SETTINGS m_PageSettings
static std::vector< BOM_PLUGIN_SETTINGS > bomSettingsFromJson(const nlohmann::json &aObj)
FIND_REPLACE_EXTRA m_FindReplaceExtra
PANEL_LIB_VIEW m_LibViewPanel
AUTOPLACE_FIELDS m_AutoplaceFields
REMOTE_SYMBOL_CONFIG m_RemoteSymbol
static std::vector< NETLIST_PLUGIN_SETTINGS > netlistSettingsFromJson(const nlohmann::json &aObj)
PANEL_SYMBOL_FIELDS_TABLE m_FieldEditorPanel
virtual std::string getLegacyFrameName() const override
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:105
const wxAuiPaneInfo & defaultSchSelectionFilterPaneInfo(wxWindow *aWindow)
@ LINE_MODE_90
@ LINE_MODE_45
@ LINE_MODE_FREE
@ LINE_MODE_COUNT
const wxAuiPaneInfo & defaultPropertiesPaneInfo(wxWindow *aWindow)
POWER_SYMBOLS
const wxAuiPaneInfo & defaultNetNavigatorPaneInfo()
const wxAuiPaneInfo & defaultDesignBlocksPaneInfo(wxWindow *aWindow)
const wxAuiPaneInfo & defaultRemoteSymbolPaneInfo(wxWindow *aWindow)
Contains preferences pertaining to the simulator.
BOM_PLUGIN_SETTINGS(const wxString &aName, const wxString &aPath)
std::vector< double > junction_size_mult_list
NETLIST_PLUGIN_SETTINGS(const wxString &aName, const wxString &aPath)
std::vector< BOM_PLUGIN_SETTINGS > plugins
std::vector< NETLIST_PLUGIN_SETTINGS > plugins
std::map< wxString, wxString > user_ids
Contains preferences pertaining to the simulator.
Store the common settings that are saved and loaded for each window / frame.