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.

94 lines
2.3 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
  5. * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software: you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation, either version 3 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef FOOTPRINT_EDITOR_SETTINGS_H_
  21. #define FOOTPRINT_EDITOR_SETTINGS_H_
  22. #include <board_design_settings.h>
  23. #include <settings/app_settings.h>
  24. #include <pcbnew_settings.h>
  25. #include <project/board_project_settings.h>
  26. class FOOTPRINT_EDITOR_SETTINGS : public APP_SETTINGS_BASE
  27. {
  28. public:
  29. struct AUI_PANELS
  30. {
  31. int appearance_panel_tab;
  32. int right_panel_width;
  33. bool show_layer_manager;
  34. };
  35. struct USER_GRID
  36. {
  37. double size_x;
  38. double size_y;
  39. int units;
  40. };
  41. FOOTPRINT_EDITOR_SETTINGS();
  42. virtual ~FOOTPRINT_EDITOR_SETTINGS() {}
  43. virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
  44. /// Only some of these settings are actually used for footprint editing
  45. // TODO: factor out the relevant stuff so the whole BDS doesn't have to be here
  46. BOARD_DESIGN_SETTINGS m_DesignSettings;
  47. // Only the magneticPads element is used
  48. MAGNETIC_SETTINGS m_MagneticItems;
  49. PCB_DISPLAY_OPTIONS m_Display;
  50. AUI_PANELS m_AuiPanels;
  51. USER_GRID m_UserGrid;
  52. bool m_PolarCoords;
  53. EDA_ANGLE m_RotationAngle;
  54. bool m_Use45Limit;
  55. int m_LibWidth;
  56. wxString m_LastImportExportPath;
  57. wxString m_FootprintTextShownColumns;
  58. SELECTION_FILTER_OPTIONS m_SelectionFilter;
  59. std::vector<LAYER_PRESET> m_LayerPresets;
  60. wxString m_ActiveLayerPreset;
  61. protected:
  62. virtual std::string getLegacyFrameName() const override { return "ModEditFrame"; }
  63. private:
  64. bool migrateSchema0to1();
  65. };
  66. #endif