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_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
98
101 std::vector<BOM_PRESET> m_BomPresets;
102
105 std::vector<BOM_FMT_PRESET> m_BomFmtPresets;
106
108
111
115 std::shared_ptr<NGSPICE_SETTINGS> m_NgspiceSettings;
116
121 std::shared_ptr<REFDES_TRACKER> m_refDesTracker;
122};
123
124#endif
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
Container for Ngspice simulator settings.
Class to efficiently track reference designators and provide next available designators.
These are loaded from Eeschema settings but then overwritten by the project settings.
wxString m_SchDrawingSheetFileName
BOM_FMT_PRESET m_BomFmtSettings
List of stored BOM format presets.
wxString SubReference(int aUnit, bool aAddSeparator=true) const
std::shared_ptr< REFDES_TRACKER > m_refDesTracker
A list of previously used schematic reference designators.
TEMPLATES m_TemplateFieldNames
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).