25 #include <wx/dirdlg.h> 39 GetSizer()->SetSizeHints(
this );
51 if( !wxDialog::TransferDataToWindow() )
58 std::vector<wxString> paths;
64 m_btnPrevVer->SetLabelText(
_(
"Import settings from a previous version (none found)" ) );
70 for(
const auto&
path : paths )
88 if( !wxDialog::TransferDataFromWindow() )
135 wxDirDialog dlg(
nullptr,
_(
"Select Settings Path" ),
m_cbPath->GetValue(),
136 wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
138 if( dlg.ShowModal() == wxID_OK )
140 m_cbPath->SetValue( dlg.GetPath() );
wxRadioButton * m_btnPrevVer
void SetMigrationSource(const wxString &aSource)
Helper for DIALOG_MIGRATE_SETTINGS to specify a source for migration.
void OnPathDefocused(wxFocusEvent &event) override
static bool IsSettingsPathValid(const wxString &aPath)
Checks if a given path is probably a valid KiCad configuration directory.
wxButton * m_standardButtonsCancel
bool TransferDataFromWindow() override
~DIALOG_MIGRATE_SETTINGS() override
bool TransferDataToWindow() override
void OnDefaultSelected(wxCommandEvent &event) override
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
void OnPrevVerSelected(wxCommandEvent &event) override
wxStaticText * m_lblPathError
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...
wxRadioButton * m_btnUseDefaults
void OnPathChanged(wxCommandEvent &event) override
void SetMigrateLibraryTables(bool aMigrate=true)
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
wxCheckBox * m_cbCopyLibraryTables
Class DIALOG_MIGRATE_SETTINGS_BASE.
wxButton * m_standardButtonsOK
void showPathError(bool aShow=true)
SETTINGS_MANAGER * m_manager
wxStaticText * m_lblWelcome
wxBitmapButton * m_btnCustomPath
static std::string GetSettingsVersion()
Parses the current KiCad build version and extracts the major and minor revision to use as the name o...
void OnChoosePath(wxCommandEvent &event) override
wxStdDialogButtonSizer * m_standardButtons
DIALOG_MIGRATE_SETTINGS(SETTINGS_MANAGER *aManager)