26 #include <../board_stackup_manager/panel_board_stackup.h> 27 #include <../board_stackup_manager/panel_board_finish.h> 46 #include <wx/treebook.h> 48 using std::placeholders::_1;
53 _(
"Import Settings from Another Board..." ) ),
111 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
117 m_treebook->Connect( wxEVT_TREEBOOK_PAGE_CHANGED,
123 if(
Prj().IsReadOnly() )
126 "be editable." ), wxICON_WARNING );
133 m_treebook->Disconnect( wxEVT_TREEBOOK_PAGE_CHANGED,
141 int page =
event.GetSelection();
159 wxSize pageSize =
m_treebook->GetPage( page )->GetSize();
163 m_treebook->GetPage( page )->SetSize( pageSize );
174 if( importDlg.ShowModal() == wxID_CANCEL )
178 wxFileName projectFn( boardFn );
185 "Associated project file %s could not be loaded" ),
186 projectFn.GetFullPath() );
194 bool okToProceed =
true;
200 BOARD* otherBoard =
nullptr;
206 otherBoard = pi->Load( boardFn.GetFullPath(),
nullptr,
nullptr,
nullptr,
224 if( ioe.
Problem() != wxT(
"CANCEL" ) )
227 boardFn.GetFullPath() );
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
virtual bool IsReadOnly() const
void ImportSettingsFrom(BOARD *aBoard)
PANEL_SETUP_RULES * m_rules
Container for project specific data.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
SETTINGS_MANAGER * GetSettingsManager() const
This file is part of the common library.
const std::string ProjectFileExtension
void SyncCopperLayers(int aNumCopperLayers)
Called when switching to this tab to make sure that any changes to the copper layer count made on the...
PANEL_SETUP_NETCLASSES * m_netclasses
void ImportSettingsFrom(BOARD *aBoard)
void Disable(wxWindow *aWindow)
Makes a window read-only.
wxCheckBox * m_NetclassesOpt
void ImportSettingsFrom(std::map< int, SEVERITY > &aSettings)
wxCheckBox * m_MaskAndPasteOpt
virtual const wxString Problem() const
what was the problem?
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
PANEL_SETUP_BOARD_STACKUP * m_physicalStackup
void OnAuxiliaryAction(wxCommandEvent &event) override
PANEL_SETUP_SEVERITIES * m_severities
int m_physicalStackupPage
void OnLayersOptionsChanged(LSET aNewLayerSet)
Must be called if the copper layers count has changed or solder mask, solder paste or silkscreen laye...
wxTreebook * GetTreebook()
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
bool CheckCopperLayerCount(BOARD *aWorkingBoard, BOARD *aImportedBoard)
Check and warn if inner copper layers will be deleted.
Multi-thread safe progress reporter dialog, intended for use of tasks that parallel reporting back of...
virtual const wxString What() const
A composite of Problem() and Where()
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
void ImportSettingsFrom(BOARD *aBoard)
Definition of file extensions used in Kicad.
std::vector< wxString > GetNetClassAssignmentCandidates() const
Return a list of name candidates for netclass assignment.
wxCheckBox * m_ConstraintsOpt
NETCLASSES & GetNetClasses() const
void ImportSettingsFrom(BOARD *aBoard)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
DIALOG_BOARD_SETUP(PCB_EDIT_FRAME *aFrame)
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
void SetProject(PROJECT *aProject)
Link a board to a given project.
void ImportSettingsFrom(BOARD *aBoard)
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
PANEL_SETUP_TRACKS_AND_VIAS * m_tracksAndVias
void ImportSettingsFrom(BOARD *aBoard)
PANEL_SETUP_CONSTRAINTS * m_constraints
wxCheckBox * m_TracksAndViasOpt
Information pertinent to a Pcbnew printed circuit board.
static PLUGIN * PluginFind(PCB_FILE_T aFileType)
Return a PLUGIN which the caller can use to import, export, save, or load design documents.
std::map< int, SEVERITY > m_DRCSeverities
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Saves, unloads and unregisters the given PROJECT.
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
The main frame for Pcbnew.
PANEL_SETUP_TEXT_AND_GRAPHICS * m_textAndGraphics
wxCheckBox * m_TextAndGraphicsOpt
PANEL_SETUP_MASK_AND_PASTE * m_maskAndPaste
PANEL_SETUP_BOARD_FINISH * m_boardFinish
PANEL_TEXT_VARIABLES * m_textVars
wxCheckBox * m_SeveritiesOpt
void ImportSettingsFrom(NETCLASSES *aBoard)
PANEL_SETUP_LAYERS * m_layers
std::vector< bool > m_macHack
void OnPageChange(wxBookCtrlEvent &event)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
int GetCopperLayerCount() const
PROJECT * GetProject(const wxString &aFullPath) const
Retrieves a loaded project by name.
S-expression Pcbnew file format.
Container for design settings for a BOARD object.