KiCad PCB EDA Suite
Loading...
Searching...
No Matches
schematic_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-2023 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef KICAD_SCHEMATIC_SETTINGS_H
21#define KICAD_SCHEMATIC_SETTINGS_H
22
23#include <default_values.h>
26#include <template_fieldnames.h>
27#include <font/font.h>
28
30
31
32// The minimal grid size allowed to place a pin is 25 mils. Tthe best grid size is 50 mils,
33// but 25 mils is still usable.
34// This is because all symbols are using a 50 mils grid to place pins, and therefore the wires
35// must be on the 50 mils grid.
36#define MIN_CONNECTION_GRID_MILS 25
37#define DEFAULT_CONNECTION_GRID_MILS 50
38
39
49{
50public:
51 SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
52
53 virtual ~SCHEMATIC_SETTINGS();
54
55 wxString SubReference( int aUnit, bool aAddSeparator = true ) const;
56
57public:
58 // Default sizes are all stored in IU here, and in mils in the JSON file
59
65
66 int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc.
67 int m_JunctionSize; // a runtime cache of the calculated size
68
69 int m_ConnectionGridSize; // usually 50mils (IU internally; mils in the JSON file)
70
71 int m_AnnotateStartNum; // Starting value for annotation
72 int m_SubpartIdSeparator; // the separator char between the subpart id and the
73 // reference like U1A, U1.A or U1-A
74 int m_SubpartFirstId; // the ASCII char value to calculate the subpart symbol
75 // id from the symbol number: only 'A', 'a' or '1' can
76 // be used, other values have no sense.
77
83
84 double m_DashedLineDashRatio; // Dash length as ratio of the lineWidth
85 double m_DashedLineGapRatio; // Gap length as ratio of the lineWidth
86
87 int m_OPO_VPrecision; // Operating-point overlay voltage significant digits
88 wxString m_OPO_VRange; // Operating-point overlay voltage range
89 int m_OPO_IPrecision; // Operating-point overlay current significant digits
90 wxString m_OPO_IRange; // Operating-point overlay current range
91
94
96
102 wxString m_SpiceCommandString; // A command string to run external spice
103
105
107
109
112 std::vector<BOM_PRESET> m_BomPresets;
113
116 std::vector<BOM_FMT_PRESET> m_BomFmtPresets;
117
119
123 std::shared_ptr<NGSPICE_SETTINGS> m_NgspiceSettings;
124};
125
126#endif
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
Container for Ngspice simulator settings.
These settings were stored in SCH_BASE_FRAME previously.
wxString m_SchDrawingSheetFileName
BOM_FMT_PRESET m_BomFmtSettings
List of stored BOM format presets.
wxString SubReference(int aUnit, bool aAddSeparator=true) const
std::vector< BOM_PRESET > m_BomPresets
std::vector< BOM_FMT_PRESET > m_BomFmtPresets
KIFONT::METRICS m_FontMetrics
std::shared_ptr< NGSPICE_SETTINGS > m_NgspiceSettings
Ngspice simulator settings.
BOM_PRESET m_BomSettings
List of stored BOM presets.