39 m_ShowPinElectricalType( true ),
41 m_EditSymbolVisibleColumns()
104 std::string gridSizePtr =
"window.grid.last_size";
106 if( std::optional<int> currentSize = Get<int>( gridSizePtr ) )
108 Set( gridSizePtr, *currentSize - 4 );
113 Set( gridSizePtr, 1 );
116 ret &= fromLegacy<int>( aCfg,
"DefaultWireWidth",
"defaults.line_width" );
117 ret &= fromLegacy<int>( aCfg,
"DefaultPinLength",
"defaults.pin_length" );
118 ret &= fromLegacy<int>( aCfg,
"LibeditPinNameSize",
"defaults.pin_name_size" );
119 ret &= fromLegacy<int>( aCfg,
"LibeditPinNumSize",
"defaults.pin_num_size" );
121 ret &= fromLegacy<int>( aCfg,
"LibeditRepeatLabelInc",
"repeat.label_delta" );
122 ret &= fromLegacy<int>( aCfg,
"LibeditPinRepeatStep",
"repeat.pin_step" );
123 ret &= fromLegacy<int>( aCfg,
"LibeditRepeatStepX",
"repeat.x_step" );
124 ret &= fromLegacy<int>( aCfg,
"LibeditRepeatStepY",
"repeat.y_step" );
126 ret &= fromLegacy<int>( aCfg,
"LibeditLibWidth",
"lib_table_width" );
127 ret &= fromLegacy<bool>( aCfg,
"LibeditShowPinElectricalType",
"show_pin_electrical_type" );
129 ret &=
fromLegacyString( aCfg,
"LibEditFieldsShownColumns",
"edit_symbol_visible_columns" );
131 ret &=
fromLegacyString( aCfg,
"PinTableShownColumns",
"pin_table_visible_columns" );
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
virtual bool MigrateFromLegacy(wxConfigBase *aCfg) override
Migrates from wxConfig to JSON-based configuration.
bool migrateLibTreeWidth()
Migrates the library tree width setting from a single column (Item) to multi-column.
bool fromLegacyString(wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
Translates a legacy wxConfig string value to a given JSON pointer value.
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
void registerMigration(int aOldSchemaVersion, int aNewSchemaVersion, std::function< bool(void)> aMigrator)
Registers a migration from one schema version to another.
void Set(const std::string &aPath, ValueType aVal)
Stores a value into the JSON document Will throw an exception if ValueType isn't something that the l...
void SetLegacyFilename(const wxString &aFilename)
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
bool m_UseEeschemaColorSettings
bool m_ShowPinElectricalType
wxString m_PinTableVisibleColumns
wxString m_EditSymbolVisibleColumns
#define DEFAULT_PINNUM_SIZE
The default pin name size when creating pins(can be changed in preference menu)
#define DEFAULT_PINNAME_SIZE
The default selection highlight thickness (can be changed in preference menu)
#define DEFAULT_PIN_LENGTH
The default pin number size when creating pins(can be changed in preference menu)
#define DEFAULT_TEXT_SIZE
Ratio of the font height to the baseline of the text above the wire.
const int libeditSchemaVersion
! Update the schema version whenever a migration is required