2020-05-20 03:34:55 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2023-02-09 17:18:56 +00:00
|
|
|
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2020-05-20 03:34:55 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KICAD_SCHEMATIC_SETTINGS_H
|
|
|
|
#define KICAD_SCHEMATIC_SETTINGS_H
|
|
|
|
|
|
|
|
#include <default_values.h>
|
2020-06-08 02:19:46 +00:00
|
|
|
#include <settings/nested_settings.h>
|
2023-03-27 20:48:37 +00:00
|
|
|
#include <settings/bom_settings.h>
|
2020-06-08 02:19:46 +00:00
|
|
|
#include <template_fieldnames.h>
|
2023-08-06 19:20:53 +00:00
|
|
|
#include <font/font.h>
|
2023-02-09 20:13:05 +00:00
|
|
|
|
2023-07-14 09:21:58 +00:00
|
|
|
class NGSPICE_SETTINGS;
|
2021-03-18 19:31:02 +00:00
|
|
|
|
2023-10-14 19:46:39 +00:00
|
|
|
|
|
|
|
// The minimal grid size allowed to place a pin is 25 mils. Tthe best grid size is 50 mils,
|
|
|
|
// but 25 mils is still usable.
|
|
|
|
// This is because all symbols are using a 50 mils grid to place pins, and therefore the wires
|
|
|
|
// must be on the 50 mils grid.
|
|
|
|
#define MIN_CONNECTION_GRID_MILS 25
|
|
|
|
#define DEFAULT_CONNECTION_GRID_MILS 50
|
|
|
|
|
|
|
|
|
2020-05-20 03:34:55 +00:00
|
|
|
/**
|
|
|
|
* These settings were stored in SCH_BASE_FRAME previously.
|
|
|
|
* The backing store is currently the project file.
|
|
|
|
* They should likely move to a project settings file (JSON) once that framework exists.
|
|
|
|
*
|
2021-03-18 19:31:02 +00:00
|
|
|
* These are loaded from Eeschema settings but then overwritten by the project settings.
|
2020-05-20 03:34:55 +00:00
|
|
|
* All of the values are stored in IU, but the backing file stores in mils.
|
|
|
|
*/
|
2020-06-20 14:36:16 +00:00
|
|
|
class SCHEMATIC_SETTINGS : public NESTED_SETTINGS
|
2020-05-20 03:34:55 +00:00
|
|
|
{
|
2020-06-20 14:36:16 +00:00
|
|
|
public:
|
2020-06-08 02:19:46 +00:00
|
|
|
SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
|
|
|
|
|
|
|
|
virtual ~SCHEMATIC_SETTINGS();
|
|
|
|
|
2020-10-08 17:04:53 +00:00
|
|
|
// Default sizes are all stored in IU here, and in mils in the JSON file
|
2020-05-20 03:34:55 +00:00
|
|
|
|
2020-08-30 17:57:10 +00:00
|
|
|
int m_DefaultLineWidth;
|
|
|
|
int m_DefaultTextSize;
|
2021-07-25 11:42:19 +00:00
|
|
|
double m_LabelSizeRatio;
|
2020-08-30 17:57:10 +00:00
|
|
|
double m_TextOffsetRatio;
|
|
|
|
int m_PinSymbolSize;
|
2021-09-02 11:40:45 +00:00
|
|
|
|
|
|
|
int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc.
|
|
|
|
int m_JunctionSize; // a runtime cache of the calculated size
|
|
|
|
|
2023-10-14 19:46:39 +00:00
|
|
|
int m_ConnectionGridSize; // usually 50mils (IU internally; mils in the JSON file)
|
|
|
|
|
2021-09-02 11:40:45 +00:00
|
|
|
int m_AnnotateStartNum; // Starting value for annotation
|
2020-06-08 02:19:46 +00:00
|
|
|
|
2020-11-17 16:02:47 +00:00
|
|
|
bool m_IntersheetRefsShow;
|
2021-03-04 21:29:41 +00:00
|
|
|
bool m_IntersheetRefsListOwnPage;
|
2020-11-17 16:02:47 +00:00
|
|
|
bool m_IntersheetRefsFormatShort;
|
|
|
|
wxString m_IntersheetRefsPrefix;
|
|
|
|
wxString m_IntersheetRefsSuffix;
|
2020-08-31 14:11:54 +00:00
|
|
|
|
2021-07-22 23:05:01 +00:00
|
|
|
double m_DashedLineDashRatio; // Dash length as ratio of the lineWidth
|
|
|
|
double m_DashedLineGapRatio; // Gap length as ratio of the lineWidth
|
|
|
|
|
2023-02-09 17:18:56 +00:00
|
|
|
int m_OPO_VPrecision; // Operating-point overlay voltage significant digits
|
|
|
|
wxString m_OPO_VRange; // Operating-point overlay voltage range
|
|
|
|
int m_OPO_IPrecision; // Operating-point overlay current significant digits
|
|
|
|
wxString m_OPO_IRange; // Operating-point overlay current range
|
|
|
|
|
2022-08-31 09:35:27 +00:00
|
|
|
wxString m_SchDrawingSheetFileName;
|
2020-08-30 17:57:10 +00:00
|
|
|
wxString m_PlotDirectoryName;
|
2020-06-08 02:19:46 +00:00
|
|
|
|
2020-08-30 17:57:10 +00:00
|
|
|
wxString m_NetFormatName;
|
2020-06-08 02:19:46 +00:00
|
|
|
|
2021-03-18 19:31:02 +00:00
|
|
|
///< @todo These should probably be moved to the "schematic.simulator" path.
|
2022-09-09 13:34:56 +00:00
|
|
|
bool m_SpiceCurSheetAsRoot;
|
2022-04-12 14:37:06 +00:00
|
|
|
bool m_SpiceSaveAllVoltages;
|
|
|
|
bool m_SpiceSaveAllCurrents;
|
2023-02-10 20:52:52 +00:00
|
|
|
bool m_SpiceSaveAllDissipations;
|
2020-08-30 17:57:10 +00:00
|
|
|
wxString m_SpiceCommandString; // A command string to run external spice
|
2020-06-08 02:19:46 +00:00
|
|
|
|
2022-09-09 13:34:56 +00:00
|
|
|
bool m_SpiceModelCurSheetAsRoot;
|
|
|
|
|
2020-08-30 17:57:10 +00:00
|
|
|
TEMPLATES m_TemplateFieldNames;
|
2021-03-18 19:31:02 +00:00
|
|
|
|
2023-02-09 20:13:05 +00:00
|
|
|
/// List of stored BOM presets
|
2023-08-06 19:20:53 +00:00
|
|
|
BOM_PRESET m_BomSettings;
|
|
|
|
std::vector<BOM_PRESET> m_BomPresets;
|
2023-02-09 20:13:05 +00:00
|
|
|
|
2023-03-09 15:54:57 +00:00
|
|
|
/// List of stored BOM format presets
|
|
|
|
BOM_FMT_PRESET m_BomFmtSettings;
|
|
|
|
std::vector<BOM_FMT_PRESET> m_BomFmtPresets;
|
|
|
|
|
2023-08-06 19:20:53 +00:00
|
|
|
KIFONT::METRICS m_FontMetrics;
|
|
|
|
|
2021-03-18 19:31:02 +00:00
|
|
|
/**
|
|
|
|
* Ngspice simulator settings.
|
|
|
|
*/
|
2023-07-14 09:21:58 +00:00
|
|
|
std::shared_ptr<NGSPICE_SETTINGS> m_NgspiceSettings;
|
2020-05-20 03:34:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|