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, see <https://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <wx/aui/framemanager.h>
23
24#include <map>
25
28#include <sim/sim_preferences.h>
29
30using KIGFX::COLOR4D;
31
32
33extern const wxAuiPaneInfo& defaultNetNavigatorPaneInfo();
34extern const wxAuiPaneInfo& defaultPropertiesPaneInfo( wxWindow* aWindow );
35extern const wxAuiPaneInfo& defaultSchSelectionFilterPaneInfo( wxWindow* aWindow );
36extern const wxAuiPaneInfo& defaultDesignBlocksPaneInfo( wxWindow* aWindow );
37extern const wxAuiPaneInfo& defaultRemoteSymbolPaneInfo( wxWindow* aWindow );
38
39
40
49
50
51enum class POWER_SYMBOLS
52{
56};
57
59{
60public:
82
84 {
85 int hierarchy_panel_docked_width; // width of hierarchy tree panel and pane when docked
86 int hierarchy_panel_docked_height; // height of hierarchy tree panel and pane when docked
87 int hierarchy_panel_float_width; // width of hierarchy tree panel when floating
88 int hierarchy_panel_float_height; // height of hierarchy tree panel when floating
89 int search_panel_height; // height of the search panel
90 int search_panel_width; // width of the search panel
91 int search_panel_dock_direction; // docking direction of the search panel
92 bool schematic_hierarchy_float; // show hierarchy tree panel as floating
93 bool show_schematic_hierarchy; // show hierarchy tree pane
94 bool show_search; // show the search panel
100 bool net_nav_search_mode_wildcard; // true = wildcard search, false = regex search
112 };
113
120
122 {
124
125 BOM_PLUGIN_SETTINGS( const wxString& aName, const wxString& aPath ) :
126 name( aName ),
127 path( aPath )
128 {}
129
130 wxString name;
131 wxString path;
132 wxString command;
133 };
134
136 {
138
139 NETLIST_PLUGIN_SETTINGS( const wxString& aName, const wxString& aPath ) :
140 name( aName ),
141 path( aPath )
142 {}
143
144 wxString name;
145 wxString path;
146 wxString command;
147 };
148
178
185
197
215
225
227 {
229 std::vector<BOM_PLUGIN_SETTINGS> plugins;
230 };
231
241
250
252 {
253 std::vector<NETLIST_PLUGIN_SETTINGS> plugins;
254 };
255
264
271
277
294
305
307
309
310 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
311
312 static std::vector<BOM_PLUGIN_SETTINGS> DefaultBomPlugins();
313
314
315protected:
316 virtual std::string getLegacyFrameName() const override { return "SchematicFrame"; }
317
318private:
319 bool migrateBomSettings();
320
321 nlohmann::json bomSettingsToJson() const;
322
323 static std::vector<BOM_PLUGIN_SETTINGS> bomSettingsFromJson( const nlohmann::json& aObj );
324
325 nlohmann::json netlistSettingsToJson() const;
326 static std::vector<NETLIST_PLUGIN_SETTINGS> netlistSettingsFromJson( const nlohmann::json& aObj );
327
328public:
332
337
341
346
350
352
354
356};
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)
REMOTE_PROVIDER_SETTINGS m_RemoteSymbol
FIND_REPLACE_EXTRA m_FindReplaceExtra
PANEL_LIB_VIEW m_LibViewPanel
AUTOPLACE_FIELDS m_AutoplaceFields
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:101
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)
NETLIST_PLUGIN_SETTINGS(const wxString &aName, const wxString &aPath)
std::vector< BOM_PLUGIN_SETTINGS > plugins
std::vector< NETLIST_PLUGIN_SETTINGS > plugins
Contains preferences pertaining to the simulator.
Store the common settings that are saved and loaded for each window / frame.