28#include <wx/filedlg.h>
67 [](
const wxCheckBox* aOpt )
69 return aOpt->IsChecked();
121 wxFileName fn( currentPath.IsEmpty() ?
m_frame->GetBoard()->GetFileName() : currentPath );
123 if( !fn.DirExists() )
124 fn =
m_frame->GetBoard()->GetFileName();
126 wxFileDialog dlg(
this,
_(
"Import Settings From" ), fn.GetPath(), fn.GetFullName(),
128 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
132 if( dlg.ShowModal() == wxID_OK )
141 DisplayError(
this, wxString::Format(
_(
"File not found." ) ) );
155 opt->SetValue( select );
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
wxBoxSizer * m_buttonsSizer
wxCheckBox * m_CustomRulesOpt
wxButton * m_selectAllButton
wxCheckBox * m_ZoneHatchingOffsetsOpt
wxCheckBox * m_MaskAndPasteOpt
wxCheckBox * m_ConstraintsOpt
wxCheckBox * m_ComponentClassesOpt
wxCheckBox * m_TuningPatternsOpt
STD_BITMAP_BUTTON * m_browseButton
wxCheckBox * m_SeveritiesOpt
wxCheckBox * m_TextAndGraphicsOpt
wxCheckBox * m_TuningProfilesOpt
wxCheckBox * m_FormattingOpt
wxCheckBox * m_TeardropsOpt
DIALOG_IMPORT_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Import Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxTextCtrl * m_filePathCtrl
wxCheckBox * m_TracksAndViasOpt
wxCheckBox * m_NetclassesOpt
void OnSelectAll(wxCommandEvent &event) override
bool TransferDataFromWindow() override
bool anyOptionSelected() const
bool TransferDataToWindow() override
void updateImportSettingsButton()
Enable the "Import Settings" button, which needs both a source file and at least one checked import s...
std::vector< wxCheckBox * > m_options
Every import selection checkbox, so that the enable, select-all and deselect-all paths cannot drift a...
DIALOG_IMPORT_SETTINGS(wxWindow *aParent, PCB_EDIT_FRAME *aFrame)
void onFilePathChanged(wxCommandEvent &aEvent)
void updateSelectAllButton()
Label the toggle for what it will actually do to the current selection.
void OnCheckboxClicked(wxCommandEvent &event) override
void OnBrowseClicked(wxCommandEvent &event) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
The main frame for Pcbnew.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
static wxString PcbFileWildcard()
Definition of file extensions used in Kicad.