42 m_ShowPinElectricalType( true ),
44 m_EditSymbolVisibleColumns()
134 [&]() -> nlohmann::json
150 [&](
const nlohmann::json& aVal )
152 if( aVal.empty() || !aVal.is_object() )
166 {
"lockedItems",
false },
172 {
"graphics",
true },
174 {
"otherItems",
true }
193 std::string gridSizePtr =
"window.grid.last_size";
195 if( std::optional<int> currentSize = Get<int>( gridSizePtr ) )
197 Set( gridSizePtr, *currentSize - 4 );
202 Set( gridSizePtr, 1 );
205 ret &= fromLegacy<int>( aCfg,
"DefaultWireWidth",
"defaults.line_width" );
206 ret &= fromLegacy<int>( aCfg,
"DefaultPinLength",
"defaults.pin_length" );
207 ret &= fromLegacy<int>( aCfg,
"LibeditPinNameSize",
"defaults.pin_name_size" );
208 ret &= fromLegacy<int>( aCfg,
"LibeditPinNumSize",
"defaults.pin_num_size" );
210 ret &= fromLegacy<int>( aCfg,
"LibeditRepeatLabelInc",
"repeat.label_delta" );
211 ret &= fromLegacy<int>( aCfg,
"LibeditPinRepeatStep",
"repeat.pin_step" );
212 ret &= fromLegacy<int>( aCfg,
"LibeditRepeatStepX",
"repeat.x_step" );
213 ret &= fromLegacy<int>( aCfg,
"LibeditRepeatStepY",
"repeat.y_step" );
215 ret &= fromLegacy<int>( aCfg,
"LibeditLibWidth",
"lib_table_width" );
216 ret &= fromLegacy<bool>( aCfg,
"LibeditShowPinElectricalType",
"show_pin_electrical_type" );
218 ret &=
fromLegacyString( aCfg,
"LibEditFieldsShownColumns",
"edit_symbol_visible_columns" );
220 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.
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...
static bool SetIfPresent(const nlohmann::json &aObj, const std::string &aPath, wxString &aTarget)
Sets the given string if the given key/path is present.
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 SetLegacyFilename(const wxString &aFilename)
Like a normal param, but with custom getter and setter functions.
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
bool m_UseEeschemaColorSettings
bool m_ShowPinElectricalType
DIALOG_IMPORT_GRAPHICS m_ImportGraphics
wxString m_PinTableVisibleColumns
SCH_SELECTION_FILTER_OPTIONS m_SelectionFilter
wxString m_EditSymbolVisibleColumns
bool m_ShowPinAltIcons
When true, dragging an outline edge will drag pins rooted on it.
bool m_dragPinsAlongWithEdges
#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.
bool text
Text and fields.
bool symbols
Allow selecting symbols and sheet symbols.
bool labels
Net and bus labels.
bool pins
Symbol and sheet pins.
bool graphics
Graphic lines, shapes, polygons.
bool lockedItems
Allow selecting locked items.
bool images
Bitmap/vector images.
bool otherItems
Anything not fitting one of the above categories.
bool wires
Net and bus wires and junctions.
float properties_splitter
int properties_panel_width
bool interactive_placement
const int libeditSchemaVersion
! Update the schema version whenever a migration is required