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
45{
46public:
47 SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
48
49 virtual ~SCHEMATIC_SETTINGS();
50
51 wxString SubReference( int aUnit, bool aAddSeparator = true ) const;
52
53public:
54 // Default sizes are all stored in IU here, and in mils in the JSON file
55
61
62 int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc.
63 int m_JunctionSize; // a runtime cache of the calculated size
64
65 int m_ConnectionGridSize; // usually 50mils (IU internally; mils in the JSON file)
66
67 int m_AnnotateStartNum; // Starting value for annotation
68 int m_SubpartIdSeparator; // the separator char between the subpart id and the
69 // reference like U1A, U1.A or U1-A
70 int m_SubpartFirstId; // the ASCII char value to calculate the subpart symbol
71 // id from the symbol number: only 'A', 'a' or '1' can
72 // be used, other values have no sense.
73
79
80 double m_DashedLineDashRatio; // Dash length as ratio of the lineWidth
81 double m_DashedLineGapRatio; // Gap length as ratio of the lineWidth
82
83 int m_OPO_VPrecision; // Operating-point overlay voltage significant digits
84 wxString m_OPO_VRange; // Operating-point overlay voltage range
85 int m_OPO_IPrecision; // Operating-point overlay current significant digits
86 wxString m_OPO_IRange; // Operating-point overlay current range
87
90
92
99 wxString m_SpiceCommandString; // A command string to run external spice
100
102
104
106
109 std::vector<BOM_PRESET> m_BomPresets;
110
113 std::vector<BOM_FMT_PRESET> m_BomFmtPresets;
114
116
120 std::shared_ptr<NGSPICE_SETTINGS> m_NgspiceSettings;
121};
122
123#endif
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
Container for Ngspice simulator settings.
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::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.