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 The 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
30class REFDES_TRACKER;
31
32
33// The minimal grid size allowed to place a pin is 25 mils. Tthe best grid size is 50 mils,
34// but 25 mils is still usable.
35// This is because all symbols are using a 50 mils grid to place pins, and therefore the wires
36// must be on the 50 mils grid.
37#define MIN_CONNECTION_GRID_MILS 25
38#define DEFAULT_CONNECTION_GRID_MILS 50
39
40
46{
47public:
48 SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
49
50 virtual ~SCHEMATIC_SETTINGS();
51
52 wxString SubReference( int aUnit, bool aAddSeparator = true ) const;
53
54public:
55 // Default sizes are all stored in IU here, and in mils in the JSON file
56
62
63 int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc.
64 int m_JunctionSize; // a runtime cache of the calculated size
65
66 int m_HopOverSizeChoice; // none = 0, smallest = 1, etc.
67 double m_HopOverScale; // a runtime cache of the calculated lineWidth multiplier
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_AnnotateSortOrder; // Annotation sort order
73 int m_AnnotateMethod; // Annotation numbering method (linear, sheet * 100, etc)
74
75 int m_SubpartIdSeparator; // the separator char between the subpart id and the
76 // reference like U1A, U1.A or U1-A
77 int m_SubpartFirstId; // the ASCII char value to calculate the subpart symbol
78 // id from the symbol number: only 'A', 'a' or '1' can
79 // be used, other values have no sense.
80
86
87 double m_DashedLineDashRatio; // Dash length as ratio of the lineWidth
88 double m_DashedLineGapRatio; // Gap length as ratio of the lineWidth
89
90 int m_OPO_VPrecision; // Operating-point overlay voltage significant digits
91 wxString m_OPO_VRange; // Operating-point overlay voltage range
92 int m_OPO_IPrecision; // Operating-point overlay current significant digits
93 wxString m_OPO_IRange; // Operating-point overlay current range
94
97
99
101
104 std::vector<BOM_PRESET> m_BomPresets;
105
108 std::vector<BOM_FMT_PRESET> m_BomFmtPresets;
109
111
114
118 std::shared_ptr<NGSPICE_SETTINGS> m_NgspiceSettings;
119
124 std::shared_ptr<REFDES_TRACKER> m_refDesTracker;
125};
126
127#endif
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
NESTED_SETTINGS(const std::string &aName, int aSchemaVersion, JSON_SETTINGS *aParent, const std::string &aPath, bool aLoadFromFile=true)
Container for Ngspice simulator settings.
Class to efficiently track reference designators and provide next available designators.
BOM_FMT_PRESET m_BomFmtSettings
List of stored BOM format presets.
wxString SubReference(int aUnit, bool aAddSeparator=true) const
SCHEMATIC_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
std::shared_ptr< REFDES_TRACKER > m_refDesTracker
A list of previously used schematic reference designators.
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.
int m_MaxError
Max deviation allowable when approximating circles and curves (in IU).