26 #include <../board_stackup_manager/panel_board_stackup.h> 27 #include <../board_stackup_manager/panel_board_finish.h> 45 using std::placeholders::_1;
49 _(
"Import Settings from Another Board..." ) ),
76 m_treebook->AddPage(
new wxPanel(
this ),
_(
"Board Stackup" ) );
92 m_treebook->AddPage(
new wxPanel(
this ),
_(
"Text & Graphics" ) );
96 m_treebook->AddPage(
new wxPanel(
this ),
_(
"Design Rules" ) );
103 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
110 m_treebook->Connect( wxEVT_TREEBOOK_PAGE_CHANGED,
119 m_treebook->Disconnect( wxEVT_TREEBOOK_PAGE_CHANGED,
136 else if(
Prj().IsReadOnly() )
139 _(
"Project is missing or read-only. Changes will not be saved." ) );
145 int page =
event.GetSelection();
149 wxSize pageSize =
m_treebook->GetPage( page )->GetSize();
153 m_treebook->GetPage( page )->SetSize( pageSize );
165 if( importDlg.ShowModal() == wxID_CANCEL )
169 wxFileName projectFn( boardFn );
176 "Associated project file %s could not be loaded" ),
177 projectFn.GetFullPath() );
185 bool okToProceed =
true;
191 BOARD* otherBoard =
nullptr;
195 otherBoard = pi->Load( boardFn.GetFullPath(),
nullptr, nullptr );
212 if( ioe.
Problem() != wxT(
"CANCEL" ) )
215 boardFn.GetFullPath() );
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
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)
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
wxCheckBox * m_NetclassesOpt
void ImportSettingsFrom(std::map< int, SEVERITY > &aSettings)
wxCheckBox * m_MaskAndPasteOpt
virtual const wxString Problem() const
what was the problem?
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...
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
bool CheckCopperLayerCount(BOARD *aWorkingBoard, BOARD *aImportedBoard)
Check and warn if inner copper layers will be deleted.
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.
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)
Links 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
void OnValidate(wxCommandEvent &aEvent)
wxCheckBox * m_TextAndGraphicsOpt
void AddAuxiliaryAction(const wxString &aTitle, const wxString &aTooltip, std::function< void(wxCommandEvent &)> aHandler)
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)
std::vector< wxString > GetNetClassAssignmentCandidates()
Return a list of name candidates for netclass assignment.
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.