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
17 * along with this program. If not, see <https://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 <font/font_metrics.h>
27
29class REFDES_TRACKER;
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
58
59
65{
66public:
67 SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
68
69 virtual ~SCHEMATIC_SETTINGS();
70
71 wxString SubReference( int aUnit, bool aAddSeparator = true ) const;
72
76 int GetJunctionSize();
77
81 double GetHopOverScale();
82
87
88public:
89 // Default sizes are all stored in IU here, and in mils in the JSON file
90
96
97 int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc.
98 int m_HopOverSizeChoice; // none = 0, smallest = 1, etc.
100
101 int m_ConnectionGridSize; // usually 50mils (IU internally; mils in the JSON file)
102
103 int m_AnnotateStartNum; // Starting value for annotation
104 int m_AnnotateSortOrder; // Annotation sort order
105 int m_AnnotateMethod; // Annotation numbering method (linear, sheet * 100, etc)
106
107 int m_SubpartIdSeparator; // the separator char between the subpart id and the
108 // reference like U1A, U1.A or U1-A
109 int m_SubpartFirstId; // the ASCII char value to calculate the subpart symbol
110 // id from the symbol number: only 'A', 'a' or '1' can
111 // be used, other values have no sense.
112
118
119 double m_DashedLineDashRatio; // Dash length as ratio of the lineWidth
120 double m_DashedLineGapRatio; // Gap length as ratio of the lineWidth
121
122 int m_OPO_VPrecision; // Operating-point overlay voltage significant digits
123 wxString m_OPO_VRange; // Operating-point overlay voltage range
124 int m_OPO_IPrecision; // Operating-point overlay current significant digits
125 wxString m_OPO_IRange; // Operating-point overlay current range
126
129
131
134
136
140 std::shared_ptr<NGSPICE_SETTINGS> m_NgspiceSettings;
141
146 std::shared_ptr<REFDES_TRACKER> m_refDesTracker;
147
152 std::map<wxString, wxString> m_VariantDescriptions;
153};
154
155#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.
double GetHopOverScale()
Accessor that computes the current hop-over size.
SYMBOL_PARITY_SETTINGS m_SymbolParity
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::map< wxString, wxString > m_VariantDescriptions
A map of variant names to their descriptions.
KIFONT::METRICS m_FontMetrics
int GetJunctionSize()
Accessor that computes the current junction size.
std::shared_ptr< NGSPICE_SETTINGS > m_NgspiceSettings
Ngspice simulator settings.
int m_MaxError
Max deviation allowable when approximating circles and curves (in IU).