46 m_JunctionSizeChoice( 3 ),
49 m_AnnotateStartNum( 0 ),
50 m_IntersheetRefsShow( false ),
51 m_IntersheetRefsListOwnPage( true ),
52 m_IntersheetRefsFormatShort( false ),
55 m_DashedLineDashRatio( 12.0 ),
56 m_DashedLineGapRatio( 3.0 ),
57 m_OPO_VPrecision( 3 ),
58 m_OPO_VRange( wxS(
"~V" ) ),
59 m_OPO_IPrecision( 3 ),
60 m_OPO_IRange( wxS(
"~A" ) ),
61 m_SpiceCurSheetAsRoot( false ),
62 m_SpiceSaveAllVoltages( false ),
63 m_SpiceSaveAllCurrents( false ),
64 m_SpiceSaveAllDissipations( false ),
65 m_SpiceSaveAllEvents( true ),
66 m_SpiceModelCurSheetAsRoot( true ),
67 m_NgspiceSettings( nullptr )
71 int defaultLineThickness =
75 int defaultPinSymbolSize =
77 int defaultJunctionSizeChoice =
79 bool defaultIntersheetsRefShow =
81 bool defaultIntersheetsRefOwnPage =
83 bool defaultIntersheetsRefFormatShort =
85 wxString defaultIntersheetsRefPrefix =
87 wxString defaultIntersheetsRefSuffix =
156 [&]() -> nlohmann::json
158 nlohmann::json ret = nlohmann::json::array();
163 ret.push_back( nlohmann::json( {
164 {
"name", field.m_Name },
165 {
"visible", field.m_Visible },
166 {
"url", field.m_URL }
172 [&](
const nlohmann::json& aJson )
174 if( !aJson.empty() && aJson.is_array() )
178 for(
const nlohmann::json& entry : aJson )
180 if( !entry.contains(
"name" ) || !entry.contains(
"url" )
181 || !entry.contains(
"visible" ) )
187 field.
m_URL = entry[
"url"].get<
bool>();
188 field.
m_Visible = entry[
"visible"].get<
bool>();
196 if( cfg && !cfg->m_Drawing.field_names.IsEmpty() )
258 std::optional<double> tor = Get<double>(
"drawing.text_offset_ratio" );
261 Set(
"drawing.label_size_ratio", *tor );
BASE_SCREEN class implementation.
constexpr EDA_IU_SCALE schIUScale
void Set(const std::string &aPath, ValueType aVal)
Stores a value into the JSON document Will throw an exception if ValueType isn't something that the l...
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
void registerMigration(int aOldSchemaVersion, int aNewSchemaVersion, std::function< bool(void)> aMigrator)
Registers a migration from one schema version to another.
void ReleaseNestedSettings(NESTED_SETTINGS *aSettings)
Saves and frees a nested settings object, if it exists within this one.
static wxString LetterSubReference(int aUnit, int aFirstId)
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
JSON_SETTINGS * m_parent
A pointer to the parent object to load and store from.
Like a normal param, but with custom getter and setter functions.
Represents a parameter that has a scaling factor between the value in the file and the value used int...
virtual SETTINGS_MANAGER & GetSettingsManager() const
wxString m_BomExportFileName
wxString m_SchDrawingSheetFileName
wxString m_IntersheetRefsPrefix
bool m_SpiceCurSheetAsRoot
bool m_SpiceSaveAllCurrents
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)
bool m_SpiceSaveAllDissipations
TEMPLATES m_TemplateFieldNames
wxString m_IntersheetRefsSuffix
bool m_IntersheetRefsFormatShort
bool m_SpiceSaveAllVoltages
std::vector< BOM_PRESET > m_BomPresets
bool m_IntersheetRefsShow
double m_DashedLineGapRatio
bool m_IntersheetRefsListOwnPage
std::vector< BOM_FMT_PRESET > m_BomFmtPresets
KIFONT::METRICS m_FontMetrics
double m_DashedLineDashRatio
std::shared_ptr< NGSPICE_SETTINGS > m_NgspiceSettings
Ngspice simulator settings.
bool m_SpiceSaveAllEvents
virtual ~SCHEMATIC_SETTINGS()
wxString m_PlotDirectoryName
bool m_SpiceModelCurSheetAsRoot
wxString m_SpiceCommandString
BOM_PRESET m_BomSettings
List of stored BOM presets.
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
void AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName, bool aGlobal)
Insert or append a wanted symbol field name into the field names template.
void AddTemplateFieldNames(const wxString &aSerializedFieldNames)
Add a serialized list of template field names.
void DeleteAllFieldNameTemplates(bool aGlobal)
Delete the entire contents.
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Return a template field name list for read only access.
#define DEFAULT_IREF_PREFIX
The intersheets references suffix string.
#define DEFAULT_LABEL_SIZE_RATIO
The offset of the pin name string from the end of the pin in mils.
#define DEFAULT_JUNCTION_DIAM
The default bus and wire entry size in mils.
#define DEFAULT_LINE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
#define DEFAULT_TEXT_OFFSET_RATIO
Ratio of the font height to space around global labels.
#define DEFAULT_IREF_SUFFIX
Radius of snap "gravity well".
#define DEFAULT_TEXT_SIZE
Ratio of the font height to the baseline of the text above the wire.
This file contains miscellaneous commonly used macros and functions.
PGM_BASE & Pgm()
The global Program "get" accessor.
const int schSettingsSchemaVersion
#define MIN_CONNECTION_GRID_MILS
#define DEFAULT_CONNECTION_GRID_MILS
static BOM_FMT_PRESET CSV()
static BOM_PRESET DefaultEditing()
constexpr int MilsToIU(int mils) const
bool intersheets_ref_show
wxString intersheets_ref_suffix
bool intersheets_ref_short
wxString intersheets_ref_prefix
int default_line_thickness
bool intersheets_ref_own_page
Hold a name of a symbol's field, field value, and default visibility.