32 SetMinSize( FromDIP( GetMinSize() ) );
55 if( !wxDialog::TransferDataToWindow() )
62 std::vector<wxString> paths;
68 m_btnPrevVer->SetLabelText(
_(
"Import settings from a previous version (none found)" ) );
74 for(
const auto&
path : paths )
92 if( !wxDialog::TransferDataFromWindow() )
139 wxDirDialog dlg(
nullptr,
_(
"Select Settings Path" ),
m_cbPath->GetValue(),
140 wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
142 if( dlg.ShowModal() == wxID_OK )
144 m_cbPath->SetValue( dlg.GetPath() );
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
Class DIALOG_MIGRATE_SETTINGS_BASE.
wxButton * m_standardButtonsCancel
wxRadioButton * m_btnUseDefaults
STD_BITMAP_BUTTON * m_btnCustomPath
wxRadioButton * m_btnPrevVer
wxStaticText * m_lblPathError
wxStaticText * m_lblWelcome
wxStdDialogButtonSizer * m_standardButtons
wxCheckBox * m_cbCopyLibraryTables
void OnChoosePath(wxCommandEvent &event) override
bool TransferDataFromWindow() override
void OnDefaultSelected(wxCommandEvent &event) override
DIALOG_MIGRATE_SETTINGS(SETTINGS_MANAGER *aManager)
void OnPathChanged(wxCommandEvent &event) override
void OnPrevVerSelected(wxCommandEvent &event) override
SETTINGS_MANAGER * m_manager
void OnPathDefocused(wxFocusEvent &event) override
~DIALOG_MIGRATE_SETTINGS() override
bool TransferDataToWindow() override
void showPathError(bool aShow=true)
void SetupStandardButtons(std::map< int, wxString > aLabels={})
static std::string GetSettingsVersion()
Parses the current KiCad build version and extracts the major and minor revision to use as the name o...
void SetMigrateLibraryTables(bool aMigrate=true)
void SetMigrationSource(const wxString &aSource)
Helper for DIALOG_MIGRATE_SETTINGS to specify a source for migration.
bool GetPreviousVersionPaths(std::vector< wxString > *aName=nullptr)
Retrieves the name of the most recent previous KiCad version that can be found in the user settings d...
static bool IsSettingsPathValid(const wxString &aPath)
Checks if a given path is probably a valid KiCad configuration directory.
std::vector< FAB_LAYER_COLOR > dummy