65 std::vector<wxString> paths;
73 m_btnPrevVer->SetLabelText(
_(
"Import settings from a previous version (none found)" ) );
79 for(
const auto&
path : paths )
117 std::shared_ptr<STARTWIZARD_PROVIDER_SETTINGS_MODEL>
m_model;
143 wxDirDialog dlg(
nullptr,
_(
"Select Settings Path" ),
m_cbPath->GetValue(),
144 wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
146 if( dlg.ShowModal() == wxID_OK )
148 m_cbPath->SetValue( dlg.GetPath() );
196 m_model = std::make_shared<STARTWIZARD_PROVIDER_SETTINGS_MODEL>();
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
virtual bool SaveToFile(const wxString &aDirectory="", bool aForce=false)
Calls Store() and then writes the contents of the JSON document to a file.
STD_BITMAP_BUTTON * m_btnCustomPath
wxRadioButton * m_btnUseDefaults
wxStaticText * m_lblPathError
wxRadioButton * m_btnPrevVer
PANEL_STARTWIZARD_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
bool TransferDataFromWindow() override
void showPathError(bool aShow=true)
void OnDefaultSelected(wxCommandEvent &event) override
void OnPathDefocused(wxFocusEvent &event) override
PANEL_STARTWIZARD_SETTINGS(std::shared_ptr< STARTWIZARD_PROVIDER_SETTINGS_MODEL > aModel, wxWindow *aParent)
std::shared_ptr< STARTWIZARD_PROVIDER_SETTINGS_MODEL > m_model
void OnPathChanged(wxCommandEvent &event) override
bool TransferDataToWindow() override
void OnPrevVerSelected(wxCommandEvent &event) override
void OnChoosePath(wxCommandEvent &event) override
virtual COMMON_SETTINGS * GetCommonSettings() const
virtual SETTINGS_MANAGER & GetSettingsManager() const
wxString GetPathForSettingsFile(JSON_SETTINGS *aSettings)
Return the path a given settings file should be loaded from / stored to.
bool MigrateFromPreviousVersion(const wxString &aSourcePath)
Handle migration of the settings from previous KiCad versions.
bool SettingsDirectoryValid() const
bool GetPreviousVersionPaths(std::vector< wxString > *aName=nullptr)
Retrieve the name of the most recent previous KiCad version that can be found in the user settings di...
static bool IsSettingsPathValid(const wxString &aPath)
Check if a given path is probably a valid KiCad configuration directory.
wxPanel * GetWizardPanel(wxWindow *aParent, STARTWIZARD *aWizard) override
void ApplyDefaults() override
Apply whatever actions and settings should happen if the user cancels the startup wizard.
STARTWIZARD_PROVIDER_SETTINGS()
std::shared_ptr< STARTWIZARD_PROVIDER_SETTINGS_MODEL > m_model
bool NeedsUserInput() const override
STARTWIZARD_PROVIDER(const wxString &aPageName)
PGM_BASE & Pgm()
The global program "get" accessor.
std::vector< FAB_LAYER_COLOR > dummy