2020-01-13 01:44:19 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* 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 2
|
|
|
|
* 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, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _EESCHEMA_SETTINGS_H
|
|
|
|
#define _EESCHEMA_SETTINGS_H
|
|
|
|
|
|
|
|
#include <settings/app_settings.h>
|
|
|
|
|
|
|
|
|
2020-04-09 23:34:38 +00:00
|
|
|
using KIGFX::COLOR4D;
|
|
|
|
|
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
class EESCHEMA_SETTINGS : public APP_SETTINGS_BASE
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
struct APPEARANCE
|
|
|
|
{
|
|
|
|
wxString edit_component_visible_columns;
|
2020-03-06 20:02:58 +00:00
|
|
|
wxString edit_sheet_visible_columns;
|
2020-03-16 11:05:01 +00:00
|
|
|
int erc_severities;
|
2020-01-13 01:44:19 +00:00
|
|
|
bool footprint_preview;
|
|
|
|
bool navigator_stays_open;
|
|
|
|
bool print_sheet_reference;
|
|
|
|
bool show_hidden_pins;
|
2020-04-18 15:36:29 +00:00
|
|
|
bool show_hidden_fields;
|
2020-01-13 01:44:19 +00:00
|
|
|
bool show_illegal_symbol_lib_dialog;
|
|
|
|
bool show_page_limits;
|
2020-04-16 16:43:50 +00:00
|
|
|
bool show_sexpr_file_convert_warning;
|
2020-01-13 01:44:19 +00:00
|
|
|
bool show_sheet_filename_case_sensitivity_dialog;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct AUTOPLACE_FIELDS
|
|
|
|
{
|
|
|
|
bool enable;
|
|
|
|
bool allow_rejustify;
|
|
|
|
bool align_to_grid;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DRAWING
|
|
|
|
{
|
2020-05-20 03:34:55 +00:00
|
|
|
int default_bus_thickness;
|
|
|
|
int default_junction_size;
|
|
|
|
int default_line_thickness;
|
|
|
|
int default_repeat_offset_x;
|
|
|
|
int default_repeat_offset_y;
|
|
|
|
int default_wire_thickness;
|
|
|
|
int default_text_size;
|
|
|
|
int pin_symbol_size;
|
|
|
|
double text_offset_ratio;
|
|
|
|
COLOR4D default_sheet_border_color;
|
|
|
|
COLOR4D default_sheet_background_color;
|
2020-01-13 01:44:19 +00:00
|
|
|
wxString field_names;
|
2020-05-20 03:34:55 +00:00
|
|
|
bool hv_lines_only;
|
|
|
|
int repeat_label_increment;
|
2020-01-13 01:44:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct INPUT
|
|
|
|
{
|
|
|
|
bool drag_is_move;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SELECTION
|
|
|
|
{
|
|
|
|
int thickness;
|
|
|
|
bool draw_selected_children;
|
|
|
|
bool fill_shapes;
|
|
|
|
bool select_pin_selects_symbol;
|
|
|
|
bool text_as_box;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PAGE_SETTINGS
|
|
|
|
{
|
2020-04-19 11:34:01 +00:00
|
|
|
bool export_paper;
|
2020-01-13 01:44:19 +00:00
|
|
|
bool export_revision;
|
|
|
|
bool export_date;
|
|
|
|
bool export_title;
|
|
|
|
bool export_company;
|
|
|
|
bool export_comment1;
|
|
|
|
bool export_comment2;
|
|
|
|
bool export_comment3;
|
|
|
|
bool export_comment4;
|
|
|
|
bool export_comment5;
|
|
|
|
bool export_comment6;
|
|
|
|
bool export_comment7;
|
|
|
|
bool export_comment8;
|
|
|
|
bool export_comment9;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_ANNOTATE
|
|
|
|
{
|
|
|
|
int method;
|
|
|
|
int messages_filter;
|
|
|
|
int sort_order;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_BOM
|
|
|
|
{
|
|
|
|
wxString selected_plugin;
|
|
|
|
wxString plugins;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_FIELD_EDITOR
|
|
|
|
{
|
|
|
|
std::map<std::string, bool> fields_show;
|
|
|
|
std::map<std::string, bool> fields_group_by;
|
2020-04-21 15:15:04 +00:00
|
|
|
std::map<std::string, int> column_widths;
|
2020-01-13 01:44:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_LIB_VIEW
|
|
|
|
{
|
|
|
|
int lib_list_width;
|
|
|
|
int cmp_list_width;
|
|
|
|
bool show_pin_electrical_type;
|
|
|
|
WINDOW_SETTINGS window;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_NETLIST
|
|
|
|
{
|
|
|
|
std::vector<wxString> custom_command_titles;
|
|
|
|
std::vector<wxString> custom_command_paths;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_PLOT
|
|
|
|
{
|
2020-03-06 03:00:30 +00:00
|
|
|
bool background_color;
|
|
|
|
bool color;
|
|
|
|
wxString color_theme;
|
|
|
|
int format;
|
|
|
|
bool frame_reference;
|
|
|
|
int hpgl_paper_size;
|
|
|
|
double hpgl_pen_size;
|
|
|
|
bool hpgl_origin;
|
2020-01-13 01:44:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PANEL_SYM_CHOOSER
|
|
|
|
{
|
|
|
|
int sash_pos_h;
|
|
|
|
int sash_pos_v;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
bool keep_symbol;
|
|
|
|
bool place_all_units;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SIMULATOR
|
|
|
|
{
|
|
|
|
int plot_panel_width;
|
|
|
|
int plot_panel_height;
|
|
|
|
int signal_panel_height;
|
|
|
|
int cursors_panel_height;
|
|
|
|
bool white_background;
|
|
|
|
WINDOW_SETTINGS window;
|
|
|
|
};
|
|
|
|
|
|
|
|
EESCHEMA_SETTINGS();
|
|
|
|
|
|
|
|
virtual ~EESCHEMA_SETTINGS() {}
|
|
|
|
|
|
|
|
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
|
|
|
|
|
|
|
|
APPEARANCE m_Appearance;
|
|
|
|
|
|
|
|
AUTOPLACE_FIELDS m_AutoplaceFields;
|
|
|
|
|
|
|
|
DRAWING m_Drawing;
|
|
|
|
|
|
|
|
INPUT m_Input;
|
|
|
|
|
|
|
|
PAGE_SETTINGS m_PageSettings;
|
|
|
|
|
|
|
|
PANEL_ANNOTATE m_AnnotatePanel;
|
|
|
|
|
|
|
|
PANEL_BOM m_BomPanel;
|
|
|
|
|
|
|
|
PANEL_FIELD_EDITOR m_FieldEditorPanel;
|
|
|
|
|
|
|
|
PANEL_LIB_VIEW m_LibViewPanel;
|
|
|
|
|
|
|
|
PANEL_NETLIST m_NetlistPanel;
|
|
|
|
|
|
|
|
PANEL_PLOT m_PlotPanel;
|
|
|
|
|
|
|
|
PANEL_SYM_CHOOSER m_SymChooserPanel;
|
|
|
|
|
|
|
|
SELECTION m_Selection;
|
|
|
|
|
|
|
|
SIMULATOR m_Simulator;
|
|
|
|
|
|
|
|
bool m_RescueNeverShow;
|
|
|
|
|
2020-09-01 02:00:38 +00:00
|
|
|
wxString m_lastSymbolLibDir;
|
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual std::string getLegacyFrameName() const override { return "SchematicFrame"; }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|