36 m_ConvertedFileName(),
56 switch( Get<int>(
"last_mod_layer" ).value_or( 0 ) )
59 case 0:
Set(
"last_mod_layer", 1 );
break;
60 case 1:
Set(
"last_mod_layer", 2 );
break;
61 case 2:
Set(
"last_mod_layer", 7 );
break;
62 case 3:
Set(
"last_mod_layer", 3 );
break;
63 case 4:
Set(
"last_mod_layer", 4 );
break;
64 case 5:
Set(
"last_mod_layer", 5 );
break;
65 case 6:
Set(
"last_mod_layer", 6 );
break;
78 ret &= fromLegacy<int>( aCfg,
"Last_format",
"last_format" );
79 ret &= fromLegacy<int>( aCfg,
"Last_modlayer",
"last_mod_layer" );
80 ret &= fromLegacy<int>( aCfg,
"Threshold",
"threshold" );
81 ret &= fromLegacy<bool>( aCfg,
"Negative_choice",
"negative" );
82 ret &= fromLegacy<int>( aCfg,
"Unit_selection",
"units" );
const int bitmap2cmpSchemaVersion
! Update the schema version whenever a migration is required
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.
wxString m_BitmapFileName
wxString m_ConvertedFileName
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
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...
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.