You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.7 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2020-2021 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. #ifndef KICAD_SCHEMATIC_SETTINGS_H
  20. #define KICAD_SCHEMATIC_SETTINGS_H
  21. #include <convert_to_biu.h>
  22. #include <default_values.h>
  23. #include <settings/nested_settings.h>
  24. #include <template_fieldnames.h>
  25. class NGSPICE_SIMULATOR_SETTINGS;
  26. /**
  27. * These settings were stored in SCH_BASE_FRAME previously.
  28. * The backing store is currently the project file.
  29. * They should likely move to a project settings file (JSON) once that framework exists.
  30. *
  31. * These are loaded from Eeschema settings but then overwritten by the project settings.
  32. * All of the values are stored in IU, but the backing file stores in mils.
  33. */
  34. class SCHEMATIC_SETTINGS : public NESTED_SETTINGS
  35. {
  36. public:
  37. SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
  38. virtual ~SCHEMATIC_SETTINGS();
  39. // Default sizes are all stored in IU here, and in mils in the JSON file
  40. int m_DefaultLineWidth;
  41. int m_DefaultTextSize;
  42. double m_LabelSizeRatio;
  43. double m_TextOffsetRatio;
  44. int m_PinSymbolSize;
  45. int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc.
  46. int m_JunctionSize; // a runtime cache of the calculated size
  47. int m_AnnotateStartNum; // Starting value for annotation
  48. bool m_IntersheetRefsShow;
  49. bool m_IntersheetRefsListOwnPage;
  50. bool m_IntersheetRefsFormatShort;
  51. wxString m_IntersheetRefsPrefix;
  52. wxString m_IntersheetRefsSuffix;
  53. wxString m_PlotDirectoryName;
  54. wxString m_NetFormatName;
  55. ///< @todo These should probably be moved to the "schematic.simulator" path.
  56. bool m_SpiceAdjustPassiveValues;
  57. wxString m_SpiceCommandString; // A command string to run external spice
  58. TEMPLATES m_TemplateFieldNames;
  59. /**
  60. * Ngspice simulator settings.
  61. */
  62. std::shared_ptr<NGSPICE_SIMULATOR_SETTINGS> m_NgspiceSimulatorSettings;
  63. };
  64. #endif