2020-05-20 03:34:55 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2021-03-18 19:31:02 +00:00
|
|
|
* Copyright (C) 2020-2021 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 <convert_to_biu.h>
|
|
|
|
#include <default_values.h>
|
2020-06-08 02:19:46 +00:00
|
|
|
#include <settings/nested_settings.h>
|
|
|
|
#include <template_fieldnames.h>
|
2020-05-20 03:34:55 +00:00
|
|
|
|
2021-03-18 19:31:02 +00:00
|
|
|
class NGSPICE_SIMULATOR_SETTINGS;
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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.
|
2020-08-30 17:57:10 +00:00
|
|
|
bool m_SpiceAdjustPassiveValues;
|
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;
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Ngspice simulator settings.
|
|
|
|
*/
|
|
|
|
std::shared_ptr<NGSPICE_SIMULATOR_SETTINGS> m_NgspiceSimulatorSettings;
|
2020-05-20 03:34:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|