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
29#include <sim/sim_preferences.h>
30
31using KIGFX::COLOR4D;
32
33
34extern const wxAuiPaneInfo& defaultNetNavigatorPaneInfo();
35extern const wxAuiPaneInfo& defaultPropertiesPaneInfo( wxWindow* aWindow );
36extern const wxAuiPaneInfo& defaultSchSelectionFilterPaneInfo( wxWindow* aWindow );
37extern const wxAuiPaneInfo& defaultDesignBlocksPaneInfo( wxWindow* aWindow );
38
39
40
49
50
51enum class POWER_SYMBOLS
52{
56};
57
59{
60public:
89
91 {
92 int hierarchy_panel_docked_width; // width of hierarchy tree panel and pane when docked
93 int hierarchy_panel_docked_height; // height of hierarchy tree panel and pane when docked
94 int hierarchy_panel_float_width; // width of hierarchy tree panel when floating
95 int hierarchy_panel_float_height; // height of hierarchy tree panel when floating
96 int search_panel_height; // height of the search panel
97 int search_panel_width; // width of the search panel
98 int search_panel_dock_direction; // docking direction of the search panel
99 bool schematic_hierarchy_float; // show hierarchy tree panel as floating
100 bool show_schematic_hierarchy; // show hierarchy tree pane
101 bool show_search; // show the search panel
114 };
115
122
124 {
126
127 BOM_PLUGIN_SETTINGS( const wxString& aName, const wxString& aPath ) :
128 name( aName ),
129 path( aPath )
130 {}
131
132 wxString name;
133 wxString path;
134 wxString command;
135 };
136
138 {
140
141 NETLIST_PLUGIN_SETTINGS( const wxString& aName, const wxString& aPath ) :
142 name( aName ),
143 path( aPath )
144 {}
145
146 wxString name;
147 wxString path;
148 wxString command;
149 };
150
181
182 struct INPUT
183 {
186 };
187
198
216
225
227 {
229 std::vector<BOM_PLUGIN_SETTINGS> plugins;
230 };
231
243
252
254 {
255 std::vector<NETLIST_PLUGIN_SETTINGS> plugins;
256 };
257
266
268 {
271 };
272
284
301
312
314
316
317 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
318
319 static std::vector<BOM_PLUGIN_SETTINGS> DefaultBomPlugins();
320
321
322protected:
323 virtual std::string getLegacyFrameName() const override { return "SchematicFrame"; }
324
325private:
326 bool migrateBomSettings();
327
328 nlohmann::json bomSettingsToJson() const;
329
330 static std::vector<BOM_PLUGIN_SETTINGS> bomSettingsFromJson( const nlohmann::json& aObj );
331
332 nlohmann::json netlistSettingsToJson() const;
333 static std::vector<NETLIST_PLUGIN_SETTINGS> netlistSettingsFromJson( const nlohmann::json& aObj );
334
335public:
338
343
347
352
356
358
360
362};
363
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.
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
DIALOG_IMPORT_GRAPHICS m_ImportGraphics
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:104
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)
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
Contains preferences pertaining to the simulator.
Store the common settings that are saved and loaded for each window / frame.